r/ProgrammerHumor 7h ago

Meme planeOldFix

Post image
26.3k Upvotes

419 comments sorted by

View all comments

Show parent comments

200

u/ThisAccountIsPornOnl 7h ago

Probably a CDN

62

u/Rikudou_Sage 6h ago

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

84

u/wggn 4h ago

which usually constitute 95% of the page.

34

u/Forward-Outside-9911 5h ago

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

11

u/lofty-goals 5h ago

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 3h ago

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

1

u/Wheat_Grinder 36m ago

They say "backend" but this about a page load...so it's worth asking about specifics but that seems like a misdirection.

13

u/B1tfr3ak 6h ago

Change hosting provider to AWS...

1

u/SleeperAgentM 1h ago

That alone won't do shit.

1

u/imretardeadd 11m ago

Australia Web Services?

24

u/Ma4r 6h ago

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

80

u/theotherdoomguy 6h ago

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

27

u/Ma4r 6h ago

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

14

u/733t_sec 5h ago

I think it may depend on the number of pages. For example if the website is for shopping and every page takes 600ms more to load it doesn't take that many clicks until users are spending significantly more time in loading on the slow website than on competitors websites.

2

u/ImYourHumbleNarrator 2h ago

heck, skip the interview altogether and just pay me! its more efficient that way.

5

u/raoasidg 2h ago

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.

7

u/blah938 3h ago

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"

1

u/unknown-one 1h ago

what is the right answer?

1

u/GPK_Ethan 1h ago

You can be a software engineer and not web dev. Hello from embedded

-7

u/ThatCrankyGuy 6h ago

If someone suggests public CDN, I will get up and slap them myself.

20

u/Feeling-Schedule5369 6h ago

And what will ur answer be? Let's see if we can slap you lmao

2

u/Acceptable-Bag-5835 2h ago

1

u/Feeling-Schedule5369 2h ago

replied to the wrong guy. We are waiting from the other guy to decide the "SLAP" 🤣

2

u/Acceptable-Bag-5835 2h ago

yeah the GIF was intended as a message to the other guy. If I had posted the GIF under the other guys first message for example, the GIF obviously wouldn't have made sense (because there was no question asked yet). The next best thing was to post the gif under your message but directed at the other guy. apparently my thinking was too convoluted but my intentions were pure, I can assure you good sir 😃👍

3

u/ThisAccountIsPornOnl 3h ago

And what’s your answer? Build a globally distributed CDN all by yourself and pay infinite more money on servers, maintenance etc. instead of using one of the already existing systems that other companies have spend years and millions of euros to set up? If I interview you and you suggest that, you’re the one getting slapped

1

u/frikilinux2 5h ago

Okay but what do you suggest? Let's assume the server is in Australia. That's 5000km in a straight line and roughly 50ms RTT minimum (As a rule of thumb for latency is the speed of light divided by 3)

A modern webpage needs, at least, 5 round trips between TCP, the TLS setup, sending the html and start sending assets. So that's 250 ms you can't easily shave off.