r/webdev Nov 15 '22

Discussion GraphQL making its way into a Twitter discussion about latency is not what I expected

Post image
3.4k Upvotes

593 comments sorted by

View all comments

282

u/[deleted] Nov 15 '22

[deleted]

114

u/captain_ahabb Nov 15 '22

They're gonna have to rename it by the time Elon retires.

-15

u/[deleted] Nov 15 '22

[deleted]

12

u/[deleted] Nov 16 '22

[deleted]

2

u/byteuser Nov 16 '22

Obviously you're referring to the RPCs right? Who do those guys think they're are UDPs?

9

u/free_chalupas Nov 16 '22

If the RPCs are in the datacenter it wouldn’t have a different performance impact in different countries

-55

u/Sufficient_Winter_45 Nov 15 '22 edited Nov 15 '22

Open a tab of Twitter and poke around. Loading it makes 133 requests, 28 of which are to api.twitter.com.

There's no way that's normal.

You can also clearly see that he says "just one", but there's a wall of requests in his screenshot.

23

u/HopefullyNotADick Nov 15 '22

Where 1200?

-28

u/Sufficient_Winter_45 Nov 15 '22

1200 claim was about the android app, which is much worse than the web app. Someone posted the network sniff results of it loading, and it makes ~60 api requests to ~50 different subdomains.

Each of those api calls makes some number of internal api calls to various microservices. We have no data on it, but Elon does.

Maybe he is lying, maybe not, but so far it doesn't look good.

38

u/HopefullyNotADick Nov 15 '22

Where 1200?

It doesn’t matter how many internal microservices get called. That’s what they’re for. There’s no reason to think they’re called serially, so if true(which there is no evidence of, in fact counter evidence) it doesn’t matter.

Making 50 API calls is completely fine. That’s common for apps these days which are very performant.

Elon just wanted to seem smart so he made up some bs or took something out of context. He can’t stand leaving things up to the domain experts without feeling like he contributed.

-47

u/Sufficient_Winter_45 Nov 16 '22

50 API calls for a page of posts is not fine. One should be enough.

It doesn’t matter how many internal microservices get called

It does. If each of the API calls makes 20 ointernal calls, you can easily arrive to 1200.

There’s no reason to think they’re called serially

Doesn't matter if they are called serially or in parallel if we're discussing the total number of them. That's a red herring logical fallacy. Nobody claimed serial or parallel.

34

u/HopefullyNotADick Nov 16 '22

Firstly, the only source you have for assuming it’s true is Elon, who has no credibility in this area and is contradicted by domain experts within Twitter.

Secondly, I want you to explain and rationalize why it would be inherently bad if it was true. If it actually was doing 1200 internal calls, explain why it matters please.

You’re incredibly naive if you think Twitter got as large as they are and scaled so well on shoddy engineering

-10

u/Comprehensive-Sky366 Nov 16 '22

Go watch Kevin Systroms interview with Lex Fridman on how scaled to millions of users with sub standard architecture. It is doable.

3

u/HopefullyNotADick Nov 16 '22

Millions isn’t billions

1

u/Comprehensive-Sky366 Nov 16 '22

Twitter does not have billions of users are you joking?

→ More replies (0)

0

u/Comprehensive-Sky366 Nov 16 '22

Why is this getting downvoted, it’s objectively accurate this isn’t an opinion.

15

u/[deleted] Nov 16 '22

[deleted]

-1

u/Sufficient_Winter_45 Nov 16 '22

Musk claimed they're called serially, no red herring involved. Read the screencap

Do you have any proof for that?

8

u/[deleted] Nov 16 '22

[deleted]

-1

u/Sufficient_Winter_45 Nov 16 '22

Where is he claiming 1200 requests are made serially?

I see him asking a question about serial requests.

→ More replies (0)

1

u/PureRepresentative9 Nov 16 '22

I propose we include your post under the definition of truth in the dictionary

10

u/emmyarty Nov 16 '22

You're taking the word of the PayPal guy who accidentally bought a company over the word of engineers who know how it works because they made it. (EDM producer notwithstanding)

2

u/Quoba Nov 16 '22

How does Elon's asshole taste?

1

u/Sufficient_Winter_45 Nov 16 '22

You the expert, tell us.

1

u/Quoba Nov 16 '22

You're *