certwarm-wake
New custom domains waited up to an hour for a certificate on a multi-edge deployment (#386). Only the issuer box orders, steering keeps visitors on the other boxes, and the per-host cert warm slept a fixed hour between passes. On the flagship, carlos.international waited from 19:24 to 19:54 UTC on 2026-10-24.
What changes (internal/edge/certwarm.go, edge.go, homemap.go):
- Wake. The warm runs a pass when its set gains a host it has never seen. Wakes come from
Edge.OnReload(now additive, so the wildcard manager keeps its hook) and a newhomeMap.setServedWake(names homed on other boxes). A wake with nothing new, on a non-issuer, or within a minute of the next pass anyway is dropped. - DNS-only probe. A new host whose DNS does not point here yet is re-checked on its own schedule: every minute for 10 minutes, every 5 until an hour, then hourly. The probe reads no outcome records; a full pass runs only once the host points here.
- Order budget. At most 10 new orders per rolling minute across all passes (it was 10 per pass), so wakes cannot spend the shared ACME account faster.
- Gate tick. The loop reads the in-memory issuer lease every minute on an absolute deadline and runs a pass when the lease arrives, so a failover or a refused wake does not wait for the hourly pass.
- Edge set reuse. The DNS gate reuses the deployment's edge set for 5 minutes (30 s for an empty read) instead of re-reading every box's snapshot and edges file per host.
Request budget: no new polling. Between passes: DNS lookups only, plus at most one edge-set read per 5 minutes while a host is pending. A woken pass costs what an hourly pass costs.
Status: Astra review, five rounds, VERDICT: ACCEPT at b5b12cea. Census approved on #280. Merged with main at 41cca5e3. This changes issuer behaviour fleet-wide, so the merge and the roll (dev first) wait for Paul.
Cert warm wakes when its host set grows and retries a new domain's DNS check in minutes, so custom-domain certs issue in seconds instead of up to an hour
Discussions 1 open
Tasks 5/6 done
- certWarm wake channel and run loop: a wake runs a pass only for a new host not backing off Done
- Fast DNS-miss retry for new hosts: 1 min, then 5 min, then hourly Done
- Fan-out reload hook and home-map ServedHosts wake; wire the warm into both Done
- Targeted tests, gofmt, vet, cross-compile Done
- Astra review and fixes Done
Activity
- claude agent, operated by paul@keymail.dev replied to New custom domains wait up to an hour for a certificate: the cert warm is never woken
- task updated: Merged 542ad2c; release + roll dev first, then time a new custom domain's cert
- claude agent, operated by paul@keymail.dev pushed bda1e4247 ci: re-run after internal/dbreads flake (TestADrainingBoxDoesNotPick)
- claude agent, operated by paul@keymail.dev pushed 3533933d1 Merge origin/main (4a9a47c0) into certwarm-wake; census re-proposed
- claude agent, operated by paul@keymail.dev replied to New custom domains wait up to an hour for a certificate: the cert warm is never woken
- claude agent, operated by paul@keymail.dev pushed 41cca5e30 Merge origin/main into certwarm-wake; census re-proposed after #358
- task updated: Astra review and fixes
- claude agent, operated by paul@keymail.dev pushed b5b12ceab edge: cert warm loop reads the gate before a DNS probe (#386)
- claude agent, operated by paul@keymail.dev pushed 54ab8b442 edge: cert warm review round 3 fixes (#386)
- claude agent, operated by paul@keymail.dev pushed 905398dd0 edge: cert warm review round 2 fixes (#386)
- claude agent, operated by paul@keymail.dev pushed f2ccfb856 edge: cert warm review round 1 fixes; census proposal (#386)
- task updated: Fan-out reload hook and home-map ServedHosts wake; wire the warm into both
- task updated: Targeted tests, gofmt, vet, cross-compile
- task updated: certWarm wake channel and run loop: a wake runs a pass only for a new host not backing off
- task updated: Fast DNS-miss retry for new hosts: 1 min, then 5 min, then hourly
- claude agent, operated by paul@keymail.dev pushed cdd17a15d edge: wake the cert warm when its host set grows (#386)
- claude agent, operated by paul@keymail.dev added task Merged 542ad2c; release + roll dev first, then time a new custom domain's cert
- claude agent, operated by paul@keymail.dev added task certWarm wake channel and run loop: a wake runs a pass only for a new host not backing off
- claude agent, operated by paul@keymail.dev added task Fast DNS-miss retry for new hosts: 1 min, then 5 min, then hourly
- claude agent, operated by paul@keymail.dev added task Fan-out reload hook and home-map ServedHosts wake; wire the warm into both
- claude agent, operated by paul@keymail.dev added task Targeted tests, gofmt, vet, cross-compile
- claude agent, operated by paul@keymail.dev added task Astra review and fixes
- claude agent, operated by paul@keymail.dev opened New custom domains wait up to an hour for a certificate: the cert warm is never woken