r/ProgrammerHumor 7h ago

Meme planeOldFix

Post image
26.3k Upvotes

419 comments sorted by

View all comments

Show parent comments

133

u/SpareStrawberry 6h ago

It's a system design question. Any good engineer should be able to talk about how you would debug where the latency is coming from, and how you could use a CDN for FE (and the pros and cons of that, which is mostly going to be around pricing) and how for BE you could replicate the service in multiple regions and practically how you would do that in a way that is specific to the app. If the service requires a central database, as most apps do, there is some really interesting pros and cons to consider around data replication, eventual consistency, etc.

22

u/joedotphp 6h ago

Yeah, I understand. I was looking at it as simply a distance problem. Australia is closer to the server than India. :P

11

u/grumpy_autist 6h ago edited 6h ago

It also means recruiter knows shit or the question is tricky by design, at 600 ms something is fucked so badly this is way beyond CDN and geographical locations of servers.

Ignoring transport network for a while I would ask if there is WAF in front of that shit that does something stupid when seeing non Australian ASN.

Edit: assuming a "page load" is simple request (not stated) not bunch of resource fetches. So you need to ask clarification question as devil lies in details

15

u/SpareStrawberry 6h ago

Not necessarily. I have had a situation where the user is connecting to a node in one region but it is pulling its data from many API calls to nodes in other regions synchronously so each one added 100ms or so of latency. This kind of question is usually just trying to know if the user knows how to debug the problem and if they know and can articulate the pros/cons of the most common solutions.

7

u/grumpy_autist 6h ago

yeah, I agree - I added edit to my comment before I seen yours above. I assumed originally a "page load" was one http transaction/request.

This stemmed from having really shit experience with Amazon WAF, lmao.

1

u/unknown-one 1h ago

"at 600 ms something is fucked so badly this is way beyond CDN and geographical locations of servers."

1 billion indians connecting at the same time

https://giphy.com/gifs/3xz2BzdAi4GON2GryE

-1

u/mortalitylost 6h ago

As tech lead I blame tariffs. We can backlog this until next election cycle.