1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>Replication Benefits</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" /> 10 <link rel="up" href="introduction.html" title="Chapter��1.��Introduction" /> 11 <link rel="prev" href="introduction.html" title="Chapter��1.��Introduction" /> 12 <link rel="next" href="apioverview.html" title="The Replication APIs" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Replication Benefits</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="introduction.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��1.��Introduction</th> 23 <td width="20%" align="right">��<a accesskey="n" href="apioverview.html">Next</a></td> 24 </tr> 25 </table> 26 <hr /> 27 </div> 28 <div class="sect1" lang="en" xml:lang="en"> 29 <div class="titlepage"> 30 <div> 31 <div> 32 <h2 class="title" style="clear: both"><a id="repadvantage"></a>Replication Benefits</h2> 33 </div> 34 </div> 35 </div> 36 <p> 37 38 Replication offers your application a number of benefits that 39 can be a tremendous help. Primarily replication's benefits 40 revolve around performance, but there is also a benefit in 41 terms of data durability guarantees. 42 </p> 43 <p> 44 Briefly, the reasons why you might choose to implement 45 replication in your DB application are: 46 </p> 47 <div class="itemizedlist"> 48 <ul type="disc"> 49 <li> 50 <p> 51 Improve application reliability. 52 </p> 53 <p> 54 By spreading your data across multiple 55 machines, you can ensure that your 56 application's data continues to be 57 available even in the event of a 58 hardware failure on any given machine in 59 the replication group. 60 </p> 61 </li> 62 <li> 63 <p> 64 Improve read performance. 65 </p> 66 <p> 67 By using replication you can spread data reads across 68 multiple machines on your network. Doing so allows you 69 to vastly improve your application's read performance. 70 This strategy might be particularly interesting for 71 applications that have readers on remote network nodes; 72 you can push your data to the network's edges thereby 73 improving application data read responsiveness. 74 </p> 75 <p> 76 Additionally, depending on the portion of your data 77 that you read on a given replica, that replica may need 78 to cache part of your data, decreasing cache misses and 79 reducing I/O on the replica. 80 </p> 81 </li> 82 <li> 83 <p> 84 Improve transactional commit performance 85 </p> 86 <p> 87 In order to commit a transaction and achieve a 88 transactional durability guarantee, the commit must be 89 made <span class="emphasis"><em>durable</em></span>. That is, the commit 90 must be written to disk (usually, but not always, 91 synchronously) before the application's thread of 92 control can continue operations. 93 </p> 94 <p> 95 Replication allows you to avoid this disk I/O and still 96 maintain a degree of durability by <span class="emphasis"><em>committing 97 to the network</em></span>. In other words, you relax 98 your transactional durability guarantees on the master, 99 but by virtue of replicating the data across the 100 network you gain some additional durability guarantees 101 above what is provided locally. 102 </p> 103 <p> 104 Usually this strategy is implemented using some form of 105 an asynchronous transactional commit on the master. In 106 this way your data writes will eventually be written to 107 disk, but your application will not have to wait for 108 the disk I/O to complete before continuing with its 109 next operation. 110 </p> 111 <p> 112 Note that it is possible to cause DB's replication 113 implementation to wait to hear from one or 114 more replicas as to whether they have successfully 115 saved the write before continuing. However, in this 116 case you might be trading performance for a even 117 higher durability guarantee (see below). 118 </p> 119 </li> 120 <li> 121 <p> 122 Improve data durability guarantee. 123 </p> 124 <p> 125 In a traditional transactional application, you commit your 126 transactions such that data modifications are saved to 127 disk. Beyond this, the durability of your data is 128 dependent upon the backup strategy that you choose to 129 implement for your site. 130 </p> 131 <p> 132 Replication allows you to increase this durability 133 guarantee by ensuring that data modifications are 134 written to multiple machines. This means that multiple 135 disks, disk controllers, power supplies, and CPUs are 136 used to ensure that your data modification makes it to 137 stable storage. In other words, replication allows you 138 to minimize the problem of a single point of failure 139 by using more hardware to guarantee your data writes. 140 </p> 141 <p> 142 If you are using replication for this reason, then you 143 probably will want to configure your application such 144 that it waits to hear about a successful commit from 145 one or more replicas before continuing with the next 146 operation. This will obviously impact your 147 application's write performance to some degree 148 ��� with the performance penalty being largely dependent 149 upon the speed and stability of the network connecting 150 your replication group. 151 </p> 152 <p> 153 For more information, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>. 154 </p> 155 </li> 156 </ul> 157 </div> 158 </div> 159 <div class="navfooter"> 160 <hr /> 161 <table width="100%" summary="Navigation footer"> 162 <tr> 163 <td width="40%" align="left"><a accesskey="p" href="introduction.html">Prev</a>��</td> 164 <td width="20%" align="center"> 165 <a accesskey="u" href="introduction.html">Up</a> 166 </td> 167 <td width="40%" align="right">��<a accesskey="n" href="apioverview.html">Next</a></td> 168 </tr> 169 <tr> 170 <td width="40%" align="left" valign="top">Chapter��1.��Introduction��</td> 171 <td width="20%" align="center"> 172 <a accesskey="h" href="index.html">Home</a> 173 </td> 174 <td width="40%" align="right" valign="top">��The Replication APIs</td> 175 </tr> 176 </table> 177 </div> 178 </body> 179</html> 180