hyperium / hyperium/h2

Add options to set h2 keepalive_timeout?

Open
#826 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
382
Avg merge
20h 23m
Merged PRs (30d)
9

Description

We want close non-active connection to avoid fd run out. https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout

I can open a PR if you accept.

  1. increment number when there has stream https://github.com/nginx/nginx/blob/43191be96fb5f425710400e0064c0f2d285a352d/src/http/v2/ngx_http_v2.c#L3097
  2. when hit timeout, check whether has stream active, or close h2 connection. https://github.com/nginx/nginx/blob/43191be96fb5f425710400e0064c0f2d285a352d/src/http/v2/ngx_http_v2.c#L629

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked nginx ngx_http_v2.c locations around lines 3097 and 629 to understand the proposed stream-count and timeout behavior, then locate the corresponding connection and timeout handling in h2. Done means providing configurable HTTP/2 keepalive timeout behavior that closes inactive connections while preserving active streams, with tests for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.