Graceful shutdown in HTTP

Graceful shutdown in HTTP

Update: 2025-10-17
Share

Description


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. 



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


Comments 
00:00
00:00
x

0.5x

0.8x

1.0x

1.25x

1.5x

2.0x

3.0x

Sleep Timer

Off

End of Episode

5 Minutes

10 Minutes

15 Minutes

30 Minutes

45 Minutes

60 Minutes

120 Minutes

Graceful shutdown in HTTP

Graceful shutdown in HTTP

Hussein Nasser