You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tom Weber <we...@nytimes.com> on 2006/11/13 16:22:51 UTC
Apache::DBI persistence question?
Are there any ways to implement persistent connections to different
databases under one instance of Apache? From my reading of
Apache::DBI and from some of my testing it appears that this can not
be done. Here is what I want to do. Server1 is running multiple
named based virtual hosts. Each of the database run on different servers.
server1 (app1) -> db1
server1 (app2) -> db2
server1 (app3) -> db3
The most important and most used application connects to db1 and is
running fine under apache and apache::dbi, but there are some smaller
apps that we tried to bundle into this environment that need to
connect to other servers running different database instances.
I don't want to eliminate apache::dbi and just use dbi. I don't want
to get new machines to handle these smaller apps. I don't think I can
have multiple instances of apache on a single Linux server, but am not sure.
I am thinking that I need to set up a standalone Soap Server running
on another port to handle the connections to the other databases,
without any sort of persistence, which for performance reasons would
probably be okay.
Any experience on this matter, or any other design ideas?
Thanks.
Re: Apache::DBI persistence question?
Posted by Frank Wiles <fr...@wiles.org>.
On Mon, 13 Nov 2006 10:22:51 -0500
Tom Weber <we...@nytimes.com> wrote:
> Are there any ways to implement persistent connections to different
> databases under one instance of Apache? From my reading of
> Apache::DBI and from some of my testing it appears that this can not
> be done. Here is what I want to do. Server1 is running multiple
> named based virtual hosts. Each of the database run on different
> servers.
>
> server1 (app1) -> db1
> server1 (app2) -> db2
> server1 (app3) -> db3
>
> The most important and most used application connects to db1 and is
> running fine under apache and apache::dbi, but there are some smaller
> apps that we tried to bundle into this environment that need to
> connect to other servers running different database instances.
There isn't any reason you can't do this with Apache::DBI. It will
pool connections based on the full connect string.
> I don't want to eliminate apache::dbi and just use dbi. I don't want
> to get new machines to handle these smaller apps. I don't think I can
> have multiple instances of apache on a single Linux server, but am
> not sure.
Just an FYI, but yes you can run multiple Apaches on a single
system. It's done all the time.
---------------------------------
Frank Wiles <fr...@wiles.org>
http://www.wiles.org
---------------------------------