forked from logcabin/logcabin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.conf
250 lines (210 loc) · 9.72 KB
/
sample.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# This is a sample configuration file for LogCabin.
### Server ###
# Each server needs a unique ID. Server IDs are used to tell if two servers are
# the same, so they must be unique across the cluster. There is no default
# value. There are two reasonable ways to generate IDs: one is to assign them
# by incrementing a counter somewhere; another is to create random IDs. This is
# meant to be an unsigned 64-bit integer, but you might want to stick to the
# range 1 through (2^63 - 1).
#
# serverId = -REQUIRED-
# This server will bind to and listen on all of the following addresses. These
# addresses are given to clients and other servers to connect to this one, so
# they must be routable from both clients and servers. As a result, 0.0.0.0
# (all available addresses) and 127.0.0.1 are probably not going to work.
# To provide more than one address, separate them with commas.
#
# listenAddresses = -REQUIRED-
# An opaque string used to prevent accidental communication across LogCabin
# clusters. If set, this string will be checked when creating each
# client-to-server and server-to-server session. If the recipient's has a cluster
# UUID that does not match the UUID in the request, the connection will be
# closed with an error.
#
# The default (empty string) allows communication with any client and server of
# any cluster initially. Once this process discovers a cluster UUID, it will
# insist on using it when creating future sessions.
#
# Set this to a unique string for each cluster to avoid accidental
# communication across LogCabin clusters (which could have disastrous effects
# on your data).
#
# clusterUUID =
### Misc ###
# Controls the verbosity of the server's debug logs. The format is a
# comma-separated list of LEVEL or PATTERN@LEVEL rules. The available levels
# are: SILENT, ERROR, WARNING, NOTICE, and VERBOSE. A pattern matches a
# filename prefix or suffix (from the root directory of the LogCabin
# repository). Example: Client@NOTICE,Test.cc@SILENT,VERBOSE.
# This setting was added in LogCabin v1.1.0.
#
# logPolicy = NOTICE
# The maximum number of threads to launch for each RPC service (default: 16).
#
# maxThreads = 16
# Each servers will dump a bunch of information about itself periodically in
# its debug log at the NOTICE level. This is the number of milliseconds between
# state dumps. A value of 0 means to never print these messages to the log.
# Note: you can also request a server to dump its information by sending it the
# signal SIGUSR1.
#
# statsDumpIntervalMilliseconds = 60000
# The connect() call to initiate a TCP connection can take ages to time out on
# Linux in some circumstances, especially if the remote host is not responding.
# To avoid waiting so long, LogCabin clients and servers give up on a connect()
# call after this many milliseconds. This applies to server-to-server
# connections (which this config file will affect). It may also be set for the
# client library in the map of options passed to the Cluster constructor.
#
# tcpConnectTimeoutMilliseconds = 1000
# The client side of a TCP connection will actively send out pings when it has
# an outstanding RPC but suspects the server of being down. It will send out a
# ping after tcpHeartbeatTimeoutMilliseconds, and if it doesn't get a response
# after another tcpHeartbeatTimeoutMilliseconds, it will close the session.
# This applies to server-to-server connections (which this config file will
# affect). It may also be set for the client library in the map of options
# passed to the Cluster constructor.
#
# tcpHeartbeatTimeoutMilliseconds = 500
### Raft ###
# The number of milliseconds that a follower waits without hearing from a
# current leader or granting its vote, before it becomes a candidate and starts
# a new election. Until we understand how Raft would behave, it's strongly
# recommended that you use the same election timeout setting on every server.
#
# electionTimeoutMilliseconds = 500
# A leader sends RPCs at least this often, even if there is no data to
# send. Default and sane value: electionTimeoutMilliseconds / 2.
#
# heartbeatPeriodMilliseconds = 250
# A candidate or leader waits this long after an RPC fails before sending
# another one, so as to not overwhelm the network with retries.
# Default value: electionTimeoutMilliseconds / 2.
#
# rpcFailureBackoffMilliseconds = 250
# If true and compiled with BUILDTYPE=DEBUG mode, runs through some additional
# checks inside the Raft module. These are very costly, especially if you have
# a large number of entries.
#
# raftDebug = no
### Storage Module ###
# You need to specify the storage module to use.
# Different storage modules require different additional options.
#
# WARNING: it is unsafe to change this setting once the server has participated
# in a cluster, since the server would come online with an empty log. The safe
# way to change this is to first remove the server from the cluster through a
# cluster membership change, then clear out the storage, and add the server
# to the cluster again.
#
# Default: Segmented
# The Memory storage module will store all data in memory only. It will
# probably eat your data, and it's impossible to bootstrap. This is
# experimental and is not part of the public API.
#
# storageModule = Memory
# The SimpleFile storage module stores each log entry in a separate file. It's
# fairly easy to see what the server is storing, but it's not efficient. This
# is untested and is not part of the public API.
#
# storageModule = SimpleFile
#
# A filesystem path for this storage module to operate in. Its parent directory
# must exist.
#
# storagePath = storage
# The Segmented storage module writes log entries sequentially into large files
# called segments, typically 8 MB in size. This should make efficient use the
# disk while still working atop the filesystem.
#
# The Segmented-Text module is similar to Segmented but uses a slow,
# human-readable record format. While this may be useful for development, it is
# not part of the public API.
#
# storageModule = Segmented
#
# A filesystem path for this storage module to operate in. Its parent directory
# must exist.
#
# storagePath = storage
#
# The checksum algorithm to use for records on disk. Most of the crypto++
# algorithms are available, but only CRC32 is part of the public API.
#
# storageChecksum = CRC32
#
# The number of segment files that the Segmented storage module will try to open
# ahead of time. Once Log::append() fills up the head of the log, it will grab
# one of these files to use for the next entry. If there are no files
# available, the append will be blocked temporarily, and you'll see a WARNING
# in the server's debug logs.
#
# storageOpenSegments = 3
#
# The maximum size for each segment that this storage module will create. Note
# that the server will happily read in segments of any size at boot time; this
# option only applies to newly written segments. If an entry is appended to the
# log that is larger than this value, it will be written to its own segment,
# regardless of the size. Default: 8 MB.
#
# storageSegmentBytes = 8388608
#
# If true and compiled with BUILDTYPE=DEBUG mode, runs through some additional
# checks inside the Segmented storage module. These may be costly, especially
# if you have a large number of entries.
#
# storageDebug = no
### Snapshotting ###
# Each server takes a snapshot once the following conditions are met:
# log size > snapshotMinLogSize, AND
# log size > snapshotRatio * last snapshot size
#
# Size in bytes of smallest log to snapshot. Default: 64 MB.
#
# snapshotMinLogSize = 67108864
#
# Maximum log size as multiple of last snapshot size until server should
# snapshot.
#
# snapshotRatio = 4
#
# Snapshotting is done in a separate child process, and if there was a bug in
# LogCabin or its libraries, this child might be prone to deadlock (see
# https://github.com/logcabin/logcabin/issues/121). To detect this deadlock,
# the parent process includes a watchdog thread that makes sure the child
# writes something into the snapshot file during each interval; the length of
# the interval is given by this setting. If the interval elapses with no
# progress made, the child is killed, and another one is started shortly
# thereafter. A value of 0 disables this functionality altogether.
#
# snapshotWatchdogMilliseconds = 10000
### Advanced ###
# If true, this server as leader will not cause the replicated state machine to
# update to a new version. This could potentially be used in the future to test
# a new code release without irreversibly changing the state machine state.
# This behavior is subject to change and is not part of the public API.
#
# disableStateMachineUpdates = false
# Controls how long Raft waits after failing to advance the state machine to
# a new version. This can happen when:
# - The servers do not currently support a common version, or
# - This server has not yet received version information from all other
# servers, or
# - An advance state machine log entry failed to commit (probably due to lost
# leadership).
# The system shouldn't be very sensitive to changes in this setting, and you
# shouldn't need to change this unless you're encountering problems with it.
#
# stateMachineUpdaterBackoffMilliseconds = 10000
# The state machine logs messages when it receives a command or query that is
# not understood in the current running version. This controls the minimum
# interval between such messages to prevent spamming the debug log. You
# shouldn't need to change this unless you're encountering problems with it.
#
# stateMachineUnknownRequestMessageBackoffMilliseconds = 10000
# A leader will pack at most this many entries into an AppendEntries request
# message. This helps bound processing time when entries are very small in
# size. You shouldn't need to change this unless you're encountering problems
# with it.
#
# maxLogEntriesPerRequest = 5000