4 ms·
I'm trying to write a good short answer or TL/DR and don't think I can. If you want a pithy one, at 1000 concurrent users (with no other information given) the
by backslash_16 7y ago
I'm trying to write a good short answer or TL/DR and don't think I can. If you want a pithy one, at 1000 concurrent users (with no other information given) the answer is your bottleneck probably won't be Python or Ruby.
The real answer depends on some assumptions I'm making and questions
Assumption #1 - You're doing server side rendering because you talk about dynamically generated pages and not API response times.
Assumption #2 - You're using a database and it will be on the same instance as the web server.
Assumption #3 - You have one web server instance.
- What does shared CPU really mean? Is there a guarantee on a lower bound of the resources you will have?
- When the page is dynamically generated is it mostly calls to a DB and stitching that information together in a template?
- When the page is rendered can it require a lot of computation? An example of that is a portal where someone asks for a report with custom aggregations you're doing in the application layer and not DB layer
- Does rendering a page require calls to any other services?
- Do these services have RPS and average latency guarantees?
- Are you using a CDN or serving everything from your one web server instance?
A web app that is focused on serving static assets with little customization, say putting a user name in the header and a separate profile page, could be fine if you use a CDN for the static assets and don't call the DB excessively.
If you're calling the DB 200 times to generate a page, doing long running queries, or a lot of computation in the app layer you might be in trouble. (With my hypothetical 200 DB calls to load a page you're certainly not in a great spot :))
Does anyone know how to format a list? I can't figure out the magic incantation and https://news.ycombinator.com/formatdoc https://news.ycombinator.com/formatdoc isn't helping much.