Major sites do not use a single machine. Trying to scale up on a single machine will only take you so far. You should be ensuring from the outset that you design your web application and how it interacts with any database so that it can be scaled out horizontally across many machines.
As to what to set processes/threads for both Apache and mod_wsgi daemon mode (which you should use), that really depends on your specific application, how it is implemented and behaves, and how backend services such as database are used. It all depends on what mix of CPU intensive and I/O bound requests are run and how long requests run for. No one can tell you in advance what you need to set things up for, for an arbitrary web application or machine size. You will only know once you have your application, added performance monitoring to it so you know how it behaves, and attempt to then tune the web server and fix bottlenecks in your code and backend services. If you are only starting on this journey as your mail suggests, trying to work this sort of thing out in advance will not work. You need a working application and you need to be able to monitor it so you can measure its performance and work out as you go how things improve as you make it better and as you tune the web server configuration. If you have no way to monitor it, you will always be in the dark as to how well it is performing. In summary, your time is better spent elsewhere rather than speculating on this. Graham > On 3 Mar 2018, at 4:45 pm, Jaqen Nki <[email protected]> wrote: > > Hey quick question could you help me understand scaling as far as user > requests on a python Django built website for instance. I love pythons > succinctness and Django as well but noticed they're kind of slow to load > Pages and much more so when you have thousands or millions of users. I've > had issues with gunicorn and nginx setup running a Django app and found > Apache to just be much smoother. I'm exploring other options such as Golang > with nginx, and potentially Word press since it is widely used. > > But I am just curious what should I be setting for threads and processes in > the mod wsgi vhost file, in order to handle the maximum amount of requests > for a few default server capacity sizes : > > ( https://www.digitalocean.com/pricing/ ) > 1. > $5 1 GB RAM > > > > , 1 vCPU, 25 GB storage, 1 TB transfer (my current) > 2. > $20 4 GB RAM, 2 vCPUs, 80 GB storage > 3. > 8 GB, 4 vCPUs, 160 GB > 4. > 32GB, 8 vCPUs, 640 GB > > > 5. what resouces would you estimate a site like drudgereport.com needs to > display a simple page with links to 25-30 million users a day? Obviously at > that point you will probably need a huge server using nginx and a lot of > CPUs. Thanks -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
