<p>Lets say I have a websocket implemented in springboot. The architecture is microservice. I have deployed the service in kubernetes cluster and I have 2 running instance of the service, the socket implementation is using stomp and redis as broker.</p>
<ol>
<li><p>Now the first connection is created between a client and one of the service. Does all the data flow occur through the client and the connected service? Would the other service also have a connection? Incase the current service goes down would the other service open up a connection?</p>
</li>
<li><p>Now lets say I'am sending some data back to the client which comes through a kafka topic. One of the either service could read it. If then would either of them be able to send the data back to the client?</p>
</li>
</ol>
<p>Can someone help me understand these scenarios?</p>

pacman
<p>A websocket is a permanent connection. After opening it, it will be routed through kubernetes to a fixed pod. No other pod will receive the connection.
If the pod goes down, the connection is terminated.</p>
<p>If a new connection is created, for example by a different user, it may be routed to a different pod.</p>
<p>What data is transmitted, for example with kafka as source, is not relevant in this context. It could be anything.</p>
