12 requests per second: A realistic look at Python web frameworks
1–10 of 239 posts
Re: 12 requests per second: A realistic look at Python web frameworks
#2How does it compare to Sanic?
Re: 12 requests per second: A realistic look at Python web frameworks
#3Re: 12 requests per second: A realistic look at Python web frameworks
#4Re: 12 requests per second: A realistic look at Python web frameworks
#5If I know an endpoint is going to be hit hard, I forgo trying to use the ORM (except to maybe get the table name from the model obj so some soul can trace it's usage here in the future) and directly do an engine.execute(). Makes a huge difference. Next optimization I do is create stored procedures on the database. Only then I start thinking about changing the framework itself.
For folks like me who want to get prototypes off the ground in hours, flask and fastapi are godsend, and if that means I have to worry about serving thousands of requests a second soon thats a happy problem for sure.
Re: 12 requests per second: A realistic look at Python web frameworks
#6Might as well refer to TechEmpower benchmarks. https://www.techempower.com/benchmarks/
https://github.com/just-js/just
It seems to be a much tinier JavaScript runtime than Node.js (still using v8), but linux only
The benchmark is probably unrealistically optimized code but even so, it implies Node.js itself has a large performance overhead
Re: 12 requests per second: A realistic look at Python web frameworks
#7Re: 12 requests per second: A realistic look at Python web frameworks
#8In my benchmark testing, SSL appears to be the bottleneck; e.g., Apache vs. Nginx does not really matter. I assume the benchmarks above 10,000 RPS are not using SSL and regular HTTP? How are people doing benchmarks at 10k-100k RPS?
Re: 12 requests per second: A realistic look at Python web frameworks
#9In my benchmark testing, SSL appears to be the bottleneck; e.g., Apache vs. Nginx does not really matter. I assume the benchmarks above 10,000 RPS are not using SSL and regular HTTP? How are people doing benchmarks at 10k-100k RPS?
Re: 12 requests per second: A realistic look at Python web frameworks
#10Sure, the framework matters at very large scale and the benefits from optimizing the framework become large when you're doing millions of requests a second over many thousands of servers because it can help reduce baseline cost of running the service.
But I agree with the author's main point which seems to be that framework performance is pretty meaningless when comparing frameworks if you're just starting on a new project. Focus on making a product people wanna actually use first. If you're lucky enough to get to scale you can work about optimizing it then.