Subject Re: [Firebird-general] FB and high availability / clustering solutions
Author Phil Shrimpton
On Monday 28 June 2004 00:01, Robby wrote:

Hi,

> I'm interested to see if anyone has Firebird deployed in a
> high-availability or clustering environment.

This is how we do it..

- Our 'middle tiers' are built to be HA/Cluster aware. This, in the majority
of cases, handles client loadbalacing and to some extent HA requirments. Our
'middle tiers' tend to be stateless where ever possible which allows 20-50 to
1 multiplexing on the client to db connection ratio. Our largest system (and
I have to be vague here) handles ~20K 'clients' on a single DB server using
~20 'middle tiers' in a cluster'

- For HA we use a number of separate FB servers and replication. Its our own
replication engine but does nothing special compared to anything that is
available else where (in fact it does a lot less). Only one DB server is
active at anyone time. There is a process in the 'middle tier' that monitors
the main 'datasource' (i.e. does a select * from rdb$database every 30 secs),
and if it becomes unavailable, it invalidates any current transactions in the
system, brings the datasource down, swaps it to one of the other db servers
and starts it back up again. Due to the way we handle transactions no data
is lost, but any 'active' client transactions will fail during the change
over process. Being stateless systems, 'transactions' are normally short and
sweet, so not a great deal has to be re-done (we also code the clients to
re-try in case of failure). When the main DB does go down, the system just
creates an email with the failure information and the DB server it is now
using and sends it to an admin. When the admin has got the main db server
backup and running, and replicated changes from the secondry DB back, she/he
takes the secondry server off line, the system picks it up, and swaps back to
the 'main one'. If the secondary DB server goes down before the main one is
back up, the system swaps to a third... and so on.

..not the best solution, but faced with an Oracle clustered solution,
especially on 8/12 cpu machines, it tends to win <g>

Phil

--
Discover a lost art - play Marbles
May 2004
www.marillion.com
ICQ: 760757 | AIM: pjshrimpton | Y!: pjshrimpton | pjshrimpton@...