@@ -50,65 +50,4 @@ In addition to the replication factor, there is a **writeConcern** that
5050specifies the minimum number of in-sync followers required for write operations.
5151If you specify the ` writeConcern ` parameter with a value greater than ` 1 ` , the
5252collection's leader shards are locked down for writing as soon as too few
53- followers are available.
54-
55- ## Asynchronous replication
56-
57- When using asynchronous replication, _ Followers_ connect to a _ Leader_ and apply
58- all the events from the Leader log in the same order locally. As a result, the
59- _ Followers_ end up with the same state of data as the _ Leader_ .
60-
61- _ Followers_ are only eventually consistent with the _ Leader_ .
62-
63- Transactions are honored in replication, i.e. transactional write operations
64- become visible on _ Followers_ atomically.
65-
66- All write operations are logged to the Leader's _ write-ahead log_ . Therefore,
67- asynchronous replication in ArangoDB cannot be used for write-scaling. The main
68- purposes of this type of replication are to provide read-scalability and
69- hot standby servers.
70-
71- It is possible to connect multiple _ Follower_ to the same _ Leader_ . _ Followers_
72- should be used as read-only instances, and no user-initiated write operations
73- should be carried out on them. Otherwise, data conflicts may occur that cannot
74- be solved automatically, and this makes the replication stop.
75-
76- In an asynchronous replication scenario, Followers _ pull_ changes
77- from the _ Leader_ . _ Followers_ need to know to which _ Leader_ they should
78- connect to, but a _ Leader_ is not aware of the _ Followers_ that replicate from it.
79- When the network connection between the _ Leader_ and a _ Follower_ goes down, write
80- operations on the Leader can continue normally. When the network is up again, _ Followers_
81- can reconnect to the _ Leader_ and transfer the remaining changes. This
82- happens automatically, provided _ Followers_ are configured appropriately.
83-
84- ### Replication lag
85-
86- As described above, write operations are applied first in the _ Leader_ , and then applied
87- in the _ Followers_ .
88-
89- For example, let's assume a write operation is executed in the _ Leader_
90- at point in time _ t0_ . To make a _ Follower_ apply the same operation, it must first
91- fetch the write operation's data from Leader's write-ahead log, then parse it and
92- apply it locally. This happens at some point in time after _ t0_ , let's say _ t1_ .
93-
94- The difference between _ t1_ and _ t0_ is called the _ replication lag_ , and it is unavoidable
95- in asynchronous replication. The amount of replication _ lag_ depends on many factors, a
96- few of which are:
97-
98- - the network capacity between the _ Followers_ and the _ Leader_
99- - the load of the _ Leader_ and the _ Followers_
100- - the frequency in which _ Followers_ poll the _ Leader_ for updates
101-
102- Between _ t0_ and _ t1_ , the state of data on the _ Leader_ is newer than the state of data
103- on the _ Followers_ . At point in time _ t1_ , the state of data on the _ Leader_ and _ Followers_
104- is consistent again (provided no new data modifications happened on the _ Leader_ in
105- between). Thus, the replication leads to an _ eventually consistent_ state of data.
106-
107- ### Replication overhead
108-
109- As the _ Leader_ servers are logging any write operation in the _ write-ahead-log_
110- anyway, replication doesn't cause any extra overhead on the _ Leader_ . However, it
111- causes some overhead for the _ Leader_ to serve incoming read
112- requests of the _ Followers_ . However, returning the requested data is a trivial
113- task for the _ Leader_ and should not result in a notable performance
114- degradation in production.
53+ followers are available.
0 commit comments