HTTP client: Expose maximum time to keep alive idle connection with persistent connections

Abierto
#488 5 comentarios 5 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Start with src/Io/ClientConnectionManager.php, where $maximumTimeToKeepAliveIdleConnection is defined, then trace how the client, transaction, and sender objects expose connection configuration. Done means the maximum idle-connection time can be configured for persistent HTTP client communication without requiring direct edits to the connection manager.

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

Descripción

new feature

Hi there!

Good job with taking care of https://github.com/reactphp/http/issues/468. Having the ability to use persistent connections is definitely a game changer for some use cases!

I was wondering if it would be a good idea to expose the $maximumTimeToKeepAliveIdleConnection variable (https://github.com/reactphp/http/blob/1.x/src/Io/ClientConnectionManager.php line 39) in order to support ongoing communication with a webserver, especially with REST API and architectures such as OpenResty.

I'm aware it represents some work as a lot of objects have to be exposed (client, transaction, sender, etc.), but I was wondering if it would be worth it for that particular use case. I noticed an improvement of 100ms per chained request on average by changing the timeout from 1ms to 10s.

Is there a reason why connections are considered idle only under 1ms? I think it might be too low (which is the reason why I'm flagging this as an issue and not a suggestion).

Thanks a lot for ReactPHP!

Lenguaje dominante
PHP
Estrellas
781
Forks
166
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

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 reactphp/http

Todos los issues de reactphp/http

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.