Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Allow accepting new connections during a graceful shutdown

Abierto
#3,961 2 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust
Área
networking

Línea de trabajo

Empieza leyendo las ubicaciones de Rust referenciadas en hyper's proto/h1/dispatch.rs y proto/h1/conn.rs, y después hyper-util's server/conn/auto/mod.rs. Sigue cómo la cancelación y el apagado ordenado afectan a las conexiones nuevas y actualizables; se considera terminado cuando el flag propuesto permite aceptar conexiones durante la ventana inicial de apagado, aplicando GOAWAY o connection: close, y deja de aceptar conexiones después del plazo mínimo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

B-rfc C-feature

Is your feature request related to a problem? Please describe.
We want a very specific behavior for graceful shutdowns in our hyper-based proxy. We set two deadlines, min (typically 5-10s), and max (could be much longer). We want the following sequence during shutdown:

  • t=0s: send GOAWAY on all HTTP2 connections and start responding with connection: close on all http1 requests. Continue to accept new connections, and handle them the same (GOAWAY/connection: close) them.
  • After min deadline: stop accepting new connections. Continue existing connections, with the same GOAWAY/connection: close.
  • After max deadline: shutdown everything.

The reason for the time when we accept new connections, but tell clients to go away, is that there is some time for the load balancers in front of the proxy (this could be something like AWS NLB, Kubernetes kube-proxy, etc) to de-register the proxy instance and stop sending traffic to it. So immediately dropping new connections results in downtime. However, during this time its nice to start to encourage clients to goaway, since its likely they will select another proxy instance (either because the fronting LB already de-registered the old instance (the min deadline is intended to be the worst case, so usually its much faster), or because of random chance it selects a different one).

Today, the best we can do is wait until after min deadline and stop accepting new connections and start GOAWAY/connection: close at the same time.

Describe the solution you'd like
A new flag on hyper_util::server::conn::auto, and on hyper::server::conn::http1 to enable the "different graceful shutdown mode" (naming TBD!). This would change:

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

If these changes are acceptable I would be happy to contribute both parts of the change

Lenguaje dominante
Rust
Estrellas
16.4k
Forks
1.8k
Merge medio
2 d 9 h
PR fusionados (30 d)
14

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de hyperium/hyper

Todos los issues de hyperium/hyper

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.