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>Client to Client Transfer</title> 7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" /> 9 <link rel="home" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" /> 10 <link rel="up" href="addfeatures.html" title="Chapter��5.��Additional Features" /> 11 <link rel="previous" href="noautoinit.html" title="Stop Auto-Initialization" /> 12 <link rel="next" href="bulk.html" title="Bulk Transfers" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Client to Client Transfer</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="noautoinit.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��5.��Additional Features</th> 23 <td width="20%" align="right">��<a accesskey="n" href="bulk.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="c2ctransfer"></a>Client to Client Transfer</h2> 33 </div> 34 </div> 35 <div></div> 36 </div> 37 <p> 38 It is possible to use a replica instead of a master to synchronize another 39 replica. This serves to take the request load off a master that might otherwise 40 occur if multiple replicas attempted to synchronize with the master at the same 41 time. 42 </p> 43 <p> 44 For best results, use this feature combined with the delayed synchronization 45 feature (see <a href="addfeatures.html#delayedsync">Delayed Synchronization</a>). 46 </p> 47 <p> 48 For example, suppose your replication group consists of four environments. Upon 49 application startup, all three replicas will immediately attempt to synchronize 50 with the master. But at the same time, the master itself might be busy with a heavy 51 database write load. 52 </p> 53 <p> 54 To solve this problem, delay synchronization for two of the three replicas. Allow 55 the third replica to synchronize as normal with the master. Then, start 56 synchronization for each of the delayed replicas (since this is a manual process, 57 you can do them one at a time if that best suits your application). 58 Assuming you have configured replica to replica synchronization correctly, the 59 delayed replicas will synchronize using the up-to-date replica, rather than using 60 the master. 61 </p> 62 <p> 63 When you are using the replication framework, you configure replica to replica synchronization by 64 declaring one environment to be a peer of another environment. If an 65 environment is a peer, then 66 it can be used for synchronization purposes. 67 </p> 68 <div class="sect2" lang="en" xml:lang="en"> 69 <div class="titlepage"> 70 <div> 71 <div> 72 <h3 class="title"><a id="fmwrkpeerserver"></a>Identifying Peers</h3> 73 </div> 74 </div> 75 <div></div> 76 </div> 77 <p> 78 You can designate one replica to be a peer of 79 another, and then use this special 80 status for permanent message acknowledgments, 81 and for replica-to-replica synchronization. 82 You might want to do this if you have 83 machines that you know are on fast, reliable 84 network connections and so you are willing to 85 accept the overhead of waiting for 86 acknowledgments from those specific machines. 87 </p> 88 <p> 89 An environment is currently allowed to have only one 90 peer. 91 </p> 92 <p> 93 Note that peers are not required to be a 94 bi-directional. That is, just because machine A 95 declares machine B to be a peer, that does not mean 96 machine B must also declare machine A to be a peer. 97 </p> 98 <p> 99 You declare a peer for the current environment 100 when you add that environment to the list of known 101 sites. You do this by 102 <span>specifying the 103 <tt class="literal">DB_REPMGR_PEER</tt> flag to 104 <span><tt class="methodname">DB_ENV->repmgr_add_remote_site()</tt>.</span> 105 106 </span> 107 108 </p> 109 </div> 110 </div> 111 <div class="navfooter"> 112 <hr /> 113 <table width="100%" summary="Navigation footer"> 114 <tr> 115 <td width="40%" align="left"><a accesskey="p" href="noautoinit.html">Prev</a>��</td> 116 <td width="20%" align="center"> 117 <a accesskey="u" href="addfeatures.html">Up</a> 118 </td> 119 <td width="40%" align="right">��<a accesskey="n" href="bulk.html">Next</a></td> 120 </tr> 121 <tr> 122 <td width="40%" align="left" valign="top">Stop Auto-Initialization��</td> 123 <td width="20%" align="center"> 124 <a accesskey="h" href="index.html">Home</a> 125 </td> 126 <td width="40%" align="right" valign="top">��Bulk Transfers</td> 127 </tr> 128 </table> 129 </div> 130 </body> 131</html> 132