Search code examples
phplaravelhostingcdnbandwidth

How many visitors can my dedicated server handle at once?


I have a dedicated server with these specs:

  • Processor: Intel Core i5 3.40GHz (3570)
  • Memory: 2 x 4GB DDR3
  • Hard Disk: 2 x 1TB (Raid-1)
  • Operating System: Microsoft Windows Server 2008 R2 Web 64bit Edition
  • 30Mbps bandwidth

The server side system will be using Laravel 5.1.

How many visitors can the server handle at once serving mainly json content to mobile app, given that the domain has been boost by CDN like Cloudflare? Of course there are many other factors can affect it, however I just want to get an estimated number to have a concept & idea on how many visitors can the server handle at once before they can feel the slowness of respond from the server or the server is overloaded.


Solution

  • I just want to get an estimated number to have a concept & idea on how many visitors can the server handle at once before they can feel the slowness of responses from the server or the server is overloaded.

    This really depends on your code/application and you would need to do calculations for your specific application, size of the JSON that is being served, processing that is required for each request, etc. If you are unsure of how the code works, you can use a profiling tool or do a quick simulation for rough numbers.

    In case of most likely bottlenecks:

    • CPU: find out how much CPU time the server would consume in idle and when 100 or 1000 calls are made (for rough estimates). You can simulate calls fairly easy using javascript in Chrome Console. Extrapolate to see when the CPU will reach to 60% and 90% utilization.

    • Bandwidth: while doing the above check the inbound and outbound total traffic on the network interface.

    • Memory: if the system runs out of RAM then it will start swapping on HD which will be slow. Check RAM usage before, at peak and after the above checks.

    As an alternate

    You can also use a performance profiling service like loadimpact.com which gives you more specific measures on what level of "slowness" aka latency or what type of errors the users will be getting under various loads. This requires you to already have something up and running.

    =============

    In practice, I would suggest using a scalable HW solution like Apigee, AWS or Azure so you can start and launch your app with one backend server and then easily scale the backend if you need to.