0

What I am asking is a very common question that comes to any developer's mind when he/she wants to host a server but a precise answer is not easily available. I need to host a server which returns HTTP response of 20KB. This server is expected to get ten million request a day, maximum 10 thousand request per minute. What server capacity (RAM, bandwidth etc) I should have? Lets safely ignore other factors like storage, database capacity like SQL etc. The prime objective of this question is to judge hardware estimation in terms of bandwidth and RAM(or other hardwares) that can handle so many simultaneous connections.

It would be very helpful not just to me but to anyone interested, if the person answering this question provide explanation about the factors that were considered to arrive at the answer. The formula governing these factors will help anyone to change requirements in my original question and arrive at the answer needed.

3 Answers 3

3

There is no formula. The best method is try to get some test equipment, and setup an environment similar to the production environment and test.

2
  • Thanks for the quick reply Zoredache. Yes, I was expecting this. I know there is no proved formula for what I am asking. But I am sure we can use safe assumptions to arrive at some answer in such cases. Changing these assumptions will change the answer accordingly. Can you please provide details of test equipments you hinted?
    – Vijayendra
    Feb 1, 2012 at 18:06
  • If you are looking at buying server X, you call up the vendor and ask if you can demo server X, they send you the equipment you might be buying, you try it.
    – Zoredache
    Feb 1, 2012 at 18:08
3

Zoredache is right: you need to do real world testing with your application in order to do accurate capacity planning. But with that said...


If you expect to get ten million requests per day, and each request is 20 KB, that works out to about 190 GB per day, or 5912 GB per month. To get a rough idea of bandwidth costs, Amazon charges $0.12/GB on their S3 service, so you're looking at $709.44/month for bandwidth alone.

Your estimated peak load is 10,000 requests per minute, or 167 requests per second. At 20 KB each, that is 3.26 MB/sec of data, or about 26 Mbps which is how bandwidth is normally measured.

If you're serving small static files, any modern server should be able to handle this load. If you're doing a lot of computation to produce that 20 KB of output, this could easily crush even the most powerful servers. Without knowing more about your application, it's impossible to determine whether bandwidth is the limiting factor.

Good luck!

1
  • Thanks Nic. Are there any tools or online services that can do this stress testing? I have heard about few of those but I am not sure which one are best and produce most accurate results.
    – Vijayendra
    Feb 9, 2012 at 20:09
1

well, there is no exact formula, but based on the numbers you provided, one can estimate some of the specs needed.

10.000 Requests per Second
20KB per Request
equals 200.000KB per Second

So, ignoring storage and IO Bandwidth, you would at least saturate two 1GE Links.

Without knowing the nature of the responses, i can not provide any estimation on Storage needs or RAM

So you would need to provide some more information
Would you be able to cache the content?
Are you using PHP, ASP or similar?

If you are serving static content you could just use two servers with huge amounts of ram and 1GE Nic each, put 2 load balancers in front.
That should suffice.

If you are serving dynamic content this task becomes a whole different ballgame.

2
  • Thanks, nearly (and neatly) answered it. Wait, lets make it little more complicated. Lets consider two cases - One the static and the other dynamic. Static first, assume there is no storage needed. My server just download some feeds periodically and stores them as a file on server and millions of subscribers downloads this file (kind of static content). Second dynamic, assume its a mail server and user will keep asking mail updates. Lets just ignore storage for now. Lets find out RAM, IO bandwidth, internet connection bandwidth etc. What do you suggest?
    – Vijayendra
    Feb 1, 2012 at 18:32
  • Well, if you can fit the content in RAM, you would not need to worry about storage. Regarding the Mailserver scenario, it would be likely that the users are authenticating against some kind of a database, so this would be your bottleneck.
    – Niko S P
    Feb 2, 2012 at 7:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .