# Graceful shutdown in HTTP Page: https://stenobird.com/podcast/the-backend-engineering-show-with-hussein-nasser-847440/graceful-shutdown-in-http Text version: https://stenobird.com/podcast/the-backend-engineering-show-with-hussein-nasser-847440/graceful-shutdown-in-http.md Podcast: [The Backend Engineering Show with Hussein Nasser](https://stenobird.com/podcast/the-backend-engineering-show-with-hussein-nasser-847440) Published: 2025-10-17T14:00:00+00:00 Episode link: https://podcasters.spotify.com/pod/show/hnasr/episodes/Graceful-shutdown-in-HTTP-e38c5sc Audio file: https://anchor.fm/s/1eb6d14/podcast/play/108451148/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2025-8-17%2Fbb4629d3-d6a7-5ef6-9cf7-a6b9f4aaca71.m4a Processing state: not_requested JSON: https://stenobird.com/v1/public/podcasts/the-backend-engineering-show-with-hussein-nasser-847440/episodes/graceful-shutdown-in-http Duration seconds: 1549 ## Resource There are cases where the backend may need to close the connection to prevent unexpected situations, prevent bad actors or simply just free up resources. Closing a connection gracefully allows clients and backends to clean up and finish any pending requests. In this episode of the backend engineering show I discuss graceful connections in both HTTP/1.1 via the connection header and HTTP/2 via the GOAWAY frame. 0:00 Intro 4:58 Why shutdown connection? 6:46 HTTP/1.1 Graceful shutdown 12:26 Cost of HTTP/2 17:40 HTTP/2 GoAWAY frame 23:40 Summary Links https://www.youtube.com/watch?v=fVKPrDrEwTI&t=1s https://chromium.googlesource.com/chromium/src/net/%2B/master/socket/client_socket_pool_manager.cc#76 https://issues.chromium.org/issues/40555364 https://issues.chromium.org/issues/40501721 ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/the-backend-engineering-show-with-hussein-nasser-847440/episodes/graceful-shutdown-in-http/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/the-backend-engineering-show-with-hussein-nasser-847440/graceful-shutdown-in-http.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.