---
title: "HA-JDBC: High-Availability JDBC"
author: "wutao8818"
date: "2007-12-09T03:27:17Z"
tags: [".net", "Access", "JDBC", "performance", "quartz"]
slug: "ha-jdbc-high-availability-jdbc"
draft: false
lastmod: "2007-12-09T03:27:17Z"
id: 146982
url: "https://wutaoo.iteye.com/blog/146982"
---

数据库集群好伙伴

**Overview**
HA-JDBC is a JDBC proxy that provides light-weight, transparent, fault tolerant clustering capability to any underlying JDBC driver. 

![](http://ha-jdbc.sourceforge.net/images/ha-jdbc.png)

**Features**
Supports any database accessible via JDBC. 
支持任何通过JDBC的数据库访问。
High-availability/Fault Tolerance - An HA-JDBC database cluster can lose a node without failing/corrupting open transactions. 
高可用性/容错，HA-JDBC数据库集群能失去一个节点破坏一个打开的事务。
Live activation/deactivation allows for maintenance/upgrading of a database node without loss of service. 
允许热激活或关闭来维护或者升级数据库节点，而不丢失服务。
Improves performance of concurrent read-access by distributing load across individual nodes. 
通过分布式各个节点提高并发的读性能。
Supports full JDBC 3.0 and 4.0 feature set. 
完全支持JDBC 3.0 and 4.0功能集。
Out-of-the-box database-independent strategies for synchronizing a failed cluster node. 
利用数据库无关的策略同步一个失败的数据库节点
Exposes JMX management interface to allow administration of databases and clusters. 
Ability to add/subtract database nodes to/from a cluster at runtime.
运行时加减数据库节点的能力。
Can be configured to auto-activate failed database nodes during scheduled off-peak times. 
能被配置为自动失败激活数据库节点
Open source (LGPL). 

**Dependent Libraries**
JGroups - reliable multicast communication framework 
Quartz - enterprise job scheduler 
JiBX - an XML binding framework 
SLF4J - a simple facade for various logging APIs. 


**Performance**
The following graphs compare the performance of a single database accessed via normal JDBC vs. a cluster of two identical databases accessed via HA-JDBC.

**Read Operations**
By distributing read operations to each node in the cluster, HA-JDBC is able to achieve better performance under load than normal JDBC access. 
![](http://ha-jdbc.sourceforge.net/images/graph_select.png)

**Write Operations**
By performing write operations in parallel to each node in the cluster, HA-JDBC is only slightly slower than normal JDBC access. The slight performance loss is largely due increased network traffic and parallel processing overhead. 


![](http://ha-jdbc.sourceforge.net/images/graph_insert.png)
![](http://ha-jdbc.sourceforge.net/images/graph_update.png)
![](http://ha-jdbc.sourceforge.net/images/graph_delete.png)

**How does HA-JDBC compare to Sequoia(C-JDBC)?**

Both HA-JDBC and Sequoia attempt to solve the same problem (i.e. eliminating the database as a single point of failure), but have different approaches. 

<http://ha-jdbc.sourceforge.net/faq.html#faq-N1010F>

<http://ha-jdbc.sourceforge.net/>