3 ms·
Something I pick on with PHP is because requests are so isolated, it doesn't have a good story for pooling SQL and HTTP connections. Its model really limits you
by dehrmann 5y ago
Something I pick on with PHP is because requests are so isolated, it doesn't have a good story for pooling SQL and HTTP connections. Its model really limits you when it comes to sharing resources between requests.
- francislavoie 5y agoIt's possible to have persistent MySQL connections, but there's all kinds of caveats; MySQL connections are stateful, so bad things can happen, and the performance benefits are only very slight. https://www.php.net/manual/en/features.persistent-connections.php https://www.php.net/manual/en/features.persistent-connection...
- Nilithus 5y agoThis is indeed a downside but there are workarounds -- The wikimedia foundation put out a good blog post talking about getting HTTP connection pooling for PHP https://techblog.wikimedia.org/2020/10/26/impact-of-using-http-connection-pooling-for-php-applications-at-scale/ https://techblog.wikimedia.org/2020/10/26/impact-of-using-ht... TLDR they used envoy proxy as a sidecar container. So to your point its a pain but still achievable