Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Possible Duplicate:
How do you do Load Testing and Capacity Planning for Web Sites

how many can access a website/system at the same time? if there are too many users in a website, what may happen? what's the best way to prevent it?

share|improve this question

migrated from Oct 14 '09 at 22:21

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

marked as duplicate by Chris S Jul 31 '12 at 14:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Can you describe your platform a bit? While it won't provide you a definite answer, you might get some resources that more accurately show how to gauge for your given situation. – Joseph Ferris Oct 14 '09 at 17:53
Please make this a wiki article, as it is impossible to give a definitive answer. If you want a decent answer, other than links to articles you could (and probably should) have Googled, you need to supply details. – John Gardeniers Oct 14 '09 at 22:59

Depends on a lot of things. What OS, what web server, what are the physical specs of the box, what is the load that the pages will present, etc.? For example, static pages can be served and cached more aggressively than something that requires calculation and processing time for each request.

What you are asking is actually a very involved question that architects and analysts study ad-naseum on a per-project basis. It is great that you want to know the answer, but there is not a single hard and fast rule to provide it for you.

share|improve this answer

You have several limits:

  • Ports: max 65536, practically less, the first 1024 are reserved, if you need more, you need several NIC (Network Interface Card) or several servers for load balancing.
  • Bandwidth, what your provider allows you to upstream in MB/s
  • Licenses depending what software you use behind the scenes, you might have limitations in terms of licensing for concurrent accesses to database or from the OS for example
  • probably many others I cannot think of yet

Considering this your users will face different situations: - Could not connect to your site (too many users already on it) - Slow page loading (small bandwidth) - Intermittent errors because of licensing issues, ...

This will depress and discourage the users to come again. Best strategy is to always limit the number of users to a small number let's say 100 and scale together (hopefully upwards!) with the number of users. You then would have to buy more hardware, enable load balancing, ... but only once you need it.

To protect your server against trivial attacks you can also setup rules to avoid for example too many connections from a single IP (protects against DoS) or introduce some delays if you are flooded by connection attempts (Distributed DoS), ...

Also under high load some problems might appear like concurrency problems, so-called race conditions (bugs) that were not so apparent while 2 or 3 users only were online. Be prepared for it by stress testing your site.

share|improve this answer
I would not consider the number of ports a limit unless you use some kind long polling request. The normal user of a website downloads a bunch of resources and then waits a certain amount(e.g reading) where the port number is available for another user. – EsbenP Oct 14 '09 at 17:57
That is fully correct. In practice you would need a really high traffic to reach the limit. I would like to have this kind of "trouble" on my site and not only the 10 people a day! :-) – jdehaan Oct 14 '09 at 18:12

how many can access a website/system at the same time?

The only possible answer to this without more specific information on the setup is "between zero and infinity".

share|improve this answer
You can do better than that... – Hardryv Oct 14 '09 at 18:07
With more information, yes. – ceejayoz Oct 14 '09 at 18:12

You want to read on scalability a little. I found the story of live journals growth enlightening.

share|improve this answer

Too many people trying to access a website is one method for shutting down a website. See DoS

share|improve this answer

The number of users depends on both the software and hardware. You can test for this, search for "load testing".

You can prevent it by building a site to be "scalable".

share|improve this answer

I worked on a tool years ago at Quest Software called "Benchmark Factory for Web" that allowed you to record one or more typical web sessions and then play them back as multiple users accessing the site. You would then get a throughput curve that would let you determine the maximum number of users before performance would suffer and how many users you could have before the average page load time exceeded some value.

Unfortunately I think they killed off the web, email, and file server versions and only offer the database version now. Depending on how much money you have, there are a ton of other tools that can help you though -- and if you don't have money, the answer is probably "more users than you are likely to ever see at one time".

Quest Software: FxM FxV

Mercury Interactive (now part of HP) WinRunner/LoadRunner. (??? they have a web monitor, but I'm drawing a blank on the name ???)

There were several others too.

share|improve this answer