Date: Wed, 17 Apr 2002 11:09:32 -0700 From: "Mike K" <mikeslists@msquaredweb.net> To: <freebsd-isp@freebsd.org> Subject: A cheap load-balancing?/backup/redundancy solution Message-ID: <00e801c1e63b$06cea730$05874786@MK4100>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00e801c1e63b$06cea730$05874786>