Use Cases
Learn CDN Internals
Run the local Compose stack, add a domain, point a test Host header at the edge, and watch how config snapshots affect OpenResty behavior.
Useful views:
DomainsConfig SnapshotsUsage AnalyticsSecurity Events
Local CDN Lab
Use origin-http and origin-tls from Compose to test routing, TLS, cache, redirects, and backup origin behavior without touching real infrastructure.
Validation:
./ci/smoke.sh
./ci/e2e.shDNS Publishing Practice
Run the PowerDNS profile and validate customer zones, platform edge DNS, anycast values, and Geo DNS settings through the mock.
docker compose --profile powerdns up -d --build
./ci/powerdns_dns_checks.shSmall Private Edge
Deploy core, dashboard, and PostgreSQL to a trusted private host, then deploy one or more edge containers with unique EDGE_ID and EDGE_TOKEN values.
Minimum production checklist:
- External TLS.
- External dashboard auth.
- Strong
CDNLITE_API_TOKEN. - Bootstrap disabled.
- Per-edge token rotation process.
- Database backups.
Security Rule Testing
Create WAF, IP, rate-limit, and header rules on a test domain, then send controlled traffic to validate block/challenge/log behavior.
Watch:
- Domain security events.
- Global security summary.
- Edge logs.
- Audit log entries for rule changes.
Certificate Workflow Testing
Use staging ACME directory values, PowerDNS mock or a controlled DNS provider, and a test domain. Validate DNS-01 challenge publishing before using production ACME.
Dashboard QA
Use dashboard unit tests for API client and form behavior, then use Playwright e2e tests for browser workflows.
cd dash
npm run typecheck
npm test
npm run test:e2eLearn CDN Internals: Exercise Plan
- Create a fake domain such as
example.test. - Add an origin pointing to the local origin mock.
- Add a proxied DNS record.
- Activate with override in the lab.
- Pull edge config.
- Send traffic with
curl -H 'Host: example.test'. - Inspect
edge/config/config.json, edge logs, config snapshots, and usage analytics.
What to observe:
- Unknown hosts fail before origin selection.
- Config snapshots change only after control-plane state changes.
- Edge metrics are queued locally before the agent pushes them.
- Cache headers explain most surprising edge responses.
Local CDN Lab Experiments
| Experiment | What it teaches |
|---|---|
| Disable the origin | Difference between origin failure, stale cache, and unknown host. |
| Add a redirect | How rule evaluation changes the response before proxying. |
| Set a short cache TTL | How cache hit ratio changes during repeated requests. |
| Add a WAF log rule | How security events flow from edge to dashboard. |
| Roll back a config snapshot | How edge config is recovered without database rollback. |
Blue-Green Origin Migration
Use CDNLite origins to test a new origin while the old origin remains available.
- Add the current origin as primary.
- Add the new origin as backup.
- Run health checks on both.
- Send staging traffic with a dedicated test hostname.
- Promote the new origin to primary during a low-traffic window.
- Watch
X-CDNLITE-Origin, origin health, error rate, and cache hit ratio. - Keep the old origin as backup until the migration is stable.
Rollback is simple: make the old origin primary again and rebuild/pull config.
Incident Response Drill
Practice this before production:
- Break an origin health check intentionally.
- Confirm readiness warnings appear.
- Confirm the dashboard and API show the failed origin.
- Restore the origin.
- Re-run health checks.
- Write down exact commands and response fields that were useful.
The goal is to make the first real incident boring.
Certificate Workflow Checklist
- ACME contact email is valid.
- DNS provider settings are tested.
_acme-challengerecords are DNS-only.- Propagation wait is realistic for the provider.
- Renewal scheduler is running.
- Manual certificate import is tested as a fallback.
Dashboard QA Checklist
- Login/logout and session refresh behavior.
- Domain creation and validation errors.
- Wide tables on narrow screens.
- Empty states for every major view.
- API failure alerts and field errors.
- Theme-aware charts and readable tooltips.
