{"action":"closed","issue":{"url":"https://api.github.com/repos/convox/rack/issues/1183","repository_url":"https://api.github.com/repos/convox/rack","labels_url":"https://api.github.com/repos/convox/rack/issues/1183/labels{/name}","comments_url":"https://api.github.com/repos/convox/rack/issues/1183/comments","events_url":"https://api.github.com/repos/convox/rack/issues/1183/events","html_url":"https://github.com/convox/rack/issues/1183","id":174853311,"number":1183,"title":"routing policy during a deployment","user":{"login":"contra","id":425716,"avatar_url":"https://avatars.githubusercontent.com/u/425716?v=3","gravatar_id":"","url":"https://api.github.com/users/contra","html_url":"https://github.com/contra","followers_url":"https://api.github.com/users/contra/followers","following_url":"https://api.github.com/users/contra/following{/other_user}","gists_url":"https://api.github.com/users/contra/gists{/gist_id}","starred_url":"https://api.github.com/users/contra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contra/subscriptions","organizations_url":"https://api.github.com/users/contra/orgs","repos_url":"https://api.github.com/users/contra/repos","events_url":"https://api.github.com/users/contra/events{/privacy}","received_events_url":"https://api.github.com/users/contra/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-02T21:43:32Z","updated_at":"2016-09-04T23:14:17Z","closed_at":"2016-09-04T23:14:17Z","body":"Is there any way to configure how new requests are routed during a deployment?\r\n\r\n**Current issue**:\r\n\r\n- User browser gets index.html from V2, which has a link to example.js\r\n- User browser requests example.js, request gets routed to V1 which doesn't have example.js so it 404s\r\n\r\nThis happens until all old servers are gone, which can take up to 20-30 mins sometimes.\r\n\r\n**Proposed solution**:\r\n\r\n- During a deploy, keep routing requests to existing servers (let's call it V1)\r\n- The second a server with newer code comes online during a rollout, start routing all new requests to the new server (V2)\r\n- As requests to V1 servers finish, spin them down (convox already does this)\r\n\r\nThe goal is to stop routing requests to old code ASAP. This could be hidden behind a label to preserve backwards compat."}}
{"actor":{"display_login":"ddollar"}}