Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Package httpdown provides http.ConnState enabled graceful termination of http.Server.

Subscribe to updates I use httpdown

Statistics on httpdown

Number of watchers on Github 246
Number of open issues 3
Average time to close an issue 8 days
Main language Go
Average time to merge a PR 2 months
Open pull requests 0+
Closed pull requests 1+
Last commit over 3 years ago
Repo Created almost 5 years ago
Repo Last Updated over 1 year ago
Size 20 KB
Organization / Authorfacebookgo
Page Updated
Do you use httpdown? Leave a review!
View open issues (3)
View httpdown activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating httpdown for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

httpdown Build Status


Package httpdown provides a library that makes it easy to build a HTTP server that can be shutdown gracefully (that is, without dropping any connections).

If you want graceful restart and not just graceful shutdown, look at the grace package which uses this package underneath but also provides graceful restart.


Demo HTTP Server with graceful termination:

  1. Install the demo application

    go get
  2. Start it in the first terminal


This will output something like:

    2014/11/18 21:57:50 serving on with pid 17
  1. In a second terminal start a slow HTTP request

    curl 'http://localhost:8080/?duration=20s'
  2. In a third terminal trigger a graceful shutdown (using the pid from your output):

    kill -TERM 17

This will demonstrate that the slow request was served before the server was shutdown. You could also have used Ctrl-C instead of kill as the example application triggers graceful shutdown on TERM or INT signals.

httpdown open issues Ask a question     (View All Issues)
  • about 3 years add tcpKeepAliveListener
httpdown list of languages used
Other projects in Go