4 ms·
CDNs are just reverse proxies. Cloudflare was built around nginx (though they have now developed their own reverse proxy) and so do most CDNs. Fastly uses Varni
by phillipseamore 4y ago
CDNs are just reverse proxies. Cloudflare was built around nginx (though they have now developed their own reverse proxy) and so do most CDNs. Fastly uses Varnish. A few use Apache Traffic Server. A correctly configured nginx can easily manage caches by various rules like minimum hits, maximum age etc.
- hknmtt 4y agoi was thinking about doing just that - when request comes, check local file, if not present, fetch from remote url. but the problem is with large files(GBs) that you cannot serve as fast and the client has to wait instead of being redirected to the source which bypasses the cdn node and then what? you have to somehow get the large files too in a way that makes sense.
- hknmtt 4y agoafter a bit more thought, you are right. this is the right approach. i just need to make sure the file is being fetched only once and if client closes the connection the file needs to keep being downloaded.