A few weeks ago I was evaluating Hibernate for Java again, since my product is expected to support 2 different databases next year. In the end I decided to keep the codebase ORM free, because it’s much easier to me to directly debug our SQL queries than trying to find what and why Hibernate does exactly. I think I’m done using ORMs for the foreseeable future.
now there's better tools like sqlc etc that have orm ergonomics without the performance hit.
at times just use nosql
rvz•2mo ago
Using Python for a backend system to "scale" really is just pure cope and was unscalable in the first place and in the long run as Reddit just found out. They knew they needed a lot more than just fake optimizations from an interpreted language to improve the performance and a Golang rewrite unsurprisingly solved those issues.
This once again clearly shows that other than in the prototyping stage of an MVP, it really makes no sense to scale with backends written in these interpreted languages in 2025.
Switching to safe, highly performant mature languages such as Golang tells you that it not only generally improves performance, but correctly handles concurrency which Python has always struggled at, especially at scale which is why in Reddit's case, the race conditions now revealed themselves more clearly before the rewrite.
whattheheckheck•2mo ago
knodi•2mo ago
I been saying it for almost 10yr, go is the future for backends.
drowning_sushi•2mo ago
I maintain a critical service written in Python and hosted in AWS and with about 40 containers it can do 1K requests/sec with good reliability. But we see issues with http libraries and systemic pressure within the service.
nly•2mo ago
That's a really low rate in my world.
I write software handling a couple of million of messages per second on a single core on a single machine
Nextgrid•2mo ago
tkfoss•2mo ago
Spivak•2mo ago
You don't end up seeing these kinds of complaints about Ruby backends and Ruby is the same order of magnitude in terms of speed.
Nextgrid•2mo ago
Modern hardware is incredibly fast, so if you wait for said scale it may never actually happen. It's likely someone will win the push for a rewrite based on politics rather than an actual engineering constraint, which I suspect happened here.
rasz•2mo ago
For example Python is struggling to reach real time performance decoding RLL/MFM data off of ancient 40 year old hard drives (https://github.com/raszpl/sigrok-disk). 4GHz CPU and I cant break 500KB/s in a simple loop:
Too•2mo ago
Spivak•2mo ago
Not saying it's ideal but it's a solved problem and Python is eating good in terms of quality dataframe libraries.
rasz•2mo ago
This is what I get right now decoding single tracks on i7-4790 platform:
diath•2mo ago
Instagram, which is significantly bigger than Reddit, disagrees.
gnaman•2mo ago
Nextgrid•2mo ago
Now we don't have details on what the comments service in Reddit entails - maybe it does indeed do a lot of CPU-intensive processing, in which case moving to Golang will definitely help.
But maybe it's also just a trivial "read from DB, spit out JSON", in which case the bottleneck will always be the DB, and "scalability" is just an excuse to justify the work.
The fact this is part of a move off a "legacy" system to "modern" "microservices" suggests there's a huge amount of developers having fun and are incentivized to justify continuing getting paid to have fun replacing a perfectly functioning system, rather than an actual hard blocker to scalability that can't be solved in a simpler way like by throwing more hardware at it.
watchful_moose•2mo ago
I don't think it suggests that at all. This is their press release, so of course they're going to spin it that way.
watchful_moose•2mo ago
They picked the tech that was available and mature at the time, and enabled them to scale for 20 years (to 100M+ DAUs + IPO) - seems like a pretty good choice to me.
You know which other platform was built on Python? Youtube.
Python isn't a bad choice if you're building [certain kinds of] billion-dollar businesses.
array_key_first•2mo ago
If you want to build an app that's easy to maintain, Python is a bad choice because of it's dynamic typing and struggles around tooling. If you want to build an app that's performant enough to scale, Python is a bad choice because Python. If you want to build an app that will get you a website ASAP, Python is still not the best choice, because other languages have larger batteries-included frameworks.
In 2005, even PHP would have been a better choice and would probably still be performant enough to run today.
Today, the story is much worse. Python has use cases! Experimentation, anything science related, "throwaway" code. Applications is just not one of the use cases IMO.
duped•2mo ago
http://www.aaronsw.com/weblog/rewritingreddit