Presentation is loading. Please wait.

Presentation is loading. Please wait.

Informix Dynamic Server Continuous Availability Feature (CAF)

Similar presentations


Presentation on theme: "Informix Dynamic Server Continuous Availability Feature (CAF)"— Presentation transcript:

1 Informix Dynamic Server 11.50 Continuous Availability Feature (CAF)
Ron Privett KC IIUG Tech Day - 01/22/2009

2 Agenda Overview of CAF (MACH11) Type of CAF Servers
HDR Secondary SDS and RSS CLR Updatable Secondary Servers (11.50 and above) Demo

3 What is CAF? CAF = Continuous Availability Feature (Code name = MACH11) Multi-Node Active Cluster for High Availability: Extends HDR to support multiple secondary instances CAF is a cluster of IDS instances working together on a common set of data to provide 1)High availability, 2) Load balancing and 3) Disaster recovery solutions. CAF clusters includes one primary instance and one or more secondary instances including HDR, SDS and RSS secondary servers. New types of secondary servers introduced with a CAF cluster Shared Disk Secondary (SDS) Remote Standalone Secondary (RSS) Continuous Log Restore (CLR) ** All secondary server instances in a CAF cluster can be configured to support DML operations. ** not exactly a CAF instance but included for the purposes of discussion

4 Agenda Overview of CAF (MACH11) Type of CAF Servers
HDR Secondary SDS and RSS CLR Updatable Secondary Servers (11.50 and above) Demo

5 High-Availability Data Replication (HDR)
Two identical instances on two very similar physical servers: Primary instance Secondary instance Primary physical server: Duplicate of Primary instance structure All database activity – insert/update/deletes, are performed on this instance Sends logs to secondary server Secondary physical server: Read only instance: allows read only operations Always in recovery mode Receives logs from primary instance and replays them to keep in sync with primary When primary instance goes down, secondary instance takes over as updatable instance Primary HDR Secondary Client Apps HDR Traffic Blade Server B Blade Server A Building-A

6 High-Availability Data Replication (HDR) - Review
Requires same Database/Hardware/OS Synchronous or Asynchronous Only Logged Databases are replicated Data in dbspaces and sbspaces supported Blobspace Data not supported All built-in and extended data types supported Ontape or OnBar for Recovery Automatic or Manual failover Encrypted communications available Index Shipping or Index Logging

7 HDR - How it works… Primary Secondary Log Buffers Read Only Logged
I/O Activity

8 Agenda Overview of CAF (MACH11) Type of CAF Servers
HDR Secondary SDS and RSS CLR Updatable Secondary Servers (11.50 and above) Demo

9 Shared Disk Secondary (SDS)
LSN ACK LSN HDR on top of a shared disk subsystem Primary transmits the current Log Sequence Number (LSN) as it is flushing logs SDS instances receives the LSN from the primary and reads the logs from the shared disks SDS instances applies log changes to its buffer cache SDS instances resynch processed LSN to primary Primary SDS SDS Shared disk Disk mirror

10 Remote Standalone Server (RSS)
Similar to HDR: Maintains a full disk copy of the database. Created by performing a backup/restore of the instance Can be used for: Additional Backup, Report processing, Load balancing. Distinct from HDR: Uses full duplex communication (SMX)– better throughput over slower lines. Does not support SYNC mode, not even for checkpoints. Can not currently be ‘promoted’ to primary – but can be promoted to HDR secondary (Focus is on 24 X 7 Availability, Scalability, and Disaster Recovery). There can be any number of RSS instances. Requires Index Page Logging be turned on. RSS can be used in combination with HDR secondary: RSS can be converted into HDR secondary. HDR secondary can be converted into RSS.

11 Agenda Overview of CAF (MACH11) Type of CAF Servers
HDR Secondary SDS and RSS CLR Updatable Secondary Servers (11.50 and above) Demo

12 Continuous Log Restore (CLR)
Also known as “Log Shipping”. Allows logical recovery to span multiple ‘ontape/onbar’ commands. Provides a secondary instance with ‘log file granularity’. Does not impact the primary server. Can co-exist with “the cluster” (HDR/RSS/SDS) as well as ER. Can be automated by scripting the log backup alarms. Useful when backup site is totally isolated (i.e. no network) Primary CLR1 CLR3 CLR2

13 Continuous Log Restore (CLR)
An enhancement to both ontape and OnBar When logs are full and backed-up, the log files can be copied to other supporting instances in CLR mode Logs are applied to target instances as needed Manually - as part of daily or weekly activities Automatically - as set by a TASK, or other processes ontape -l -C onbar -r -l -C Note: A general assumption here is that the source server will archive logs to disk files, rather than tapes

