What is Nostr?
Anthony Accioly
npub1a6w…0tyc
2024-11-16 02:48:59
in reply to nevent1q…wxnv

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.
Author Public Key
npub1a6we08n7zsv2na689whc9hykpq4q6sj3kaauk9c2dm8vj0adlajq7w0tyc