{"action":"created","issue":{"url":"https://api.github.com/repos/line/armeria/issues/203","repository_url":"https://api.github.com/repos/line/armeria","labels_url":"https://api.github.com/repos/line/armeria/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/line/armeria/issues/203/comments","events_url":"https://api.github.com/repos/line/armeria/issues/203/events","html_url":"https://github.com/line/armeria/issues/203","id":166029723,"number":203,"title":"Automatic disconnection after handling N requests","user":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/line/armeria/labels/new%20feature","name":"new feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-18T06:52:04Z","updated_at":"2016-08-18T04:04:30Z","closed_at":null,"body":"When an Armeria server serves requests behind an L4 load balancer, keeping the connection for too long can cause load imbalance between the servers, especially when one of the servers restarts.\r\n\r\nOne way to solve this problem is to use client-side load balancer or smarter L7 load balancer, but a user may not have such choices but using L4 load balancer which doesn't work well with long living connections.\r\n\r\nTo give more options to our users, we could add an option that configures an Armeria server to disconnect a connection after handling a certain number of requests.\r\n\r\nAction items:\r\n\r\n- Server sends a response with a `Connection: close` header or sends a `GOAWAY` frame after handling a configured number of requests.\r\n- Server waits for the client to disconnect for a few seconds. (so that the client gets `TIME_WAIT` state)\r\n  - If the client does not disconnect in time, server closes the connection.\r\n"},"comment":{"url":"https://api.github.com/repos/line/armeria/issues/comments/240618543","html_url":"https://github.com/line/armeria/issues/203#issuecomment-240618543","issue_url":"https://api.github.com/repos/line/armeria/issues/203","id":240618543,"user":{"login":"anuraaga","id":198344,"avatar_url":"https://avatars.githubusercontent.com/u/198344?v=3","gravatar_id":"","url":"https://api.github.com/users/anuraaga","html_url":"https://github.com/anuraaga","followers_url":"https://api.github.com/users/anuraaga/followers","following_url":"https://api.github.com/users/anuraaga/following{/other_user}","gists_url":"https://api.github.com/users/anuraaga/gists{/gist_id}","starred_url":"https://api.github.com/users/anuraaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuraaga/subscriptions","organizations_url":"https://api.github.com/users/anuraaga/orgs","repos_url":"https://api.github.com/users/anuraaga/repos","events_url":"https://api.github.com/users/anuraaga/events{/privacy}","received_events_url":"https://api.github.com/users/anuraaga/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T04:04:30Z","updated_at":"2016-08-18T04:04:30Z","body":"If I understand the event loop initialization correctly, the number of event loops will depend on the # of cores in the machine. For machines with a lot of cores, this is probably a good number of connections, but maybe not enough in many environments."}}
{"actor":{"display_login":"anuraaga"}}