{"action":"created","issue":{"url":"https://api.github.com/repos/arunoda/meteor-up/issues/486","labels_url":"https://api.github.com/repos/arunoda/meteor-up/issues/486/labels{/name}","comments_url":"https://api.github.com/repos/arunoda/meteor-up/issues/486/comments","events_url":"https://api.github.com/repos/arunoda/meteor-up/issues/486/events","html_url":"https://github.com/arunoda/meteor-up/issues/486","id":89175985,"number":486,"title":"Gracefully shutdown when deploying new version","user":{"login":"hems","id":27327,"avatar_url":"https://avatars.githubusercontent.com/u/27327?v=3","gravatar_id":"","url":"https://api.github.com/users/hems","html_url":"https://github.com/hems","followers_url":"https://api.github.com/users/hems/followers","following_url":"https://api.github.com/users/hems/following{/other_user}","gists_url":"https://api.github.com/users/hems/gists{/gist_id}","starred_url":"https://api.github.com/users/hems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hems/subscriptions","organizations_url":"https://api.github.com/users/hems/orgs","repos_url":"https://api.github.com/users/hems/repos","events_url":"https://api.github.com/users/hems/events{/privacy}","received_events_url":"https://api.github.com/users/hems/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-18T02:04:48Z","updated_at":"2015-06-18T17:09:08Z","closed_at":null,"body":"Ideally we would be able to:\r\n\r\n - gracefully shutdown current version ( executing some custom code before the actual exit  of the app )\r\n - fire another one in parallel which takes the new connections on board\r\n\r\nIs thee any way of achieving this at the moment?"},"comment":{"url":"https://api.github.com/repos/arunoda/meteor-up/issues/comments/113223362","html_url":"https://github.com/arunoda/meteor-up/issues/486#issuecomment-113223362","issue_url":"https://api.github.com/repos/arunoda/meteor-up/issues/486","id":113223362,"user":{"login":"hsduk","id":11775910,"avatar_url":"https://avatars.githubusercontent.com/u/11775910?v=3","gravatar_id":"","url":"https://api.github.com/users/hsduk","html_url":"https://github.com/hsduk","followers_url":"https://api.github.com/users/hsduk/followers","following_url":"https://api.github.com/users/hsduk/following{/other_user}","gists_url":"https://api.github.com/users/hsduk/gists{/gist_id}","starred_url":"https://api.github.com/users/hsduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsduk/subscriptions","organizations_url":"https://api.github.com/users/hsduk/orgs","repos_url":"https://api.github.com/users/hsduk/repos","events_url":"https://api.github.com/users/hsduk/events{/privacy}","received_events_url":"https://api.github.com/users/hsduk/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T17:09:08Z","updated_at":"2015-06-18T17:09:08Z","body":"temp nginx?\r\nif old version is on port 80\r\nsetup a temp proxy to the old version\r\nchange old version port to a temp unused port e.g 81\r\nproxy adopts old connections and delivers to the temp port 81 on old version\r\nproxy delivers new connections to the temp port on old version\r\nmup deploys the new version to port 80\r\nold version goes offline new and existing connections handled by new version\r\nwhen confirmed up, the temp proxy and old version is removed\r\nif deploy fails, the old version remains active with or without the temp proxy\r\n\r\nother solution would be to always front end meteor with a permanent proxy\r\n"}}