How to build your own CDN with Kubernetes
blog.insightdatascience.com
blog.insightdatascience.com
1) It might have bugs. You are trusting someone else to run the infrastructure.
2) They might choose profits over customer experience "because they are a business".
3) They might capture and sell/leak metadata on where/when your customers visit your site.
The author then goes on to describe using Route 53 and Amazon EKS to deploy your own CDN. (Which doesn't seem to address points 1, 2, or 3 at all?)
There's not a single mention of Cloudfront.
Something doesn't add up here.
The kube part, to me, seems superficial and insubstantial.
It’s hard to imagine that any distributed solution could compete on first byte and overall latency; CloufFlare is too amazing at that. I really wish you could just check out my site to your device and receive a stream of updates, maybe as a micropayment per update for web publishers. That way content procurement is a one-time affair for the consumer, and ongoing consumption is billable in bites/bytes, not by monthly subscriptions. What if you could distribute source binaries for micropayments as well, funding bandwidth and development efforts with fees associated with actual use? Damn, there I go sounding like a blockchain pitch again.
I see the publishing industry running towards membership models and quickly going to be warring over a diminishing wallet share. Apple now looms large. Something has to be done, or FANG efforts to ‘help the news industry’ will result in greater control of media consumption at every level. Bloody megacorps deciding how to optimize their Q4 with our brains.
Does working with a commercial CDN the best for the web we want to give to our grandkids?
Seeing a big player showing up and offering ‘free protection’ reminds me of The Godfather. And how gets hurt when they need to raise Series F?
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.
It most has to do with freemium. Cloudflare started in the era where many were perfectly happy with "free" and had not much thought about it. Today many finally realise "You are the Product if you are not paying for it.", even if it was for upsell. But before this phase was coined or widely known, I was very wary of anything that is "free". And one reason why I was sceptics as well when Domain Registration are operated in similar fashion, I would much rather knowingly that Cloudflare made $1 - $2 per Domain per year than something being subsidise one way or another.
It also give you choices, instead of going Business or Enterprise for Minimum cache expiry time, or other features. Customer gets to decide what they want. Pricing is crystal clear and there is no need to play guess games or contact sales. Especially when everyone today are now very accustom to AWS.
I don't know how many are in the same bloat. But judging Business from other CDN competitor I guess there are few who prefer to be on metered plan. That is why I suggested a Sub Brand. Another Services offering using the same Network.
Bandwidth and latency are the main concerns or a CDN, and this approach addresses latency, but completely ignores bandwidth. Honestly, a CDN is probably one of the worst possible applications that could be built on AWS (or any other cloud hosting provider) simply due to the extreme bandwidth costs. EC2 egress costs are already an order of magnitude greater than Cloudfront costs, and not even fairly comparable to non-"cloud" options.
Basically, if you want a build a CDN, the cloud providers are horrible options, whether you use Kubernetes or not.
> edited for formatting
Just to be clear: AWS/DO are horrible options, but Cloudfront is a good option?
I'm not making any claims here about whether or not Cloudfront is better or worse than any other CDN, but can be a perfectly valid choice if you're already within the AWS ecosystem and need a CDN.
Also the EC2 outbound bandwidth cost... this is not a good idea compared to using other solutions.
Maintaining low latency connections with all the networks in the world is no easy task.
LinkedIn has what I think some good CDN blog posts https://engineering.linkedin.com/performance/how-linkedin-us... https://engineering.linkedin.com/network-performance/tcp-ove...