I recently migrated my project from using ws-stardust as a rendezvous point to trying to use some custom circuit-relay based cloud servers. Everything went pretty much according to plan with that except that with the circuit relay addresses, my peer connections are now dropped after exactly one minute, presumably because the websocket connections won’t stay open longer than that without any activity.
Since I’m new to the circuit relay stuff and it isn’t all that documented yet, I want to make sure that I attack this problem taking into account the way that you guys intended this all to work.
During the minute my peers are connected, everything works like I intended. My network requests some data over DHT right when you connect, then only responds to pubsub for the rest of the session. This is all still good over the circuit relay. But after the one minute, the connection between the two relayed nodes is disconnected. Pubsub doesn’t exactly work at this point - I’d have to make the relays subscribe so they forwarded stuff to everyone I imagine.
My question is: should I care that the connection was dropped at all? The two peers can only communicate through the relay anyway. Is the existence of the peer connection meaningless in that case, or should I be trying to send keepalive signals (which ws-stardust was really blatantly doing) so the connection isn’t dropped? And if I don’t keep the peer connection alive, is it going to work to have the relay subscribe to the pubsub topic?