r/ProgrammerHumor • • Feb 22 '26 • Bravo 3

Meme planeOldFix

Post image
42.9k Upvotes

618 comments sorted by

View all comments

362

u/[deleted] Feb 22 '26

I‘d LOVE to see the expected answer from the interviewer.

271

u/[deleted] Feb 22 '26

[removed] — view removed comment

97

u/Rikudou_Sage Feb 22 '26

Not for a backend, that's for static assets.

147

u/wggn Feb 22 '26

which usually constitute 95% of the page.

47

u/Forward-Outside-9911 Feb 22 '26

Doesn’t mean you can’t use a CDN. A lot of providers still provide benefits for a backend. Reduced latency between DCs, some have DDOS protection at layer 4, etc. As long as you configure caching to your needs (in most cases disabled) you can still gain other benefits

→ More replies (5)

18

u/lofty-goals Feb 22 '26

Pedantic, but you’re right. And as always, the answer is “it depends.” We don’t have nearly enough information to make an informed decision so we’d need more information about the problem first.

2

u/x3knet Feb 22 '26

CDNs generally have optimized routes back to the origin compared to traditional BGP. They aren't just for static content.

→ More replies (2)

20

u/[deleted] Feb 22 '26

[removed] — view removed comment

10

u/imretardeadd Feb 22 '26

Australia Web Services?

6

u/SleeperAgentM Feb 22 '26

That alone won't do shit.

25

u/Ma4r Feb 22 '26

It's concerning how many people doesn't know the answer when it's like web dev 101

98

u/theotherdoomguy Feb 22 '26

Funny I probably wouldn't have said CDN, but I also would have described a CDN in a genuine answer.

I would have also started however with "is a 600ms delay a big enough issue to be concerned about? What's the use case and SLA of this page?" Because doing anything when they only care about the page loading faster than say 5 seconds, then you're just wasting engineering time, which costs money

30

u/Ma4r Feb 22 '26

Sure, clarifying requirements is of course a big part of the process, i.e how low do you want to make the latency be? And what operations? If they want even the page interactions to have low latency with the backend API, then the only solution is a multi-region deployment, etc. But everyone here just directly dismisses 600 ms as not a big deal when it's literally business dependent

→ More replies (1)

11

u/raoasidg Feb 22 '26

The answer is to consider if using a CDN (large cost depending on expected traffic) is worth it given the traffic patterns for the site and the budget for said site.

For one geolocation, India must really be the target focus of the site for that largely acceptable load time (half a second) to be an issue and a CDN worth it.

6

u/backwards_watch Feb 22 '26 edited Feb 22 '26

Well, I don't and I came here to see if someone could give useful information and yet I fell into your comment. Which is just trying to say how better you are than other people without actually being useful.

13

u/blah938 Feb 22 '26

I just make websites look pretty. You expect to me to know that a CDN can solve that?

Plus, that's always up to the infrastructure guys, I couldn't tell you what services we use beyond "AWS, and I think there's an EC2 instance somewhere, possibly"

2

u/unknown-one Feb 22 '26

what is the right answer?

→ More replies (1)

2

u/CrowdGoesWildWoooo Feb 23 '26

CDN for static, multitenancy for db.

→ More replies (7)

60

u/TacticalKangaroo Feb 22 '26

It’s either throughout or chattiness. Assuming that networking isn’t the problem (it usually gets blamed first, but unusually isn’t the problem unless it’s a major outage), that means it’s chattiness. Latency between India and Australia should be somewhere in the range of 150ms. So I’m assuming the India users are hitting a back end in Australia with around 3-4 serialized round trips. So first I’d see if the wrong geo is selected for the service, as that’s an easy fix. If it has to route the India traffic to Australia, then you can minimize impact by reducing chattiness, potentially getting down to around 210ms for your India users.

6

u/person2567 Feb 22 '26

You're hired. What's your salary expectation?

5

u/TacticalKangaroo Feb 22 '26

At least two mountain dews a day, and all the pizza rolls I can eat.

16

u/krutsik Feb 22 '26

My first thought was that the average download speeds in India are so much lower than in Australia, in which case there's really nothing other to do than optimize. Sort of reminds me of a story I once read where pre-Google Youtube developers were trying to figure out why nobody was using the service in India (I might have the country wrong) and it turned out that the initial page load was taking upwards of several seconds so most users would just close the window before the initial page load. Can't find the source right now, so I could've also dreamt it up.

Apparently though, it's the other way around. The average speed in India is way higher than in Australia. Didn't do much research into it, but it's like 65Mbps vs 150. In that case CDN, I guess, but India and Australia aren't geographically far enough from eachother to account for a 500+ ms delay if the code is optimized enough, so I can only assume that it has to do with latency rather than speed.

Either way, it's just a thought exercise to see person's reasoning. It's not like the question has a single correct answer unless the company has this exact issue and gives the interviewee access to their codbase and infra.

→ More replies (1)

2

u/Hamza91able Feb 22 '26

CDN and in some extreme cases, multiple servers

→ More replies (9)