From owner-freebsd-questions@FreeBSD.ORG Thu Aug 15 12:16:18 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 041EE471 for ; Thu, 15 Aug 2013 12:16:18 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 77A922B87 for ; Thu, 15 Aug 2013 12:16:17 +0000 (UTC) Received: from rufus.webfusion.com (mail.heartinternet.co.uk [79.170.40.31]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.7/8.14.7) with ESMTP id r7FCG22S067145 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 15 Aug 2013 13:16:08 +0100 (BST) (envelope-from matthew@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk r7FCG22S067145 Authentication-Results: smtp.infracaninophile.co.uk/r7FCG22S067145; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host mail.heartinternet.co.uk [79.170.40.31] claimed to be rufus.webfusion.com Message-ID: <520CC681.2080708@freebsd.org> Date: Thu, 15 Aug 2013 13:16:01 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130809 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: High availability on remote site References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.8 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 12:16:18 -0000 On 15/08/2013 12:19, Olivier Nicole wrote: > I have been assigned to offer HA on a 3 tiers architecture. > > Data storage tier will be MySQL, so replication is easy. > > HA should be implemented only on the Data storage tier, Active/Active, > but one of the sites is remote! > > When everything is working, each application accesses the local MySQL > tier, but when the local MySQL becomes unavailable, it should be able > to automatically move to the other database server. > > I have no access to the application, so I cannot modify it to test if > local MySQL is working. So I should have an HA mechanism that enforces > changing the IP address on the database server. > > If both servers are installed at different places, with different > addresses, would there be a way beside establishing an IP tunnel/VPN > between both places to have all machines in a single subnet? > > An image is here http://www.cs.ait.ac.th/~on/HA.gif > > I am really bothered by the IP tunnel, but that's the only way I see to keep HA. > > Any idea welcome. Depending on the technology use in you middle layer, it may be quite simple. Some application languages, eg Java allow you to specify a list of servers in a DB connection string. The server names will be tried in order until a successful connection is made. Other languages may provide a similar facility, or it should be pretty easy to code up with minimal intervention in your codebase required. Cheers, Matthew