nginx stream mode reconnect to upstream without close downstream connection

1k Views Asked by At

Hi,I am using nginx stream mode to proxy tcp connection. Could this be possible if I restart my app on the upstream, nginx could auto reconnect to upstream without lost the tcp connection on the downstream?

1

There are 1 best solutions below

0
On

I found some clue from this HiveMQ blog post comment, hope this help. I copied them as below:

Hi Sourav,

the load balancer doesn’t have any knowledge of MQTT; at least I don’t know any MQTT-aware load balancer.

HiveMQ replicates its state automatically in the cluster. If a cluster node goes down and the client reconnects (and is assigned to another broker instance by the LB), it can resume its complete session. The client does not need to resubscribe.

Hope this helps, Dominik from the HiveMQ Team