tzssangglass commented on issue #5440:
URL: https://github.com/apache/apisix/issues/5440#issuecomment-974849228


   > 坦白说,APISIX 和 Nginx 的 websocket 代理行为应该是一样的。
   
   In fact, I think the websocket proxy behavior of APISIX is same as Nginx. 
   
   the connection will be closed if the proxied server does not transmit any 
data within 60 seconds in Nginx.
   
   here is my step:
   
   1. start a websocket backend:
   
   ```
   websocat -s 1234
   ```
   
   2. start openresty, here is my config:
   
   ```
   http {
   
       server {
           listen 1980;
   
           access_log off;
           location / {
               proxy_pass http://127.0.0.1:1234;
               proxy_http_version 1.1;
               proxy_set_header Upgrade $http_upgrade;
               proxy_set_header Connection "upgrade";
           }
       }
   }
   ```
   
   3. start websocker client, connect to openresty
   
   ```
   websocat ws://127.0.0.1:1980/
   ```
   
   After 60s of not sending a message, the connection is broken.


-- 
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]


Reply via email to