agent icon indicating copy to clipboard operation
agent copied to clipboard

Websocket proxy in port mappings

Open etursunbaev opened this issue 6 years ago • 9 comments

Need to add these nginx directives to templates

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

to websocket proxying https://www.nginx.com/blog/websocket-nginx/ additional info can be found here

etursunbaev avatar Dec 14 '18 03:12 etursunbaev

And how will that influence non-websocket connections?

lbthomsen avatar Dec 14 '18 03:12 lbthomsen

        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection $http_connection;

As discussed internally better add these lines to all templates and should not hurt anything

etursunbaev avatar Dec 14 '18 08:12 etursunbaev

Hello folks, I just hit this issue trying to understand why my deploy to subutai of Convos (http://convos.by/) that depends on WebSockets was failing to keep the connections up. But, these configurations didn't allow me to run it properly I had to add this line on the subutai-nginx configuration created by agent:

 proxy_http_version 1.1

After search for a while (https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_http_version). As I read the docs referred, it states when http proxying the proxy is by default set to http 1.0. And that was the problem I was getting with this application. Thks all. :)

marcoarthur avatar Dec 09 '19 17:12 marcoarthur

Good catch @marcoarthur. @etursunbaev was right. Perhaps the fix never made it out the door into production. Reopened to confirm fix.

akarasulu avatar Dec 09 '19 17:12 akarasulu

@marcoarthur hi I pushed your fix to DEV branch. You can test with dev peer

dilshat avatar Dec 10 '19 13:12 dilshat

Thanks @Dilshat ! Will setup a dev peer and give you feedback ASAP

marcoarthur avatar Dec 11 '19 12:12 marcoarthur

@Dilshat sorry couldn't really test it yet, without a sandbox env by the moment.

marcoarthur avatar Dec 14 '19 14:12 marcoarthur

@marcoarthur np , take your time !

dilshat avatar Dec 14 '19 16:12 dilshat

@marcoarthur hey buddy Did you have a chance to test the issue?

dilshat avatar Jan 14 '20 16:01 dilshat