'''TODO:''' We could use the standby as a read slave, but I don't see the point. In a failure scenario the master needs to be able to handle the entire read load on its own, so it might as well do that all the time.
'''TODO:''' The failover could also be performed manually, if we're a bit leery of infrastructure being too clever for its own good.
'''TODO:''' Depending on our uptime requirements, we might not need to spend the money on establishing this layer. Cross-DC replication and the acceptance of an occasional lost transaction may be a better tradeoff.
+--------------+ +------------------+
| Web App Tier | | Shard Proxy Tier | +---------------------------+ | | | | +---->| MySQL Server Master for Shard #1 N | | +---------+ | | +-------------+ | | +-----------------+----------+ | | Web App | |--->| | Shard Proxy | |---+ | (replication) | +---------+ | | +-------------+ | | +------------V---------------+ | +---------+ | | +-------------+ | +---->| MySQL Server Hot Standby for Shard #2 N | | | Web App | | | | Shard Proxy | | +---------------------------+
| +---------+ | | +-------------+ |
+--------------+ +------------------+
Note that we're '''not''' doing this to the MySQL servers. There's too many of them and we want too fine-grained already have a level of control over their failover behaviourcustom redundancy scheme from the hot standby. ==