-
Notifications
You must be signed in to change notification settings - Fork 7.9k
pre-connect to remote hosts #18539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is related to cURL? +1 for me. Can you start writting RFC? |
I think its related to anything which can open a stream. At best it would work for all/most SAPIs. Maybe thats something which be be triggered during class-preloading. There might be a better alternative thought. |
Are you basically talking about worker mode like in FrankenPHP? That's doable on the FPM side as well - it just requires a bit of works and few other things to work right in FPM and possibly in apache2handler. |
No I don't mean worker mode. I was asking for, whether it is possible to warmup connections to certain hosts (before they are actually required at runtime), so connection establish overhead (TLS handshake, TCP handshake,..) will not hit at runtime, but before a user sits in front and waits for the results synchronously |
Uh oh!
There was an error while loading. Please reload this page.
Description
browser have a html tag to pre-connect to hosts, also bun (a competitor to nodejs) added support for pre-connecting to hosts, like databases, http-hosts etc.
the benchmarks shared by the bun team (see above links) look like there is a considerable amount of time to be saved, in case the connection is used often enough/the hosts have enough distance in between.
I wonder whether PHP could also provide such kind of startup-time pre-connect things so we don't need to re-establish connections at every request.
DNS resolution or TLS connection handshakes could already be completed before the PHP script beeing run even knows it will need it later
The text was updated successfully, but these errors were encountered: