Doubt : How struts action servlet handles millions of requests at the same time.
posted 7 years ago
How struts single action servlet handles millions of requests ata the same time. Does the framework creates millions of threads( sigle action servlet instance) to handle millions of reauest at the same time ( e.g if you take facebook it has millions of requests at the same time).
Struts does not create threads. The servlet container does. The container works like any other server, dispatching threads or processes to handle requests The number of threads is limited by the operating system. It is unlikely that a single server (hardware or software) could handle more than a couple thousand simultaneous connections, much less a million, so it is common to use server farms or clusters to delegate requests among multiple machines.