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 multiple independent origin targets 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 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.
Simple Protection Setup
Use a domain's Security Center when the operator wants outcomes such as a Basic Website, WordPress, API, SaaS App, E-commerce, or Emergency Protection profile without writing WAF, rate-limit, or cache rules by hand. Profiles compose the same protection intents used by the simple controls, including WordPress hardening and checkout protection where those profiles need them, and the Security Center previews generated technical rules before enabling a profile or individual intent. The advanced tabs remain available for advanced inspection, detach, edit, and override workflows.
Certificate Workflow Testing
Use staging ACME directory values, the bundled PowerDNS stack or a controlled DNS provider, and a test domain. Validate DNS-01 challenge publishing before using production ACME.
Dashboard QA
Use dashboard typechecking, unit tests, and a production build before manually testing browser workflows.
cd dash
npm run typecheck
npm test
npm run buildLearn 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. |
Multi-Origin Migration
Use CDNLite origins to test a new backend while the current one remains available.
- Add the current backend as an origin.
- Add the new backend as another origin for the same host.
- Run health checks on both.
- Send staging traffic with a dedicated test hostname.
- Watch
X-CDNLITE-Origin, origin health, error rate, and cache hit ratio. - Keep both origins enabled until the migration is stable.
Rollback is simple: disable the new origin 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.
