You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using graphql-ws in the server which are running within K8S Pods that scale up/down. When K8S scales up/down it'll move traffic between different pods and we're seeing an issue with losing important messages in the process.
Our idea is that when a SIGTERM is received on the server, we'll emit a message through the socket to tell the client to reconnect, but in order to not miss messages, it would be great if we could blue/green replace the socket connecting to another pod.
I believe in order to do that, we'd need to momentarily open up a secondary socket before closing the first one (which is scheduled to be closed within seconds).
Just wondering if you have any recommendation for achieving this? I'm thinking instead of having an ApolloLink containing 1x client, we would have an array of clients and upon receiving a SIGKILL message from a socket, we would create a 2nd client.
The Observable returned by request would then listen to both clients and dedupe duplicate emits.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We're using graphql-ws in the server which are running within K8S Pods that scale up/down. When K8S scales up/down it'll move traffic between different pods and we're seeing an issue with losing important messages in the process.
Our idea is that when a SIGTERM is received on the server, we'll emit a message through the socket to tell the client to reconnect, but in order to not miss messages, it would be great if we could blue/green replace the socket connecting to another pod.
I believe in order to do that, we'd need to momentarily open up a secondary socket before closing the first one (which is scheduled to be closed within seconds).
Just wondering if you have any recommendation for achieving this? I'm thinking instead of having an ApolloLink containing 1x client, we would have an array of clients and upon receiving a SIGKILL message from a socket, we would create a 2nd client.
The Observable returned by request would then listen to both clients and dedupe duplicate emits.
Thoughts? Am I running into a trap somewhere?
Beta Was this translation helpful? Give feedback.
All reactions