Why Nostr? What is Njump?
2024-11-17 17:20:05

Jeff Martin on Nostr: Small update for the SmolWeb network: Host connections to the beacon server would ...

Small update for the SmolWeb network:

Host connections to the beacon server would eventually die for some reason, usually after several days of perfectly good uptime. Apparently the TCP keep-alives weren't enough to keep the network connection going. :blobcatgooglyshrug:

This resulted in a weird case where the host would try to reconnect to the beacon but would get rejected because the beacon thought it still had a connection for that host. That ended up being a terminal state, so the host could never reconnect and would be offline permanently. Not great. :blobcatfacepalm2:

To fix it, I had to add an application-level keep-alive so the beacon server would actively look for broken connections and prune them. Typical ping pong stuff, nothing fancy, but it seems to work ok for now.

Hosts have already been able to reconnect to beacons after all kinds of network disruptions. Like either side rebooting (say, after automatic OS updates).

But now, hosts can recover from mysterious TCP connection deaths too. :blobcatcheer:

Hopefully that means my host will stay online for weeks at a time now without me needing to poke things anymore. We'll see what happens.
Author Public Key
npub1fvr2n9j4qek28cdpnmxyh4w9l4ws7yr2xxdge7eug99al70p0snspwm20t