-
Notifications
You must be signed in to change notification settings - Fork 333
update ssb-conn to 0.15 #1242
update ssb-conn to 0.15 #1242
Conversation
|
LGTM, thanks for this patch! |
|
I'm particularly excited about |
|
Re I'm worried about scenarios like...
E.g. will this work well in a world of peers and pubs that are not part of the globally connected internet? One solution could be: when we hear a feed mention a pub, make it un-defunct. Since the feed mentioned it, it's probably still alive, we just can't reach it right now. |
I'd say that does not really apply to pubs. Many people just try following them because they don't understand the invite system, or they try an old invite and it never follows back. But I do agree that any sign of life should reactivate the pub in conn.json. Usually that would mean a message that we see from the pub. There's also the scenario of a pub just not being on 24/7. Think solar-powered rPi pub. So setting The Right Value ™️ for this is important. I'm already quite concerned about silent fracturing of the network due to undetected communication/gossip inhibition. This has the potential to lighten the work on the client, but it's important to make sure it doesn't prevent gossip from happening. That all being said: thank you @staltz for this. I'm particularly happy about the self-healing. It's super important to improve robustness, or else we'll have to rely on out-of-band support on this here very technical platform for helping potentially very non-techy users. 👍 |
The count is the number of failed-to-connect events since the last succeeded-to-connect event. ssb-conn (like ssb-gossip before) puts an exponential backoff timeout between the attempt-to-connect events. So the more failures, the longer the timeout lasts, and this can be something like hours. (It has a maximum timeout). And it doesn't happen "every X hours" consistently, because if there is another quicker attempt-to-connect to another pub, then we don't even try the failed one. All this is to say that I believe "soon-defunct pubs" (e.g. failure count at 150) are attempted-to-connect every ~24 hours or so, supposing that you have the SSB app online during all those 24 hours. So the failure count would go up to 200 in my opinion in about 200 days or maybe even a whole year. I think it's reasonable to assume that if a pub couldn't be connected after hundreds of times in a year, then we consider it defunct.
If you are truly offline (don't have an ethernet or wifi network interface active), then those pubs won't even be attempted-to-connect to begin with, so their failure count would not get incremented. Even if they would be attempted-to-connect, I believe that in a month the count would go up by maximum 50.
Same as above.
If you're offline occasionally, and if the pub succeeds-to-connect when the failure count is (say) 120, then the failure count would reset immediately back to zero.
Yes. On the other hand, regarding network partitions in general, suppose you are in China, and because of the Great Firewall, suppose you can't connect to pubs in the US. In real life, whether a person is dead or whether they now permanently live (they are alive!) on Jupiter, doesn't really matter to you because they are out of your reach, therefore defunct.
This is a really good point, I think a mention of a pub at time X, supposing it got defunct at time Y, and supposing |
|
@cinnamon-bun I was so wrong about
|
|
FWIW I think Sami mentioned this problem where they aren't connecting to anyone anymore without using an invite or something. If you ping me when the hotfix is ready I can release a new Patchwork ASAP. |
|
@staltz Thanks for answering my worries! I apologize for posting them as a wall of questions like that, I wish I had expressed more gratitude. ❤️ Overall there's no way to know if something is truly dead or just not visible to us for a long time. I agree it makes sense to give up after a long time, I'm just worried that it's permanent. Maybe if defunct peers were still attempted once a month, or something, that would be more resilient. |
This is mostly a small update to ssb-conn, here are some highlights (from most relevant to least):