From owner-freebsd-isp Wed Apr 17 11: 9:56 2002 Delivered-To: freebsd-isp@freebsd.org Received: from webclan.com (webclan.com [216.149.213.2]) by hub.freebsd.org (Postfix) with SMTP id BA0AC37B405 for ; Wed, 17 Apr 2002 11:09:52 -0700 (PDT) Received: (qmail 21861 invoked from network); 17 Apr 2002 18:17:18 -0000 Received: from unknown (HELO MK4100) (134.71.135.5) by msquaredweb.net with SMTP; 17 Apr 2002 18:17:18 -0000 Message-ID: <00e801c1e63b$06cea730$05874786@MK4100> From: "Mike K" To: Subject: A cheap load-balancing?/backup/redundancy solution Date: Wed, 17 Apr 2002 11:09:32 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi all.. I've got a few scenarios for you, and hopefully you can point me in the right direction... I've got 2 FreeBSD boxes, A and B, colo'd at different facilities. The main purposes of the servers is to provide web hosting, mail, and radius authentication. A serves the following purposes: --> Web hosting server --> Mail server (QMail + vpopmail) --> DNS (primary for all domains) --> FTP for Web Hosting users --> MySQL server for Hosting clients & radius B currently only does a couple of things: --> Mirrors the web hosting data tree (basically retrieves all web hosting client's files nightly via rsync+ssh) --> Mirrors MySQL in real-time A is a much higher allotment of bandwidth available than B, therefore I don't simply want to setup Apache on B and change the DNS entry for each domain to both an IP on A and B, as that would equally share the requests between the two servers, which is bad due to the bandwidth restrictions on B. Instead, what I want to accomplish, is a fairly automated system that will allow all web traffic and mail to be directed to B should A go offline for whatever reason. Here's what I had thought of..... (1) Setup apache on B (2) Change the ip (and ns listed on the domain) for the primary DNS domain to point to an ip on B (this should automagically update the ip address for the primary NS for all domains using it, correct?) (3) Setup qmail on B to catch all email and hold it until A comes back online (4) Setup some sort of cron'd script that tests to see if A is available every X minutes. If A is unreachable for X minutes, the script would change each domain's zone file to change the IN A entry to point to an ip on B, as well as the mail entry to an ip on B (5) A second script should then be available to change all zone files back to A, once A is available The issues I see with this method include cached dns entries, etc. Any ideas? Am I on the wrong track? Am I on the right track? Anyone have similar scripts they wouldn't mind sharing? Thanks much for your time. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message