Architecture data flows
Authoritative DNS
- A resolver sends UDP or TCP DNS to DNSdist.
- DNSdist selects the first available private PowerDNS backend.
- PowerDNS reads the derived runtime database.
- Geo-DNS Lua records consult the local memory-mapped MMDB and EDNS Client Subnet when present.
- DNSdist emits best-effort dnstap to Vector after answering.
Laravel is absent from this path.
Customer HTTP and HTTPS
- DNS returns a listener-ready pool address.
- The client connects to the assigned OpenResty cell.
- OpenResty rejects unknown hosts and selects the certificate from runtime data.
- Lua resolves the trusted client address, applies pool/domain maintenance, ordered security rules, profile ceilings, cache policy, and origin policy.
- A cache hit returns locally; a miss uses the explicitly configured origin.
- Access telemetry goes directly to Vector.
Laravel and ClickHouse are absent from the serving decision.
Runtime mutation
- The API or Filament action validates and commits desired state.
- A revision and audit event are recorded transactionally.
- A unique job renders DNS RRsets or a canonical edge snapshot.
- The target validates and activates the candidate.
- Deployment rows, tasks, and operations record acknowledgement or failure.
See Desired state for failure behaviour.
Edge enrollment and sync
- An administrator creates the edge and receives a one-time token.
- The agent opens an outbound connection to
EDGE_CONTROL_URL, creates a private key, and submits a CSR whose common name is the edge UUID. - Edge control validates the token and signs a short-lived identity certificate.
- Later requests require that certificate and its serial.
- The agent polls for tasks and fetches the manifest or a full recovery snapshot.
- It verifies, compiles, atomically activates, then acknowledges.
- Heartbeats report sequence, listener readiness, cell capacity, origin health, and bounded security summaries.
Laravel and its workers never initiate a connection to an edge host. They commit desired state, artifacts, and durable tasks; the agent pulls them over its outbound control connection and posts results. Therefore an edge does not need an inbound management address for control delivery.
Pool routing
Geo-Unicast stores a distinct address pair on each edge/pool endpoint and renders country, continent, and global fallback data. Simple Anycast stores one pair on the pool; every attached ready edge receives the same binding and DNS publishes that pair while any endpoint remains ready. The operator/provider is outside this activation flow and exclusively owns BGP advertisement, withdrawal, and route evidence. CDNFoundry has no router credential or command path.
Managed TLS
- An active, nameserver-verified domain gains its first proxied hostname.
- A bounded certificate job creates or reuses the ACME account.
- DNS-01 challenge TXT records are added to desired DNS and reconciled.
- Issuance waits for DNS acknowledgement before notifying the CA.
- The validated key and certificate are encrypted/stored, then included in a new edge revision.
- Challenge state is removed through another DNS revision.
DNS-only domains do not create orders.
Telemetry
OpenResty sends JSON logs to Vector; DNSdist sends dnstap. Vector removes authorization, cookies, bodies, and query strings, bounds field length, and writes ClickHouse. The API queries raw data for at most 24 hours and aggregates for at most 90 days. Usage rollups are finalized into compact PostgreSQL rows.
Independence rule
Telemetry is downstream of serving. Bounded buffers may sacrifice telemetry when exhausted, but telemetry backpressure must never enter DNS or HTTP paths.