3 ms·
how is adding things like caches adding a CDN?
by heroic 13y ago
how is adding things like caches adding a CDN?
- buro9 13y agoI probably should have clarified that by caches I mean reverse proxy caches that can take up the work of serving static resources from the network edge. The combination of adding caches and distributing those caches is to add a CDN. You add caches to stop the request reaching a backend and doing the work twice, for optimisation. But in effect they become defensive shields as serving a static file or an in-memory file is less work and can be handled in far greater numbers than doing the work on the backend, and if one cache is attacked users accessing other caches elsewhere in the world continue to get their requests served. If you then place a cache at every point at which your site is surfaced, for example you use DNS anycast to have your front-end appear to be surfaced from every Amazon datacenter and the closest one is nearly always selected... then you've helped stop requests at the first opportunity and to return them from a place which can handle far greater requests. You've increase your network capacity, increased the ability to serve valid requests, and you've prevented all of that traffic reaching the backends. And in doing all of this... placing caches for static resources throughout the world and using DNS anycast to return the cached item from the closest peer... well, you have created a CDN. A primitive one for sure, but it still is one.