Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is wonderful to hear. I have a naive question. Is this the reason most websites/web servers absolutely need CDNs (apart from their edge capabilities) because they understand caching much more than a web developer does? But I would think the person more closer to the user access pattern would know the optimal caching strategy.


Most websites do not need CDNs.

CDNs became popular back in the old days, when some people thought that if two websites are using jquery-1.2.3.min.js, CDN could cache it and second site would load quicker. These days, browser don't do that, they'll ignore cached assets from other websites because it somehow helps to protect user privacy and they value privacy over performance in this case.

There are some reasons CDNs might be helpful. Edge capability probably is the most important one. Another reason is that serving lots of static data might be a complicated task for a small website, so it makes sense to offload it to a specialised service. These days, CDNs went beyond static data. They can hide your backend, so public user won't know its address and can't DDoS it. They can handle TLS for you. They can filter bots, tor and people from countries you don't like. All in a few clicks in the dashboard, no need to implement complicated solutions.

But nothing you couldn't write yourself in a few days, really.


Interesting to hear. I suppose then geographical availability while handling cache consistency over the entire world must be a bigger selling point. Offering security with a few clicks of button also seems like a great benefit given a lot of users may not want to engage in best practices. This centralization of security still bothers me though.


> while handling cache consistency over the entire world must be a bigger selling point

Generally they only do caching on a local basis and not across the entire world


Generally by default CDNs don't necessarily cache anything. They just (try to) respect the cache headers that the developer provides in the response from the origin web server

So it's still up to the developer to provide the correct headers otherwise you don't get too much of a benefit

That said some of them will do some default caching if it is recognized as a static file etc


I didn't know this. While reading up on CDNs I was led to believe that they were a revolutionary idea for the kind of fast access we have to the Internet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: