3 ms·
This is not a CDN: Content Delivery Network. The value is in the networking bit. Storage all around the world for both resiliency, bandwidth cost, scalability,
by rahkiin 2y ago
This is not a CDN: Content Delivery Network. The value is in the networking bit. Storage all around the world for both resiliency, bandwidth cost, scalability, and low latency.
Having 1 server with some static file storage is called a web server.
- jeroenhd 2y agoAdding Varnish makes it more than just a web server for static files, it also caches content created by the web server. This can be very useful for things like on-the-fly image resizing, which some blogs seem to do (requesting paths like /images/image.jpg/100x40/... based on the reader's device size). Still not really a CDN, though.
- rollcat 2y agoWhether you do image resizing (or other CPU-bound tasks) ahead-of-time or just-in-time is an extremely important design decision, that needs to consider the needs of the application, available hardware resources, traffic patterns, etc - you shouldn't leave it to what is essentially random chance (maybe it's in the cache, maybe it isn't) without considering all of the above - unless you have a low-traffic blog that can get away with anything. Yes I was burned really badly by this in my young days ;)
- benterix 2y agoAs it is, the article is a bit confusing because it's the third one in the series just focusing on NetBSD. The original one[0] offers a better context, especially this bit: > The idea is to create reverse proxies with local caching. These proxies would cache the content on the first request and serve it directly afterward. The proxies would be distributed across different regions, and the DNS would route requests to the nearest proxy based on the caller’s location. All this is achieved without relying on external CDNs, using self-managed tools instead. [0] https://it-notes.dragas.net/2024/08/26/building-a-self-hosted-cdn-for-bsd-cafe-media/ https://it-notes.dragas.net/2024/08/26/building-a-self-hoste...
- draga79 2y agoTrue - thank you for pointing out. I've modified the article, I think it's clearer now.
- thelastparadise 2y ago> DNS would route requests to the nearest proxy based on the caller’s location Anycast is the proper way to do this. No geolocation required, just dynamic routing protocols optimizing for shortest path.
- draga79 2y agoSure, but Anycast requires specific investments, ASN, IP blocks, etc. This solution can be implemented using cheap VPSes in a few minutes.
- _cenw 2y agoNot to mention that Anycast and TCP can have some fun edge cases for users with chaotic routing and you also need to figure out how to do sticky L4 sessions / forwarding, which can be hell to debug. (Or you could just ignore those users when they complain, PlayFab sure does.)
- otabdeveloper4 2y agoThere's no such thing as "anycast". For IPv4 there is only BGP. And BGP is not viable for a rented server and IP address, unlike running a DNS server.