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

Aperta
#488 5 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!

Lingua principale
PHP
Stelle
781
Fork
166
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reactphp/http

Tutte le issue di reactphp/http

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.