The objective of this repo is to build a body of knowledge on how CDNs work by coding one from "scratch" The CDN we're going to design uses: nginx, lua, docker, Prometheus, grafana, Grafana and wrk. We'll start creating a single backend service and expand from there to a multi-node, latency simulated.
Table of contents
What is a CDN?Why do you need a CDN?How does a CDN work?The CDN stackNginx - quick introductionBackend service confCDN 1.0.0 Demo timeAdding caching capabilitiesAdding metricsRefactoring the nginx confProxyingCachingMonitoring ToolsSimulated Work (latency)Load TestingLearning by testing - let's change the cache ttl (max age)Fine tunning - cache lock, stale, timeout, networkFrom normal to long tail distributionRouting challengesMiscellaneousConclusionSort: