You are on page 1of 22

DB2 Active-Active Clustering

Dwaine R. Snow and Linda Snow IBM

IBM Software Group

What Do You Want From Your Solution?

Continuously Available 1.Highly Available 2.Low Cost 3.Easy to Setup/Administer 4.All Servers Active

IBM Software Group Traditional HA Clusters 2 Servers Active .Passive If / when the primary server fails Transactions move to the standby Application Failover can be very fast X .

IBM Software Group Active / Active Clustering Fast. plus… Ability to add database and server capacity as the “workload” grows Workload can be: More data More users Both Application . transparent failover.

IBM Software Group DB2 Active / Active Clustering – HA Application(s) Load Balancer DB2a DB2b … DB2n Local Servers .HA and Scalability .

IBM Software Group And Beyond Application(s) HA DR and Scale Out in one solution Load Balancer DB2drn … DB2dr1 DB2a DB2b … DB2n Remote For DR Remote For DR Local Servers .HA and Scalability .

IBM Software Group GRIDSCALE at a High Level . insert/update/delete) to all DB2 servers Load Balancer Write DB2drn … DB2dr1 DB2a DB2b … DB2n Remote – For DR Local .Writes Application(s) Send Writes (i.e.For HA and Scalability .

Writes Application(s) Return to the application as soon as the FIRST DB2 server completes Complete Load Balancer Remaining servers complete and return to the load balancer DB2 server completes processing the statement and returns to the load balancer DB2drn … DB2dr1 DB2a DB2b … DB2n Remote – For DR Local .IBM Software Group GRIDSCALE at a High Level .For HA and Scalability .

For HA and Scalability .IBM Software Group apLive at a High Level .Writes Application(s) Send all Writes to the Master Load Balancer Write As well as all transactions. even the selects within a transaction DB2srn … DB2sr11 DB2M DB2s1 … DB2s2 Remote – For DR Local .

Writes Application(s) Return to the application as soon as the Master DB2 server completes Complete Load Balancer Writes sent to slaves Asynchronously DB2 server completes processing the statement and returns to the load balancer DB2drn … DB2dr1 DB2a DB2b … DB2n Remote – For DR Local .IBM Software Group apLive at a High Level .For HA and Scalability .

For HA and Scalability Remote – For DR .IBM Software Group The Solutions at a High Level . GRIDSCALE ensures data read consistency by sending the query to the server where data is up to date. DB2drn … DB2dr1 apLive does NOT guarantee data read consistency Read 1 Read 2 Read 3 data can read from a slave where a write has not yet been applied DB2a DB2b … DB2n Local .Reads Application(s) Read 1 Read 2 Read 3 Load Balancer Reads are sent to the DB2 server with lowest queue.

or it failed while processing the statement.IBM Software Group Failure Handling Application(s) If the server was unavailable/unreachable. that statement is moved to a surviving server transparently and without any intervention Read Return Load Balancer Read Read Return DB2drn DB2dr1 DB2a X DB2b … DB2n No block re-mastering. crash recovery. etc. .

IBM Software Group Online. or new version Add back into the cluster Load Balancer Apply “missed” writes Time to apply will depend on: Time system was out of the cluster Transaction rate Once back in synch. Rolling Upgrades – xkoto only Application(s) Stop sending new work Apply fixpack. Start sending incoming SQL Repeat for other servers as necessary DB2drn DB2dr1 Mixed FPs / Versions supported DB2a DB2b … DB2n V8–>V9 FP3–>FP6 .

IBM Software Group A Use Case Application Philadelphia Load Balancer Application Phoenix Load Balancer xkoto can have 2 load balancers apLive does not support more than one master DB2a DB2b DB2c DB2x DB2y DB2z .

IBM Software Group DB2 Active / Active Clustering vs. Shared Disk Application(s) Application(s) Load Load Balancer Balancer nd1 SPOF? Can add 2nd inexpensive load balancer Can add a 2nd switch. but costly nd2 nd3 SPOF DB2a DB2b DB2n .

Shared Disk for HA and DR Application(s) Application(s) Application(s) Load Load Balancer Balancer nd1 nd2 nd3 nd1 nd2 nd3 X2 Data Guard DB2a DB2b DB2n X2 ? Local Remote Local Remote .IBM Software Group DB2 Active / Active Clustering vs.

IBM Software Group DB2 Active / Active Clustering vs. Shared Disk Application(s) Application(s) Load Balancer nd1 nd2 nd3 Expensive Switch and Storage DB2a DB2b DB2n SAME Low Cost Storage .

instantaneous failover for HA Ability to add predictable capacity on demand by adding servers DB2’s Active-Active Clustering adds Very Good Scalability Distance Clustering = Continuous Availability Transparent failover between local and remote servers .IBM Software Group Active-Active Clustering Provides Access to all DB servers Scalability.

commodity servers and storage Without: The need for high cost shared storage and/or switches .IBM Software Group Protection Against Server Failure AND Disk Failure With: Low cost.

IBM Software Group Recommended Starting Configuration Application(s) 3 DB2 Servers Load Load Balancer Balancer In a worst case scenario. If a server needs to be rebuilt Can clone the database from one of the surviving severs And still have the database up and running DB2a DB2b DB2c .

IBM Software Group Summary DB Server failure is completely transparent All patches can be online. Scale out. and DR solution in one No shared disk and/or switch as single points of failure! . and rolling! Even version to version upgrades Best to have at least 3 DB2 servers to support this Can build an HA.

IBM Software Group .