Why did I do this? Well, I read this article and thought it looked neat. Then, a friend built one, following that blog. I had $150 per month in Azure credit from interning at Microsoft, so I decided to replicate it in Azure.
The CDN consists of five nodes. The Master server is located at RIT and is not reachable though the CDN. It servers as a coordinator for the edge nodes. The edge nodes are Standard B1s Virtual Machines with 1 vCPU, 1GB of RAM, and 32GB of SSD storage located in the West US 2, East US 2, UK South, and SouthEast Asia regions.
Files are distributed automatically over SFTP with the help of a bash script that is registered as a systemd service. The script uses
inotifywait to check for file changes, and
rsync to send all changes to edge nodes.
A Traffic Manager configured to route based off geographic location ensures users get the nearest server, and handles failover in the event a server goes down.
I tested the CDN with apex.sh's latency tester. elite.tips is backed by cloudflare, and my CDN is comparable in most regions. For a system that I built for fun, I'm very happy with that.