On one server I have some 30 PHP sites running under Apache. All those sites use the same (HTTP) API to fetch some data. The API is hosted elsewhere (under my control)
The API uses Nginx with keep-alive and the PHP sites use CURL for making the API requests.
A visitor to 1 of the 30 sites would generate an API call, and the connection to the API would be closed by apache/PHP as soon as the HTML is delivered to the visitor.
What I'm looking for is something like a local proxy to the API that is able to maintain the connection to it so the PHP sites can profit from the keepalive.
Anyway of accomplishing this?