Re: multiple apaches against single postgres database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Honza Novak" <kacerr@xxxxxxxxxxxxxxxxxxxxxxxxxx> writes:

> Hi all,
> i'm looking for correct or at least good enough solution for use of multiple
> apaches with single postgres database. (apaches are 2.0.x, and postgres is
> 8.1.x)
>
> At this moment i'm involved in management of a website where we have large user
> load on our web servers.  Apaches are set up to be able to answer 300 requests
> at the same time and at the moment we have 4 apaches.  

Do you have 300 processors? Are your requests particularly i/o-bound? Why
would running 300 processes simultaneously be faster than running a smaller
number sequentially? It doesn't sound like your systems are capable of
handling such a large number of requests simultaneously.

The traditional answer is to separate static content such as images which are
more i/o-bound onto a separate apache configuration which has a larger number
of connections, limit the number of connections for the cpu-bound dynamic
content server, and have a 1-1 ratio between apache dynamic content
connections and postgres backends. The alternative is to use connection
pooling. Often a combination of the two is best.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux