4 ms·
Problem is though Python is slow at runtime. May not matter for many use cases, but I've worked with a lot of startups that suffered terrible reliability proble
by martinald 11mo ago
Problem is though Python is slow at runtime. May not matter for many use cases, but I've worked with a lot of startups that suffered terrible reliability problems because they chose Python (or Rails, or Node to some extent) and the service cannot handle peak time load without a lot of refactoring and additional app servers.
Depending on your framework Python is at best ~3x slower (FastAPI) and at worst ~20x (Django) than asp.net on the techempower benchmarks, which maps pretty well to my real world experience.
- casper14 11mo agoCan confirm. Just finished load testing a FastApi service. Now the biggest selling point is that a lot of real backend never experience the level of load where this actually matters
- array_key_first 11mo agoI work for a very large company that has a mostly SSR monolith written in PHP. Modern PHP is a joy, and it's much faster these days, but performance is still a problem. It was chosen over 25 years ago, and I'm sure they thought the same thing about never getting the amount of load they eventually got. Modern PHP is virtually indistinguishable from dotnet, with some php-isms sprinkled on top. They should've chosen dotnet all those years ago.
- mynameisash 11mo agoI don't spend a lot of time building services, but the last few I've done, I actually went straight to Rust. The downside is that it's quite slow to develop -- I probably don't have the knowledge that others do, but it seems that frameworks could really use some work. That said, I love that I can find and fix most my problems during development. Building a service in Python means I'm constantly fixing issues in production. .NET is certainly better than Python, but I'm not very happy with the type system and the code organization versus my Rust projects.
- sasmithjr 11mo ago> .NET is certainly better than Python, but I'm not very happy with the type system and the code organization versus my Rust projects. Have you given F# a whirl?
- mynameisash 11mo agoYou know, I tried F# like eight-ish years ago, and I loved it, but I couldn't break into doing it with enough regularity and depth that it made sense for me. I still do a decent amount of C# at work, and with my experience in Rust (algebraic data types, etc.), I imagine that F# would really help out a lot in our .NET code.
- tracker1 11mo agoTake a look at FastEndpoints library for API development... definitely improves the experience a lot IMO... That said, Rust+Axum is pretty nice as well.
- WD-42 11mo agoMost web apps are waiting on the DB anyway. Rarely have I seen the speed of the actual framework make any meaningful difference.
- jtbaker 11mo agoNot saying that it’s necessarily the right choice, but it opens up contributions to code to a broader user base and making those rapid iterations that tools like fastapi allow can be pretty important when proving out a concept early on. Horses for courses… also, a Horizontal Pod Autoscaler and Load Balancer setup is pretty cheap.