Anthony Accioly on Nostr: Yes, other from setting the proxy to use HTTP/1.1 and enabling ...
Yes, other from setting the proxy to use HTTP/1.1 and enabling πππππππππ, Nginx requires additional tweaks to the HTTP π²πππππππππ header: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive.
The instructions in the Nginx manual donβt seem to work well with WebSockets BTW. Fortunately, the nginx-proxy template bellow handles most of the heavy lifting, including workarounds for the π²πππππππππ header:
https://github.com/nginx-proxy/nginx-proxy/blob/main/nginx.tmpl#L446-L473
Iβve just confirmed this by logging ππππ.πππππππ.πΏππππ in Haven. Itβs receiving HTTP/1.1 requests from Nginx. I suspect the reduction in CPU usage is due to fewer TCP sockets in ππΈπΌπ΄_ππ°πΈπ state.
The instructions in the Nginx manual donβt seem to work well with WebSockets BTW. Fortunately, the nginx-proxy template bellow handles most of the heavy lifting, including workarounds for the π²πππππππππ header:
https://github.com/nginx-proxy/nginx-proxy/blob/main/nginx.tmpl#L446-L473
Iβve just confirmed this by logging ππππ.πππππππ.πΏππππ in Haven. Itβs receiving HTTP/1.1 requests from Nginx. I suspect the reduction in CPU usage is due to fewer TCP sockets in ππΈπΌπ΄_ππ°πΈπ state.