Difference between revisions of "Database Load Balancing"

From LVSKB
Jump to: navigation, search
(C-JDBC: Flexible Database Clustering Middleware)
(ScaleBase Database Load Balancer)
 
(7 intermediate revisions by 5 users not shown)
Line 11: Line 11:
 
Sequoia is the new version of the C-JDBC project under Apache license. The website is http://sequoia.continuent.org/HomePage.
 
Sequoia is the new version of the C-JDBC project under Apache license. The website is http://sequoia.continuent.org/HomePage.
  
and Carob,Bringing Sequoia technology to the C/C++ world. http://carob.continuent.org/HomePage
+
And Another related project is Carob, Bringing Sequoia technology to the C/C   world. The web page is http://carob.continuent.org/HomePage.
Carob's purpose is to offer Sequoia access to ODBC, C and C++ client applications.
+
Carob's purpose is to offer Sequoia access to ODBC, C and C   client applications.
  
 
=== SQL Relay ===
 
=== SQL Relay ===
Line 39: Line 39:
 
:''MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture allows the system to work with very inexpensive hardware, and without any specific requirements on hardware or software. It also does not have any single point of failure because each component has its own memory and disk.''
 
:''MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture allows the system to work with very inexpensive hardware, and without any specific requirements on hardware or software. It also does not have any single point of failure because each component has its own memory and disk.''
  
====Emic Networks====
+
See the article [[Building MySQL Cluster using LVS]] for how LVS is used to balance traffic among SQL nodes in MySQL cluster.
 
+
a long-time provider of clusters for MySQL. The code is released under
+
the Apache Public License.
+
  
 
=== PostgreSQL Clusters ===
 
=== PostgreSQL Clusters ===
 +
 +
There is no "native" method to create a DB clusters in PostgreSQL, but several methods are supported. The user is expected to choose the one that will fit better its application.
 +
 +
In Unix environments you can define a PostgreSQL cluster using Heartbeat,or PgPOOL, and on Windows, PostgreSQL service may be added as a MSCS managed resource. So, on Windows a "fail-over" cluster is accepted. PgPOOL is specially created, to offer a "load-balancing" function.
  
 
== Commercial Solutions ==
 
== Commercial Solutions ==
 +
 +
=== ScaleBase Database Load Balancer ===
 +
 +
The ScaleBase Database Load Balancer (SDLB) is a database load balancer, with a concept very similar to an HTTP load balancer. It supports database redundancy (transparently failing over to a replica database when the master database crashes), read scalability (reading can be done from the master and replica databases) and write scalability (by splitting write operations between multiple databases, a technique called transparent sharding).
 +
 +
For more info: <br>
 +
http://www.scalebase.com
  
 
=== Oracle Real Application Clusters ===
 
=== Oracle Real Application Clusters ===
Line 53: Line 61:
  
 
=== Microsoft SQL Server Clusters ===
 
=== Microsoft SQL Server Clusters ===
 +
 +
MS SQL server is a valid option for database clustering.
 +
 +
Natively, a fail over cluster is supported by MS SQL server (active-passive configuration), but load balancing (active-active structure) may be configured also, under certain circumstances. We can define “active-active”, “active-passive”, “active-active-passive” or other types of cluster modes, depending on the necessities.
 +
 +
The first step in installing MS SQL as a resource in a cluster configuration is to have MSCS already installed on the clustered machines. MSCS is the Microsoft Cluster Service (available for Windows Server 2000, 2003). When initializing the MS SQL server 2000 or 2005 , enterprise edition, the MSCS cluster will be automatically detected.
 +
 +
A VIP (Virtual IP address) will exist for the cluster system. Clients transparently communicate to the SQL Virtual server. Physically, clients communicate with the Active Node A instance, when available, and with Passive Node B, when first server is down (in an active-passive configuration). Clients will have any knowledge of the active system behind their virtual SQL server. The Windows OS (MSCS) will handle client -- DB server communication.
 +
 +
Both nodes in cluster are connected through a private network connection, used for determining if the pair system is active. The cluster also requires a shared disk for database data files.
 +
 +
For more details see: <br>
 +
- http://www.codeproject.com/database/SqlServerDBClusterMSCS.asp  <br>
 +
- http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/failclus.mspx <br>
 +
- http://www.sqlservercentral.com/articles/Installation/clustering_a_sql_server_machine_/344/
 +
 +
  
  

Latest revision as of 13:57, 1 March 2011

Introduction

Open Source Solutions

C-JDBC: Flexible Database Clustering Middleware

