Live data from Hacker News

Backend of Meta Threads is built with Python 3.10

twitter.com

311–320 of 458 posts

Re: Backend of Meta Threads is built with Python 3.10

#311
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…

To answer the first, because I am no longer bound by nda.

Why Django? Because that's what it originally was. Same with YouTube frontend btw. The apps just grew and grew.

Re: Backend of Meta Threads is built with Python 3.10

#312

> It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10. So not entirely just python 3.1.

Mind that Python 3.10 is nine major versions ahead of 3.1

Re: Backend of Meta Threads is built with Python 3.10

#313
post #249

Earlier quoted context omitted.

Except PHP actually is fast while Python isn't.

Except it's not. Bindings to C libraries are.

Your semantics are irrelevant. People who write PHP end up with faster performing applications than people who write Python.

Re: Backend of Meta Threads is built with Python 3.10

#314
post #312

> It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10. So not entirely just python 3.1.

Mind that Python 3.10 is nine major versions ahead of 3.1

[deleted]

Re: Backend of Meta Threads is built with Python 3.10

#315
post #131

Earlier quoted context omitted.

While that is technically correct, they haven't been running vanilla PHP for quite some time - it's jitted into x86 and run natively on the machine. It's also pretty extensively optimized. And the VM that does the jitting is all C++. Their MySQL deployment is also an internal fork that's been heavily modified for scalability (storage/compute separation, sharding, RocksDB based storage engine instead of InnoDB, Raft f…

Facebook scaled to ~1b daily actives on MySQL + InnoDB. There was lots of engineering work, like schema sharding (denormalization), automation, plenty of bug fixes and patches for MySQL (most or all contributed back to upstream, from what I remember), and of course a massive caching layer; plus throwing crazy hardware at the problem. Nonetheless the underlying engine was something any MySQL user or admin would have r…

It sounds like you were involved in this. Since you were working there so long ago, would you be willing to write up a technical account of the things you did? I'd be interested in learning more about it. I figure the tech from 10 years ago is outdated enough that it wouldn't cause any issues if you made it public.

Re: Backend of Meta Threads is built with Python 3.10

#317

For the “Python isn’t fast enough for production backend” crowd from the same company that brought you the largest social network built on PHP + MySQL.

Yep, Vanilla Python isn't fast enough so they have to do more: "It's running on Instagram's #Cinder fork that includes a JIT, lazy-loaded modules, pre-compiled static modules, and a bunch of other interesting tweaks against vanilla Python 3.10" From the Tweet. Personally, I don't care what language people use. We all know that if you have money, you can just throw in more servers. Until your CFO and CTO decided that…

[deleted]

Re: Backend of Meta Threads is built with Python 3.10

#318

For the “Python isn’t fast enough for production backend” crowd from the same company that brought you the largest social network built on PHP + MySQL.

Earlyish facebook engineer here. Early days FB php was nothing like the php used to template websites. All kinds of specialized libraries to enable a much more sophisticated programming style. Think functional helpers, and asynchronous execution on thousands of cores, spanning trees across data centers using ssh etc. As a tangent a lot of the good stuff I used was written by Evan Priestley, who also did Phabricator a…

Random question... whatever happened to that visual friend/network graph that used to load on a separate window? I always thought that thing was pretty neat to see

Re: Backend of Meta Threads is built with Python 3.10

#319
post #179

Earlier quoted context omitted.

Remember when Twitter was written in Ruby?

>Remember when Twitter was written in Ruby? Ruby is the exception to the rule. Friends don't let friends start new Ruby projects in 2023.

Respectfully disagree about not starting new Ruby projects now - can we still be friends? It works and is easy to get started for simple stuff, same with PHP for some folks or Django etc.

Re: Backend of Meta Threads is built with Python 3.10

#320
post #249

Earlier quoted context omitted.

Except it's not. Bindings to C libraries are.

Your semantics are irrelevant. People who write PHP end up with faster performing applications than people who write Python.

Am I seeing two people debating which language is faster without quoting any numbers?
Post reply on HN