{"id":18254131,"url":"https://github.com/douglarek/zerodown","last_synced_at":"2025-04-04T17:30:41.199Z","repository":{"id":57482809,"uuid":"111974629","full_name":"douglarek/zerodown","owner":"douglarek","description":"Graceful restart \u0026 zero downtime deploy for Go servers.","archived":false,"fork":false,"pushed_at":"2018-08-23T05:22:38.000Z","size":5,"stargazers_count":34,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-14T09:36:57.908Z","etag":null,"topics":["go","golang","graceful-restart-process","graceful-shutdown"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/douglarek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-25T03:52:03.000Z","updated_at":"2023-11-26T08:36:52.000Z","dependencies_parsed_at":"2022-09-03T09:51:30.341Z","dependency_job_id":null,"html_url":"https://github.com/douglarek/zerodown","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglarek%2Fzerodown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglarek%2Fzerodown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglarek%2Fzerodown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglarek%2Fzerodown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglarek","download_url":"https://codeload.github.com/douglarek/zerodown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223150742,"owners_count":17095959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","graceful-restart-process","graceful-shutdown"],"created_at":"2024-11-05T10:10:35.132Z","updated_at":"2024-11-05T10:10:35.708Z","avatar_url":"https://github.com/douglarek.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"zerodown [![Build Status](https://secure.travis-ci.org/douglarek/zerodown.png)](https://travis-ci.org/douglarek/zerodown)\n=====\n\nPackage zerodown provides a library that makes it easy to build socket\nbased servers that can be gracefully terminated \u0026 restarted (that is,\nwithout dropping any connections).\n\nUsage\n-----\n\nDemo HTTP Server with graceful termination and restart:\nhttps://github.com/douglarek/zerodown/blob/master/zerodowndemo/server.go\n\n1. Install the demo application\n\n        go get github.com/douglarek/zerodown/zerodowndemo\n\n2. Start it in the first terminal\n\n        zerodowndemo\n\n3. In a second terminal start a slow HTTP request\n\n        curl 'http://localhost:8080/?duration=20s'\n\n4. In a third terminal trigger a graceful server restart:\n\n        kill -USR2 [zerodowndemo pid]\n\n5. Trigger another shorter request that finishes before the earlier request:\n\n        curl 'http://localhost:8080/?duration=0s'\n\n\nIf done quickly enough, this shows the second quick request will be served by\nthe new process while the slow first request will be\nserved by the first server. It shows how the active connection was gracefully\nserved before the server was shutdown. It is also showing that at one point\nboth the new as well as the old server was running at the same time.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglarek%2Fzerodown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglarek%2Fzerodown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglarek%2Fzerodown/lists"}