Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use php make an information site, I need my server can support 10,000 people online at the same time.

Which kind of server should I rent? (the hardware, OS, network, etc)

  1. List item : every pages average executive MYSQL QUERY for 6-7 times.

  2. List item : PHP generate html page.


share|improve this question

migrated from Feb 26 '11 at 17:07

This question came from our site for professional and enthusiast programmers.

What do you EXACTLY mean by 10 000 people online at the same? How many are actually accessing a ressource within one second, for example? – Capsule Feb 24 '11 at 20:11
@Capsule, I mean example: in 10 seconds, 10,000 people are open or fresh one of the page in my site. – cj333 Feb 24 '11 at 20:19
As @Capsule said, 10,000 people is not really specific. If you are talking about a 10,000 concurrent actions, you may be talking about a much larger number of users. Conversely, if you mean 10,000 users with a concurrency of 100-200, that would be something else. – Steven Feb 24 '11 at 20:21
10.000 people online at the same time is mostly a memory consideration - the session information needs to be available/in memory (or persisted somewhere). It is the amount of page requests per second, and the complexity per page, and the way php is called by e.g. Apache which determines the load. And for the database the complexity, indices and cache memory (and if it's co-hosted on the web server machine). – extraneon Feb 24 '11 at 20:26
@cj333 10k online each 10 seconds comes down to: 1000 requests per second. That's a lot. – arnorhs Feb 26 '11 at 17:18

When you are unsure of what server capacity you will need one way to solve this is to use cloud computing. This allows you to add more servers as you need them, and you only pay for what you use. Examples:

share|improve this answer
There's a nice series on Ars Technica on selecting/comparing virtual hosting providers. Part 2:… – extraneon Feb 24 '11 at 20:27
@Mark Byers, in the 3 examples, which cloud server is more favorable? Thanks. – cj333 Feb 24 '11 at 20:52
@cj333: If your require MySQL and PHP then that rules out App Engine. If you also need Linux that rules out Azure. – user26868 Feb 24 '11 at 20:56
@Mark Byers, have you rent one? I read the articles, but the price calculate is very complex, If my site will have 200,000 - 300,000 people per day, how much should I pay? – cj333 Feb 24 '11 at 21:06

What you need depends a lot on your application and also on the quality of the design, quality of the database schema, the code and your front end code as well (javascript/html etc). But for the sake of this answer I'll imagine all the code is well written and your database schema is flawless.

This is the setup I would go for:

  • 2 x PHP/apache servers (if you can/know how to you can also use nginx instead of apache)
  • 1 x MySQL server

For running a PHP / MySQL setup, I recommend using virtual servers rather than renting the hardware yourself.

Both Amazon EC2 and Linode servers will do good. The advantages of EC2 is that it's very easy to start new instances if you need them, they have a built in load balancer which you can use and you can make amazon add servers depending on the load. But amazon is a bit expensive, so Linode might be a better option.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.