A CLI tool for Statically Defined PDSes — ship an atproto account & your lexicons with your wisp.place static site.

feat: notify retries a relay that can't reach the site yet #11

Merged byjp.me
targeting main from notify-retry
Merged opened by and assigned to byjp.me
targeting main from notify-retry

at-sdp notify turned blinkers.dev's deploy red, even though nothing was wrong with the site. bsky.network's requestCrawl gives the site's describeServer about 5 s, and the wisp.place server it was routed to took 7.3 s on a cold file:

400 HostNotFound: host server unreachable: server is not a PDS: Get "https://blinkers.dev/xrpc/com.atproto.server.describeServer": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

A retry 20-odd seconds later went straight through (the relay's own failed fetch seems to have warmed that server up), so this makes notify do that for you.

  • a relay that answers HostNotFound, 429, 502, 503 or 504, or doesn't answer at all, gets asked again every 15 s until the new --timeout (default 1m, to leave room for build, deploy and check in a spindle's 5 minutes)
  • anything else still fails straight away
  • each round asks every relay that hasn't settled yet, so a stuck bsky.network doesn't hold up atproto.africa
  • on timeout you get the relay's last real answer, rather than the "context deadline exceeded" of the attempt that got cut off

As far as I can tell from indigo, a relay rejects the host at describeServer before it counts it against its 50 new hosts a day, so retrying should cost the relay nothing — but I've read that rather than watched it.

The slow cold file is really wisp.place's to fix (relays' firehose dials and did:web lookups have short timeouts too, and this only covers requestCrawl), so I'm getting a fix planned on that side separately.

Commits 0