Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

DBD ProxyServer Not Caching Connections

by harleypig (Monk)
on Feb 16, 2006 at 22:11 UTC ( #530802=perlquestion: print w/replies, xml ) Need Help??
harleypig has asked for the wisdom of the Perl Monks concerning the following question:

I'm testing DBD::ProxyServer with DBI::Proxy. I'm pretty sure that the proxy server is *not* caching the connections to the db. Am I correct? If so, what concerns should I have when modifying the AcceptUser sub to use connect_cached?

Harley J Pig
  • Comment on DBD ProxyServer Not Caching Connections

Replies are listed 'Best First'.
Re: DBD ProxyServer Not Caching Connections
by perrin (Chancellor) on Feb 17, 2006 at 00:32 UTC
    You're right, it doesn't cache connections. In general it has terrible performance and is a last resort. If you want to try caching connections, go for it, but make sure you don't try to use them across multiple processes, i.e. make sure they are opened after forking.

      Thank you for that clarification.

      What I'm trying to figure out (I'm learning as I go, but I'm running out of time) is whether or not the following scenario is correct (or even a good idea):

      A cgi script on a bank of web boxes uses DBI->connect_cache to connect to a dbi proxy, which then uses DBI->connect_cache to a bank of db boxes.

      I can't find anything seems to do this, or similar. Thanks for the pointer.

      Harley J Pig
        What you're suggesting sounds reasonable, but I think it will require more work than you expect. The proxy server is still likely to be slow after this change, compared to direct access.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://530802]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2018-01-20 11:05 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (226 votes). Check out past polls.