-8

I'm pondering a project in which one component needs to make a large number of http requests at accurate times. It should, let's say, release a set of 'dozens to hundreds' of requests at 1 second intervals. It is important that the requests are received by the other parties as close to the target time as possible.

Notwithstanding issues outside of our control such as network partitions / performance, I'm wondering what other issues I might face and any recommendations for overcoming them.

My proficiency is in .Net and JavaScript. I'm wondering if the former would be unsuitable due to its managed nature (garbage collections might cause timing issues). I wonder if JavaScript (Node?) would be any better (even though single threaded, it might 'fire and forget' them fast enough). Would another language / platform such as Erlang be particularly better suited?

This would ideally run on a cloud provider like GCP, Azure or AWS. Could I hit issues such as limits on how many open HTTP requests I could have?

Thanks for your help :-)

1 Answers1

1

You're definitively going the wrong way about it.

Let say you have have two point of access in HTTP that does the following :

  • Give the current time of the server
  • Perform a write in the database

If you test the first and succesfully handle 100k connections, that doesn't mean your site will reliabely work for every kind of request up to 100k connections.

I think you're on the development side, not system/network. If you really want to test something, you should be settings up a server with enough test datas in it to match what it could be in production, then for each request you can make, you define a reasonable response time (usually < 500ms or 1s).

If you're really aiming for more than 10k connections handled in parallel, I would advise to get some advise from specialists for the hardware, network and database stuff. Unless you're just providing a fully static HTML site.

Also note that if some languages are better for near real time thing, pretty much all of them have some unpredictability (malloc in C), and your computer may also switch on others task from time to time. If you really want to go on the stress test and can't get enough requests with one computer, just set up another one, the only thing that matter after all is the number of request that your server receive.

Walfrat
  • 3,536