Scaling up on a very large web server instance is in fact possible.
As httpd's warning suggests, you will need to tune the MPM. First select an MPM. event is nice and performant, but depending on your modules you may need prefork.
MaxRequestWorkers
was formerly known as MaxClient. Increase this as much as your memory allows. Take for example the simple procedure from How to calculate the MaxClient value in apache? Assume say 350 GB of memory can be used, the rest is for OS and other overheads. Divide by the per process RSS from top
. Say it is 50 MB, and the result is something over 7000. This is your first guess at MaxRequestWorkers
. ServerLimit
also needs to be greater than this, try 10000.
Watch user response time under load to see how it does. 50,000 concurrent users may not need quite that many workers to keep serving requests, but it varies a lot depending on application.
As you keep an eye on things, plan your next tuning change experiment. Perhaps increasing ThreadsPerChild
will allow a smaller number of processes and corresponding reduced memory use.
50k is more than the default ephemeral port range on more operating systems. If all your traffic comes from the same load balancer IP and port, look into ways to get around that.