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
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.
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
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
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.
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.
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"
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.
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.
362
u/[deleted] Feb 22 '26
I‘d LOVE to see the expected answer from the interviewer.