From owner-freebsd-questions@FreeBSD.ORG Thu Aug 15 12:18:45 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0EE205B5 for ; Thu, 15 Aug 2013 12:18:45 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D71242BB2 for ; Thu, 15 Aug 2013 12:18:44 +0000 (UTC) Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 0D4BF21266 for ; Thu, 15 Aug 2013 08:18:42 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 15 Aug 2013 08:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=smtpout; bh=3J0q17Uabv42qva/ULR7YZ EltoA=; b=Gen2KXnfnTEELRD957F1yOMkEP8whrzYFTL+L2iYroRwwIqx5oU0D/ 3QiF9rTi7pY3Ab4e6wvC1xpY881FfmGoqiPqgvxSClfiaNabwGqnsyah1ziRE8g1 5HPdCrlUMGMbaGqqxZMI3cjh1ERNi5BtjTIytxrKNvQyWdjkxcHPI= X-Sasl-enc: vw5s3UpynM9+FHarmaHyBu17kNnAnzpnM2q2xwoz105K 1376569121 Received: from tech304.office.supranet.net (unknown [66.170.8.18]) by mail.messagingengine.com (Postfix) with ESMTPA id C61866800C4 for ; Thu, 15 Aug 2013 08:18:41 -0400 (EDT) Date: Thu, 15 Aug 2013 07:18:40 -0500 From: Mark Felder In-Reply-To: References: X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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:18:45 -0000 On Thu, 15 Aug 2013 18:19:35 +0700 Olivier Nicole wrote: > Hi, > > I have been assigned to offer HA on a 3 tiers architecture. > > Data storage tier will be MySQL, so replication is easy. > Keep in mind that MySQL replication has plenty of its own issues. It does not replicate every SQL command to the slave. Guaranteeing that data on both servers is identical is also a very tricky process. You might want to first browse through the sections here to get an idea: http://dev.mysql.com/doc/refman/5.5/en/replication-features.html > 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. > This is easy. Use HAProxy. It can test to see if your local MySQL instance is up and running and if it detects it is not it will automatically pass connections to the remote site's MySQL 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? > This seems unnecessary. Why do you need them to be on the same 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. > Hopefully I've answered this question for you and you see that you shouldn't need these to be on the same subnet.