I have a PHP
application which is called with GET parameters
running with PG and nginx
. The page A receives a message and some information. The page B makes routing. The page C calls an external application with CURL. I will receive up to 1-2 millions requests per month when I'll go in production.
My question concerns the pg_pconnect function. Is the connection reused if there is calls from different location? I mean, is it better to make a simple connection and close it everytime for page A? (servers from different locations will call my app) For page B and C, a script will call them in a infinite loop (waiting 10s if there is no message to handle). Since requests will always come from the same location, is it worthy to use a permanent connection for page B & C?
I hope my explanation is clear enough.
Thanks!