MySQL JDBC连接上的故障转移? [英] Failover on MySQL JDBC connections?

查看:413
本文介绍了MySQL JDBC连接上的故障转移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定如何使用MySQL JDBC驱动程序实现高可用性解决方案,似乎有一个我可以设置的故障转移属性.但是我想知道人们在使用MySQL和JDBC实现简单的故障转移机制时会倾向于使用什么?

I am trying to determine how i could implement a high availablity solution using the MySQL JDBC driver, it seems that there is a failover property that I can set. But I am wondering what people tend to use when implement a simple failover mechanism using MySQL and JDBC?

我们计划将2个前端Tomcat服务器连接到2个MySQL服务器.

We are planning to have 2 front Tomcat servers connected to 2 MySQL servers.

推荐答案

即使您在询问JDBC,我希望它可以帮助您了解所有可用的选项...

Even though you're asking about JDBC, I hope this helps you understand all available options...

我通常使用负载均衡配置(可以在JDBC层上进行优雅地故障转移)来处理故障转移.

I typically handle failover by using a load balanced configuration that can gracefully failover, rather than at the JDBC layer.

MySQL Proxy是完成此任务的一种方法:

MySQL Proxy is one way to accomplish that:

http://www.cyberciti.biz/tips/mysql-proxy- howto.html

这篇关于MySQL JDBC连接上的故障转移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