Based on Varnish Cache (open source). This started as the simplest CDN running on fly.io for changelog.com
You are welcome to fork and build this your own. OSS FTW 💚
🧢 Jerod Santo - March 29, 2024 - Changelog & Friends #38
- ✅ Static backend, 1 day stale, stale on error, x-headers - Initial commit
- ✅ Dynamic backend, cache-status header - PR #1
- ✅ Add tests - PR #3
- ✅ Make it easy to develop locally - PR #7
- ✅ Add support for TLS backends, publish & deploy to production - PR #8
- ✅ Add Feeds backend - PR #10
- ✅ Add Assets backend - PR #11
- ☑️ Send logs to Honeycomb.io (same structure as Fastly logs) - JSON logging
- ☑️ Send logs to S3 (for stats)
- ☑️ Add edge redirects from Fastly service
- ☑️ Implement purge across all app instances (Fly.io machines)
While it's fun watching other people experiment with digital resin (varnish 😂), it's a whole lot more fun when you can repeat those experiments yourself, understand more how it works, and make your own modifications.
You can find some instructions and notes for kicking the tires and developing & testing this locally.
A few other commands that you may be interested in:
# Requires https://github.com/casey/just
just
Available recipes:
debug # Debug container image interactively
how-many-lines # How many lines of Varnish config?
how-many-lines-raw # How many lines of Varnish config?
http-profile url="https://pipedream.changelog.com/" # Observe all HTTP timings - https://blog.cloudflare.com/a-question-of-timing
shell # Open an interactive shell for high-level commands, e.g. `test`, `debug | terminal`, etc.
test # Test everything
test-acceptance-cdn *ARGS # Test remote CDN
test-acceptance-cdn2 *ARGS # Test remote CDN2 (a.k.a. Pipely, a.k.a. Pipedream)
test-acceptance-local # Test local CDN
test-reports # Open test reports
test-reports-rm # Clear test reports
test-vtc # Test VCL config
[team]
cert fqdn # Add cert $fqdn to app
certs # Show app certs
deploy tag="dev-$USER" # Deploy container image
envrc-secrets # Create .envrc.secrets with credentials from 1Password
ips # Show app IPs
machines # Show app machines
publish tag="dev-$USER" # Publish container image
restart # Restart ALL app machines, one-by-one
scale # Scale production app
status # Show app status
# Run the tests
just test
If you have any ideas on how to improve this, please open an issue or go straight for a pull request. We make this as easy as possible:
- All commits emphasize good commit messages (more text for humans)
- This repository is kept small & simple (single purpose: build the simplest CDN on Fly.io)
- Slow & thoughtful approach - join our journey via audio with transcripts or written
See you in our Zulip Chat 👋
Note
Join from https://changelog.com/~ . It requires signing up and requesting an invite before you can Log in
- James A Rosen, Staff Software Engineer
- Matt Johnson, Senior Site Reliability Engineer
- Nabeel Sulieman, Staff Software Engineer