It's nice to see that unit have support proxy feature.
Is there any plan to support proxy websocket protocol so I can use Unit to dynamic proxy my application.
@VBart Why not support the standard Websocket protocol?
nginx:
location /api-websocket {
proxy_pass http://172.17.0.1:81/websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
@VBart Why not support the standard Websocket protocol?
As the first step we need to support HTTP/1.1 for proxy. It's not supported yet, only HTTP/1.0.
+1
Would be great to have support for both HTTP/1.1 and WebSocket proxying.
Any update on this advancement? Nginx supports it just fine and I was under the assumption this codebase would share much from that of Nginx... Is a lot involved with making unit HTTP/1.1 compliant and thus able to proxy websockets?
@artemkonev
@june07 HTTP/1.1 support was introduced with https://github.com/nginx/unit/commit/65799c7252e56d287d967bf3f036a10d5764f82c (will be released with 1.19.0 in a few weeks or so), but without keep-alive connections cache. The next step will be to introduce keep-alive, and then we will be able to start working on WebSockets.
Unit doesn't share codebase with nginx and lot of things in Unit have been implemented differently.
Most helpful comment
@june07 HTTP/1.1 support was introduced with https://github.com/nginx/unit/commit/65799c7252e56d287d967bf3f036a10d5764f82c (will be released with 1.19.0 in a few weeks or so), but without keep-alive connections cache. The next step will be to introduce keep-alive, and then we will be able to start working on WebSockets.
Unit doesn't share codebase with nginx and lot of things in Unit have been implemented differently.