X

Learn all about Oracle BerkeleyDB family of databases here. Scalable and high-performance data management services.

BDB Write Forwarding

Michael Schulman
Sr. Principal Product Manager

(Courtesy of Paula Bingham) 

Simpler High Availability with Write Forwarding



Do you have a simple Berkeley DB application that would benefit from higher availability or improved read scalability?

These are well-known benefits of using Berkeley DB High Availability (BDB-HA).  You can use BDB-HA to turn your application into a distributed application using two or more nodes.  One node is the master node on which you can perform read and write operations; the other nodes are replicas which only support read operations.  When one node is down, the other nodes keep your application available to users. If you have many read operations, they can be distributed among different nodes.

 You might ask "But wait, what if I don't want to restrict write operations to the master node?" and "Isn't it complicated to add BDB-HA to an existing application?"

If your application performs its write operations one-per-transaction without using cursors, it is a candidate for the new Replication Manager write forwarding feature.  When write forwarding is enabled, these simple write operations can be performed on a replica.

The code changes to add Replication Manager write forwarding to your application are relatively simple and fall into the following major categories:

  • Configure and start Replication Manager:  You need to explicitly enable write forwarding, configure your nodes, and start Replication Manager.
  • Manage database creation: You only need to create your databases on the initial master node.  BDB-HA replicates them to the replica nodes.
  • Error handling: Minor code changes to handle a few additional BDB-HA errors.

See "Configuring for Write Forwarding"  in the Berkeley DB documentation for more information and sample code illustrating these points.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.