Re:How to build your own CDN with Kubernetes
by toast0 on Wednesday March 27, 2019 @01:34AM
(#19498395)
If you don't trust the commercial CDNs to not mess with your stuff, I don't think you can trust random volunteers either. Maybe if you serve your dynamic content directly, and use http subresource integrity to reference the volunteer CDN?
Building a basic CDN is fairly simple, although doing it well is a challenge. You need to get cache servers near users, ideally in ISP networks, but connected nearby internet exchanges works well enough until you have enough traffic to work with ISPs. It might not be the most cost effective, but the cloud providers have decent coverage, so you don't have to figure out on the ground operations around the world (although coverage in Africa is slim).
Assuming you have the servers everywhere, they need decent connectivity to your origins, at least if you have a lot of changing content. If connectivity is bad, you may want to route static, cacheable data to local servers, and dynamic pages to your origins; but it connectivity is good, you might want to proxy dynamic traffic to get local termimation of tcp / tls.
Then you need to direct users to the best cache for them, or at least a good one. There are lots of DNS providers that can do this, the concept is simple though, there might be something off the shelf to get started with. The cool kids use Anycast for this, but I don't know how accessible that with just cloudservers.
Building a basic CDN is fairly simple, although doing it well is a challenge. You need to get cache servers near users, ideally in ISP networks, but connected nearby internet exchanges works well enough until you have enough traffic to work with ISPs. It might not be the most cost effective, but the cloud providers have decent coverage, so you don't have to figure out on the ground operations around the world (although coverage in Africa is slim).
Assuming you have the servers everywhere, they need decent connectivity to your origins, at least if you have a lot of changing content. If connectivity is bad, you may want to route static, cacheable data to local servers, and dynamic pages to your origins; but it connectivity is good, you might want to proxy dynamic traffic to get local termimation of tcp / tls.
Then you need to direct users to the best cache for them, or at least a good one. There are lots of DNS providers that can do this, the concept is simple though, there might be something off the shelf to get started with. The cool kids use Anycast for this, but I don't know how accessible that with just cloudservers.