C-JDBC (Clustered JDBC) is a freely available, open source, flexible and efficient middleware for database clustering. C-JDBC presents a single virtual database to the application through the JDBC interface. It does not require any modification to JDBC-based applications. It works with any database engine that provides a JDBC driver, without modification to the database engine. The flexible architecture of C-JDBC supports large and complex database cluster architectures offering various performance, fault tolerance and availability.

See http://c-jdbc.objectweb.org/

Sequoia is the new version of the C-JDBC project under Apache license. The website is http://sequoia.continuent.org/HomePage.

And Another related project is Carob, Bringing Sequoia technology to the C/C world. The web page is http://carob.continuent.org/HomePage. Carob's purpose is to offer Sequoia access to ODBC, C and C client applications.

SQL Relay

SQL Relay is a persistent database connection pooling, proxying and load balancing system for Unix and Linux. SQL Relay is ideal for:

  • speeding up database-driven web-based applications
  • enhancing the scalability of database-driven web-based applications
  • distributing access to replicated databases
  • throttling database access
  • accessing databases from unsupported platforms
  • migrating applications from one database to another

See http://sqlrelay.sourceforge.net/

PS: This text is copied from SQLrelay's home page.

MySQL Clusters

MySQL supports couple of different ways to increase database availability and scalability. Most commonly used way of increasing availability is replication. Replication, as its name indicates, copies data from one master server to slave(s) and it has been available since MySQL 3.23. Starting with MySQL 4.1 a new storage engine introduced called NDB and NDB stands for Network Data Base. Although most people thinks that replication is a form of clustering, in MySQL world, cluster is actually a set of NDB nodes.

NDB nodes uses memory to store data and keeps at least 2 copies of data on 2 seperate boxes. In essence, it is almost like Raid arrays (level 1 in this case) using memory instead of hard drives. Minimum requirement for a MySQL cluster is 3 boxes. 2 of these boxes store data in their memory and they're called Data Nodes. At least one box needed for SQL node, and it acts as a regular database server where applications are connecting to.

More info about MySQL clustering concepts can be found at :

MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture allows the system to work with very inexpensive hardware, and without any specific requirements on hardware or software. It also does not have any single point of failure because each component has its own memory and disk.

See the article Building MySQL Cluster using LVS for how LVS is used to balance traffic among SQL nodes in MySQL cluster.

PostgreSQL Clusters

There is no "native" method to create a DB clusters in PostgreSQL, but several methods are supported. The user is expected to choose the one that will fit better its application.

In Unix environments you can define a PostgreSQL cluster using Heartbeat,or PgPOOL, and on Windows, PostgreSQL service may be added as a MSCS managed resource. So, on Windows a "fail-over" cluster is accepted. PgPOOL is specially created, to offer a "load-balancing" function.

Commercial Solutions

ScaleBase Database Load Balancer

The ScaleBase Database Load Balancer (SDLB) is a database load balancer, with a concept very similar to an HTTP load balancer. It supports database redundancy (transparently failing over to a replica database when the master database crashes), read scalability (reading can be done from the master and replica databases) and write scalability (by splitting write operations between multiple databases, a technique called transparent sharding).

For more info:
http://www.scalebase.com

Oracle Real Application Clusters

IBM DB2 Clusters

Microsoft SQL Server Clusters

MS SQL server is a valid option for database clustering.

Natively, a fail over cluster is supported by MS SQL server (active-passive configuration), but load balancing (active-active structure) may be configured also, under certain circumstances. We can define “active-active”, “active-passive”, “active-active-passive” or other types of cluster modes, depending on the necessities.

The first step in installing MS SQL as a resource in a cluster configuration is to have MSCS already installed on the clustered machines. MSCS is the Microsoft Cluster Service (available for Windows Server 2000, 2003). When initializing the MS SQL server 2000 or 2005 , enterprise edition, the MSCS cluster will be automatically detected.

A VIP (Virtual IP address) will exist for the cluster system. Clients transparently communicate to the SQL Virtual server. Physically, clients communicate with the Active Node A instance, when available, and with Passive Node B, when first server is down (in an active-passive configuration). Clients will have any knowledge of the active system behind their virtual SQL server. The Windows OS (MSCS) will handle client -- DB server communication.

Both nodes in cluster are connected through a private network connection, used for determining if the pair system is active. The cluster also requires a shared disk for database data files.

For more details see:
- http://www.codeproject.com/database/SqlServerDBClusterMSCS.asp
- http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/failclus.mspx
- http://www.sqlservercentral.com/articles/Installation/clustering_a_sql_server_machine_/344/



LVS.png "Database Load Balancing" is an load balancing related stub. You can help LVSKB by expanding it