sunnysabor commented on issue #6461: URL: https://github.com/apache/shenyu/issues/6461#issuecomment-5942592762
I traced the current `upstream/master` WebSocket path at `09c6a528`. The client records the `masterUrl` and `isMaster` values from the `RUNNING_MODE` reply in `ShenyuWebsocketClient#onMessage`, but `WebsocketSyncDataService#masterCheck` only keeps cluster-mode clients for which `isConnectedToMaster()` is true. For a non-master response it closes/removes that client; when the client list is empty it recreates clients from the original `websocketConfig.urls`. The stored `masterUrl` is not used to redirect/reconnect.\n\nThis suggests a loop if the Kubernetes Service URL repeatedly routes a gateway to a non-master admin pod: the connection is dropped and the same load-balanced URL is retried. This is distinct from the `runningMode == null` timing hypothesis in the earlier comment. Could you confirm whether the Service can repeatedly select a non-master pod in your deployment, and whether the intended behavior is for the gateway to reconnect directly to the returned `masterUrl`? That w ill clarify the right fix and regression test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