14 Continuous Log Restore (CLR)
Example of CLR HDR Primary Customer has immediate failover (HDR) in local office but also wants an offsite copy. Network outages are common, and throughput is too erratic for RSS. OR Customer needs to be able to recover quickly but doesn’t want / need immediate failover HDR Continuous Log Restore (CLR) Continuous Log Restore Server Customer uses O/S utilities to transfer logs and backups as needed. CLR instance can be up or not. Backups and logs can be applied to instance as business rules dictate. HDR Secondary

15 Advantages of using a CLR server
Verification of Logical Restore Archecker verifies the physical restore, a CLR server can verify the logical restore Faster Recovery Time If you need to restore your entire instance, having a CLR server means you could be back up and running faster Manual or Automatic application of Logical Logs If you have ever dropped a production table, which hits the HDR server, or another RSS server before you can break the connection? With a CLR server, you decide when to apply the logical log files. Another server in case of Disaster Can you ever have too many DR servers?

16 CLR Issues to be aware of…
CLR is designed to assist Disaster Recovery, not designed as a High Availability solution. However, you can ‘promote’ a CLR server into an HDR secondary server (details on the next slide). There is no Point-In-Time restore with CLR, it’s the whole log or nothing. More a Point-In-Log restore. To aid the process of log movement between source and target servers - consider the following: Using the environment variable IFX_ONTAPE_FILE_PREFIX to set the filename of ontape ‘backup to directory’ files. Using a shared disk to store archive files Script the process of removing old ‘applied’ log files to back them up to tape or other archive media.

17 CLR Promotion into an HDR Secondary
If needed, you could promote a CLR server into an HDR secondary server. Here are the steps: Break HDR with the current secondary server On Primary: onmode -d primary {secname} On Secondary: onmode -d secondary {priname} Primary server sees the secondary needs recovery, and will start sending logs: 20:32:56 DR: Secondary server needs failure recovery Secondary sever recovers the logs and becomes available 20:33:02 DR: HDR secondary server operational

18 Agenda Overview of CAF (MACH11) Type of CAF Servers
HDR Secondary SDS and RSS CLR Updatable Secondary Servers (11.50 and above) Demo

19 Updatable Secondary Server
INSERT, UPDATE and DELETE statements are now supported at SDS, HDR and RSS secondary servers. New ONCONFIG Parameter “UPDATABLE_SECONDARY” introduced in to support DML operations at secondary server. Default setting is 0 which means that the secondary server doesn’t allow any DML Statements. Any setting greater than 0 enables DML Statements on the local server acting as a secondary server. Restrictions DDL Statements like CREATE TABLE, CREATE PROCEDURE are still not supported Update Statistics is not supported.

20 Updatable Secondary Server
Redirects an attempted DML operation from the secondary by a pool of proxy threads via SMX interface to the primary database server for execution. Triggers and constraint checking is performed on the primary database server. Uses optimistic concurrency to avoid updating a stale copy of the row. Redirected writes work on the basic data types, UDTs, logged smart BLOBs, and partition BLOBs. Supports temp tables- both explicit and implicit. Works on HDR secondary, RSS nodes, and SDS nodes.

21 How to configure an Updatable Secondary
New ONCONFIG Parameter “REDIRECTED_WRITES” in xC1. From 11.50xC2 onwards “REDIRECTED_WRITES” ONCONFIG parameter is renamed to “UPDATABLE_SECONDARY”. Default setting of the new parameter is 0 which means that the database server doesn’t allow any DML Statements in case it acts as a RSS, HDR Secondary or SDS. Any setting larger than 0 enable DML Statements on the local server acting as a secondary. Server is then configured as a updatable secondary. The setting of the Value bigger than 0 also specify how many SMX network connections to be used for distributed write operations. Parameter setting for the UPDATABLE_SECONDARY is permanent for the uptime of the database server, means no on demand change of the current value with onmode –wf/wm is possible.

22 Differences in server behavior
Local database server acts as an updatable secondary enabled by UPDATABLE_SECONDARY 1 update customer set fname=“XXXXX” where customer_num=110 1 row(s) updated. Default read only behavior by unset UPDATABLE_SECONDARY in ONCONFIG or a setting to 0 update customer set fname=„XXXX“ where customer_num=110 346: Could not update a row in the table. 140: ISAM error: operation illegal on a DR Secondary

23 New SQL error codes returned by the server
Using Redirected Writes on a secondary database server can cause new SQL error codes. Error –7350 An attempt was made to update an invalid version of the current row or the schema of the table doesn’t match with the schema of the primary database server. 7350: Attempt to update a stale version of a row Error in line 1 Near character position 29 Database closed. Error –7351 The connection between the updatable secondary and the primary database server are lost during the execution of the current request or transaction.

24 Agenda Overview of CAF (MACH11) Type of CAF Servers
HDR Secondary SDS and RSS CLR Updatable Secondary Servers (11.50 and above) Demo


Download ppt "Informix Dynamic Server Continuous Availability Feature (CAF)"

Similar presentations


Ads by Google