<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/apache/tags/database</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 07:08:00 GMT</pubDate>
<item>
<title>(Apache) HAProxy database load-balancing and redundancy - alexwilliams</title>
<link>http://snipplr.com/view/18033/haproxy-database-loadbalancing-and-redundancy/</link>
<description><![CDATA[ <p>_This hasn't been tested in production yet. Use at your own risk_

The read cluster contains 7 servers which can accept *READ* requests, but not all at once (see Failure Scenarios).

The write cluster contains 4 servers which can accept *WRITE* requests (only 1 at a time though, *don't be stupid*).

Port 9201 is an HTTP service which checks if replication is running fine (SlaveIO yes, SlaveSQL yes, SecondsBehindMaster 0).

Port 9200 is an HTTP service which checks if mysql is running fine (results appear after performing 'show databases').

In both cases (ports 9200 and 9201), a simple shell script is installed on each server which then runs as a STREAM daemon through xinetd) and outputs a "200 OK" or "503 Service Unavailable".</p> ]]></description>
<pubDate>Fri, 07 Aug 2009 13:55:46 GMT</pubDate>
<guid>http://snipplr.com/view/18033/haproxy-database-loadbalancing-and-redundancy/</guid>
</item>
</channel>
</rss>