3 ms·
Could someone explain me as someone relatively clueless in web matters. I've heard an opinion recently that CDNs are not useful any more. Why would that be the
by oytis 4y ago
Could someone explain me as someone relatively clueless in web matters. I've heard an opinion recently that CDNs are not useful any more. Why would that be the case?
- ThePhysicist 4y agoMaybe this was mentioned in the context of embedding third-party resources via CDNs? Until recently people would e.g. often include jQuery from a CDN host, and given that many websites use the same jQuery script browsers would have that file in the cache already, making the site load faster as the browser can use the local version of the file instead of loading it again. Recently browsers started partitioning caches on a domain level, i.e. each second-level domain has it's own cache, so even if jQuery is cached for foo.com the browser won't use that cache if bar.com also requests that exact same file. The reason for that is that people started abusing browser caches for tracking. That said CDNs are still very useful for a range of functionality such as geographic distribution of content, reducing load to origin servers, DDoS protection and many other applications.
- senttoschool 4y agoIt's more useful than ever. For example, the entire Vercel product is deployed on CDNs for static files and Lambdas for functions. I'm pretty sure all static hosts use a CDN for all their customers' files as well.
- eddieroger 4y agoCDNs are definitely useful still, maybe more so as more and more of the world has access to the Internet. Ultimately all of everything we do online is transmitted as 1s and 0s over some sort of wire, and the best we can do at moving those 1s and 0s is the speed of light. Since distance is a factor and light only moves so fast, it is better to have your content closer to your users than not to get around the speed of light problem. Likewise, while servers can handle a lot of load these days, they can't handle infinite load, and it's nice to spread that work out amongst many machines - many hands make light work. A CDN solves both of these problems by holding and serving copies of your content around the world, near your consumers and off your server. If you hosted on a server in the US but served to a customer in Europe, you can save having to go across an ocean by using a CDN. As a front end developer, the static bits of a modern website can be almost entirely hosted in a CDN, leaving only much smaller JSON data that has to go back to origin - but there again, only sometimes if you design your content for caching. You can also do clever things like keep bad guys out of your network by letting the CDN take the brunt of the load, and sometimes tossing it altogether so it never nears your origin.
- cagenut 4y agountil we figure out how to break the speed of light, having data physically closer to the user will always matter
- onion2k 4y agoI've heard an opinion recently that CDNs are not useful any more. In the past devs would use a CDN delivered asset in the hope that it was already in the user's cache from a visit to a different website that uses the same CDN, meaning it wouldn't need to be downloaded again. That meant you got a little speed boost. Today browsers partition their caches so you can be absolutely sure the user doesn't have any of your website's assets in their cache if they've not visited before. This actually makes CDNs more important rather than less, because you want to deliver everything from the closest possible location to the user. That means you need a CDN. Essentially the focus of CDNs has shifted away from Content, and now it's all more about Network.