Personally evren I prefer php over python.
I get that Facebook is still a huge success, but I do find it telling that they opted to put Threads under Instagram, rather than Facebook.
It's Facebook by Meta. Instagram by Meta. Why isn't it Threads by Meta?
Switching from hack to php and viceversa should be extremely easy.
That being said, they chose python because Instagram is written in python, they are probably using a lot of existing libraries.
What percentage of python webapps do you think are hitting this as their latency and throughput limit?
(Assuming effective DB use of course, i.e. not doing dozens of DB roundtrips to server a single result or getting megabytes of data and filtering on the client etc.)
(Heavily modded, run on a custom Python JIT, and using an extremely custom FB-developed database, also used for IG and FB.)
It's Django because IG was originally written in Django back in the day. FB's general approach to scaling is keep the interface generally similar, and slowly replace things behind the scenes as necessary — rather than doing big rewrites. It's seemed to work pretty well.
Ultimately the language used for the web server isn't a huge deal compared to the performance of the database, for these kinds of massive social apps. Plus, well, they do have the custom JIT — but that's very new, and when I first joined IG in 2019, we were running vanilla Python in production.
Thanks also to every other answer I received for my question, I appreciated all of them.
Why would they use Django? I did some small projects in it but I assumed it wasn't very fast and wouldn't be suitable for a big app like this. I would like to know the pros and cons. Why didn't they build up something in C++ or Rust? Won't python limit the speed of responses despite being build the hard stuff in compiled languages? Sorry for being so naive, I am an amateur.