drpc
drpc copied to clipboard
Reconnect client to server
Hello everyone, I ran into a reconnect problem, if the server crashes in a panic and recovers, the client via tcp, of course, cannot reach it, except for creating a new client, I did not find a way to solve the problem. Maybe someone has a ready-made reconnect practice in the background?
yes, same question for me, especially in case of the drpc server restart
Indeed, the transport layer is intentionally without many features and designed to allow you to bring your own. I think a connection pool should help with this problem. https://pkg.go.dev/go.bryk.io/pkg/net/drpc is a community package that has a connection pool as part of it. https://pkg.go.dev/storj.io/common/rpc/rpcpool is the one storj uses that is more tailored to it's use case (the cache key contains tls connection state.)