数据库读写分离+故障自动切库恢复+负载均衡 http://www.oschina.net/code/snippet_1766595_58731