{"action":"created","issue":{"url":"https://api.github.com/repos/line/armeria/issues/1487","repository_url":"https://api.github.com/repos/line/armeria","labels_url":"https://api.github.com/repos/line/armeria/issues/1487/labels{/name}","comments_url":"https://api.github.com/repos/line/armeria/issues/1487/comments","events_url":"https://api.github.com/repos/line/armeria/issues/1487/events","html_url":"https://github.com/line/armeria/issues/1487","id":388921996,"node_id":"MDU6SXNzdWUzODg5MjE5OTY=","number":1487,"title":"Do not suspend network reads in an HTTP/2 connection.","user":{"login":"trustin","id":173918,"node_id":"MDQ6VXNlcjE3MzkxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","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":[{"id":287189526,"node_id":"MDU6TGFiZWwyODcxODk1MjY=","url":"https://api.github.com/repos/line/armeria/labels/defect","name":"defect","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/line/armeria/milestones/125","html_url":"https://github.com/line/armeria/milestone/125","labels_url":"https://api.github.com/repos/line/armeria/milestones/125/labels","id":3853515,"node_id":"MDk6TWlsZXN0b25lMzg1MzUxNQ==","number":125,"title":"0.77.0","description":null,"creator":{"login":"trustin","id":173918,"node_id":"MDQ6VXNlcjE3MzkxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","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},"open_issues":9,"closed_issues":12,"state":"open","created_at":"2018-11-28T04:16:52Z","updated_at":"2018-12-11T03:12:55Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-12-08T13:23:23Z","updated_at":"2018-12-11T03:12:55Z","closed_at":"2018-12-11T03:12:55Z","author_association":"MEMBER","body":"Armeria currently suspends network reads when more than 128KiB are unconsumed by the stream subscribers. (See: [InboundTrafficController](https://github.com/line/armeria/blob/armeria-0.76.2/core/src/main/java/com/linecorp/armeria/internal/InboundTrafficController.java))\r\n\r\nHowever, we should not disable network reads at all in an HTTP/2 connection because HTTP/2 has its own traffic control mechanism (`WINDOW_UPDATE` frame. See: [The Flow-Control Window](https://http2.github.io/http2-spec/#rfc.section.6.9.1)) Actually, arbitrarily disabling network reads can cause an unexpected permanent stall (i.e. dead lock) of an HTTP/2 connection because it can prevent the HTTP/2 implementation from reading a `WINDOW_UPDATE` frame.\r\n\r\nTherefore, we should use `InboundTrafficController` only for HTTP/1 connections. We may also have some opportunity to gain additional performance thanks to this because 1) we do not need to suspend network reads and 2) we do not need to count the number of pending inbound bytes."},"comment":{"url":"https://api.github.com/repos/line/armeria/issues/comments/446057154","html_url":"https://github.com/line/armeria/issues/1487#issuecomment-446057154","issue_url":"https://api.github.com/repos/line/armeria/issues/1487","id":446057154,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjA1NzE1NA==","user":{"login":"trustin","id":173918,"node_id":"MDQ6VXNlcjE3MzkxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","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},"created_at":"2018-12-11T03:12:55Z","updated_at":"2018-12-11T03:12:55Z","author_association":"MEMBER","body":"I realized that this is not going to work because Armeria will keep reading the traffic even if a subscriber consumes the traffic slowly, i.e. data will be buffered in the `DecodedHttp(Request|Response)` and eventually will overflow without `InboundTrafficController`.\r\n\r\nHowever, while implementing this, I realized we are using smaller watermarks (128KiB) than initial connection-level window size (1MiB). We could use higher watermark values so that network reads are not suspended too often.\r\n"}}
{"actor":{"display_login":"trustin"}}