Subject RE: [firebird-support] Clustering Firebird
Author Dalton Calford
In order to setup clustering, fail-over replication and other such design methods, you need to design your schema to support it from the start.

Once 2.5 is released, firebird will be able to become it's own middle tier. This will allow you to create a superset of databases that connect to multiple database backends. This will ease the transition but will not eliminate the need to totally rethink your application design.

When you are dealing with a cluster, you need to determine which data changes and it's rate of change. You also need to calculate the points of contention such as generators or data locking (not a sql thing, more of an application thing).

Using a middle tier, or multiple middle tiers that are in a round-robin dns configuration, that in turn connect to a series of databases, that are designed to replicate the transactions to one another, is doable but not simple. You need to be able to isolate if the transaction occured in the current database or if it was replicated to the current database, as you are introducing state and stateless data into your system.
For example, if you have an accounting program, and you have the AR people calling and harrassing people for non-payment, while another operator happens to be taking payment, you need to be able to ensure that the AR people are properly notified of the change of the customers balance. This is easy in a single database, but if you are clustering over 200 servers, you need a notification system as you don't want your middle tier querying every possible database or have your staff waiting for each database to be fully updated. You must always assume your data is not complete. You design a notification system, that also coordinates your replication/redundancy system, so that the middle tier knows where the most current data is, and the replication system knows what data needs to be updated and to where.

I have yet to find a good book on the subject as everyones schema is different and as such, the design for clustering is different. If you go with a generic system, where you are using low level data replication, ie nback or lvm block managers, your efficiency and speed will drop.

If you give more details about the type of data etc, I can be more specific.

best regards

Dalton



________________________________

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Diederik Wierenga
Sent: July 7, 2009 2:48 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Clustering Firebird





Hello All,

We have been using Firebird for quite a while now and are very pleased with the performance and behaviour.

However, we are looking into (and are being asked by our clients) to clustering, load balancing and automatic failover behaviour. As we are using Linux as our primary server setup, this should all of course work under Linux.

Are there any pointers/documents/tools available on how to setup clustering and/or load balancing? Are there any environments know that can handle automatic failovers (back and forth)?

Any information would be greatly appreciated.

Our standard architecture is a middleware server that accepts requests from client applications and takes care of the communication with Firebird. The client applications do not directly connect to the firebird database. The middleware and firebird generally run on the same machine. The number of requests can run up to approx 1000 per minute.

Kind regards,

Diederik






[Non-text portions of this message have been removed]