X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 574373A295C for ; Wed, 19 Jan 2005 01:01:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95008-02 for ; Wed, 19 Jan 2005 01:01:35 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 3C4B33A2B2D for ; Wed, 19 Jan 2005 01:01:38 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j0J11WHe026263 for ; Wed, 19 Jan 2005 01:01:32 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j0J0hLa5022810 for pgsql-admin@postgresql.org; Wed, 19 Jan 2005 00:43:21 GMT (envelope-from news) From: Ron Mayer X-Newsgroups: pgsql.admin Subject: Re: run httpd and postgresql on different machines ? Date: Tue, 18 Jan 2005 16:49:18 -0800 Organization: Hub.Org Networking Services Lines: 38 Message-ID: <41EDAE8E.8030604@cheapcomplexdevices.com> References: <41ED10E2.6030502@musc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Chuming Chen User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en In-Reply-To: <41ED10E2.6030502@musc.edu> To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/196 X-Sequence-Number: 16055 Chuming Chen wrote: > > I want to set up a web site using apache httpd, php and postgresql. From > the performance point of view, which architecture is better? 1) Run > httpd and postgresql on the same machine; 2) Run postgresql on seperate > machine. My concern is that the machine I am going to run httpd has > limitted storage. I am expecting the increasing of postgresql database > once I set it ip. I had good luck with 4 very cheap (small, used, 1CPU, IDE disk) machines running httpd/php/MONO-ASP.NET, and 1 more expensived machine (with some internal failover capabilities - dual power supplies, with a RAID array, with a support contract) running postgresql. The reasoning was one of cost/performance with the ability to have likely-to-fail components fail with no downtime. The cheapest way to scale the front-end machines with failover capabilities was to use sub-$1000 slightly obsolete PCs. The cheapest way I knew to provide limited scalability and failover (at least for disk) for a database was a raid array. With some of the newer replication features or pgpool, it might be easier to scale "out" instead of "up"; but I have no experience making that determination. How about the rest of you guys.... If CPU demands in my database get to the point of needing 5-CPUs with a read-mostly (90%) system, am I better off with 1 lots of replication between small servers or 2 scaling up a big server. (the reason I'm CPU bound instead of disk bound is that many of my queries are spatial operations with PostGIS like unions and buffers of polygons).