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
In the following link, someone says this library is not really zuul websocket support, it's a standalone websocket proxy that happens to sit next to zuul. And I configured a zuul mandatory filter and found that the websocket connection did not go through the zuul filter.
My question is what's the implementation consideration of this library? Is it possible to make the websocket connection go through the zuul filter? To put it in another way, is it possible to support the websocket connection in zuul filters by using spring websocket compoment?
Websocket calls are not HTTP requests. HTTP protocol is based on TCP sockets. So when you create a HTTP request (e.g.: HTTP_GET, HTTP_POST, ..) the Tomcat and Spring and Zuul will create RequestContext. You can run your filters in this context and you are able to route your call.
BUT, as I mentioned before, websocket calls are on the tcp layer and it is lower than the HTTP calls. The application server will not create a RequestContext because it is not a HTTP request.
When you connect to a websocket server, the client send a http request to do the handshake process. At this point you can run some of your filters.
When you disconnect from it, the client will not send http call to do the disconnect process :(.
After all, you can not use your already implemented filters. You have to create new ones because of the "new" architecture. You have to figure out new backend logic to handle websocket connections and messages. And do not forget the websocket is a full-duplex communication channel ;).
In the following link, someone says this library is not really zuul websocket support, it's a standalone websocket proxy that happens to sit next to zuul. And I configured a zuul mandatory filter and found that the websocket connection did not go through the zuul filter.
My question is what's the implementation consideration of this library? Is it possible to make the websocket connection go through the zuul filter? To put it in another way, is it possible to support the websocket connection in zuul filters by using spring websocket compoment?
Thank you.
spring-cloud/spring-cloud-netflix#163
The text was updated successfully, but these errors were encountered: