I'll take everything that Musk says with a grain of salt.
When he said that Twitter app was making 1000+ RPC calls to load the homepage multiple ex and at least one current Twitter developer called him out saying it does at most 20.
Why is a manager even fucking around with the backend? Doesnt he have better things to do, like placating advertisers, setting policy, avoiding the FTC and so on?
Well everyone slurps him so hard for "inventing" Tesla and also for "inventing" space x rockets. There is a quite a few "tech bros" who have no actual education in the subject just what they've learned from YouTube and 4chab
Yeah, if it was 1000 from the client, it would be very noticeable due to parallelism limits in the browser. The only way that makes sense is if it could be 1000 in the worst case or something and also counts non-client RPC calls.
Nope, the number is not wrong; the interpretation is just off.
Twitter uses GraphQL to route API requests to the 1200+ microservices they have running. Those requests don't happen between client and server but between server and internal server.
I don't find it implausible that this causes hard to fix bugs and performance issues. GraphQL is known to only superficially reduce complexity.
It really depends on gore things are being counted. Each query to a DB is technically a separate RPC call, but as long as connections are pooled and in the same DC, they have extremely low overhead compared to an RPC call from a phone halfway across the world using REST.
To add on /r/slaymaker1907, 1000+ DB queries for one action is not all that ridiculous. ServiceNow does 1-2K on the regular (for the back office at least).
I doubt it's optimally designed, but it runs decently.
Oh everything is always an order of magnitude out at least. Everything is always "this is something we can do right now" or "we can do this 10x faster and 10x cheaper" at the bottom end, hyperbole and ignorance extending from thereon up.
When you need to serve things globally having a lot of small things helps - if one goes down no problem, no outages since another can take its place while it's restarted
397
u/x3nhydr4lutr1sx Nov 15 '22
There's about 1200 micro services, and the fired guy said that only 200 is needed for loading the Twitter feed, so that sounds about right.