Live data from Hacker News

Backend of Meta Threads is built with Python 3.10

twitter.com

181–190 of 458 posts

Re: Backend of Meta Threads is built with Python 3.10

#181
post #152
post #115

Earlier quoted context omitted.

You mean the company that had to create their two PHP implementations and a translator to C++, to actually scale?

Facebook had hundreds of millions daily active users before writing a compiler.

And lots of nodes not able to keep up, rewriting backend services in C++ to make up for it.

Re: Backend of Meta Threads is built with Python 3.10

#183

Earlier quoted context omitted.

Most of Facebook is built on PHP. I’m surprised they didn’t choose Laravel.

It turns out calling the app "Threads by Instagram" is not just a branding gimmick. The Instagram backend was always Python/Django since before the acquisition.

That's pretty interesting, I wonder if that means that it's build by a team at Instagram, and not Facebook. I'd assume so.

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.

Re: Backend of Meta Threads is built with Python 3.10

#184

Earlier quoted context omitted.

They ended up compiling PHP to assembly! Facebook is a company that will go to ridiculous lengths to avoid rewrites.

Was there a separate initiative for assembly, or are you thinking about HipHop? HipHop was for C++ and got a lot of attention back when it was released.

Yes, the 2nd rewrite for a VM, where the JIT compiler turned out to be quite good versus HipHop, and development focus switched to HHVM.

Re: Backend of Meta Threads is built with Python 3.10

#185
post #152
post #115

Earlier quoted context omitted.

You mean the company that had to create their two PHP implementations and a translator to C++, to actually scale?

Facebook had hundreds of millions daily active users before writing a compiler.

98% of the people that initially thought (Python for Threads - OMG performance!) work at a company that will tell you straight up they expect 100M RPS in a year or two, will actually only get to 50k RPS in 5 years before the "Our incredible journey" letter is issued.

Re: Backend of Meta Threads is built with Python 3.10

#186
post #60

Earlier quoted context omitted.

Thanks for your comment. I'm really interested in this topic. How do you know the web server is Django? I searched but couldn't find this. 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 despi…

Whether it's in C++ or Rust or Python, almost all of any slowness would be from database waiting anyway.

It wouldn't. Databases are fast, python is slow.

Re: Backend of Meta Threads is built with Python 3.10

#187
post #60
post #55

Really, all the performance intensive parts are in various c++ aggregator and recommendation type services. But the webserver is Django, yes.

Thanks for your comment. I'm really interested in this topic. How do you know the web server is Django? I searched but couldn't find this. 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 despi…

[deleted]

Re: Backend of Meta Threads is built with Python 3.10

#188
post #176

Earlier quoted context omitted.

You simply can't beat Django's ORM for general stuff. It's too awesome. This alone makes it so hard to choose anything else. I know django doesn't have that "shiny factor" to it these days - but it's very reliable. > mixed messaging on best practices for scalable apps The WSGI stuff can be kinda confusing and is used across a lot of python frameworks including django and I think flask? My advice for "simple scaling"…

Ehh, Django ORM always was one of the worst parts of Django.

True, but it's the best ORM currently available for any language. It might not be the fastest, but it is the one that's has the highest level of developer comfort.

Using Django is probably the reason why I can stand using SQLAlchemy, it's way to complicated for everything I do and it's just not a nice an experience.

Re: Backend of Meta Threads is built with Python 3.10

#189

Python is just the web server. All the truly performance-sensitive components--edge proxy, load balancers, backend services, databases, caches, and storage services--are mostly C++.

Which is exactly the way Python is meant to be used and has always been used.

Re: Backend of Meta Threads is built with Python 3.10

#190

Earlier quoted context omitted.

Developer velocity is extremely important at FAANG scale.

Is it really? Don't they work really slowly compared to most of the industry? I really get the impression that it's slow progress for things at FAANG.

Slow compared to startups, very fast compared to similarly sized companies, even other tech companies.
Post reply on HN