-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreplicore.example.yaml
285 lines (244 loc) · 9.86 KB
/
replicore.example.yaml
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
# Events Streaming Platform service configuration.
events:
# Events Streaming Platform implementation for the RepliCore control plane to use.
#
# Available implementations can be enabled and disabled at compile time so the exact
# list of options may vary but the following implementations are included by default:
#
# - sqlite: store events into a locally persisted SQLite database.
# NO SUPPORT FOR HIGH AVAILABLE CLUSTERS.
# ONLY SUITABLE FOR SMALL CLUSTERS.
backend: REQUIRED
# Implementation specific options are provided as additional attributes here.
# === For SQLite backend ===
# Path to the SQLite DB file.
#path: store.sqlite
#
# Events retention and history clean up rules.
#retention:
# # Number of days to keep events in the DB for.
# age: 30
#
# # Maximum number of expired events to delete in a single history clean loop.
# clean_batch: 500
#
# # Minutes to wait between each run of the history clean loop.
# clean_delay: 1
# HTTP Server configuration.
http:
# Sets the maximum number of pending connections.
backlog: ~
# Resolves socket address(es) and binds server to created listener(s).
bind: "localhost:16016"
# Maximum time in milliseconds allowed for clients to send all request headers.
#
# If a client takes longer to transmit all request headers the request is failed.
#
# A value of zero disables the timeout.
client_request_timeout: ~
# Server preference for how long to keep connections alive when idle.
#
# A value of zero disables keep alive and connections will be
# closed immediately after the response is sent.
keep_alive: ~
# Format of server access logs.
#
# Rules for the format string are defined at
# <https://docs.rs/actix-web/latest/actix_web/middleware/struct.Logger.html#format>.
log_format: ~
# Maximum number of concurrent connections for each server worker.
#
# This option is available for both TLS and non-TLS modes due to the greatly
# different CPU requirements.
#
# Once the limit is reach listening sockets will stop accepting connections
# until currently open connections are closed.
max_connections: ~
# Maximum number of concurrent TLS connections for each server worker.
#
# This option is available for both TLS and non-TLS modes due to the greatly
# different CPU requirements.
#
# Once the limit is reach listening sockets will stop accepting connections
# until currently open connections are closed.
max_connections_tls: ~
# Time in seconds workers are given to complete requests in progress when a shutdown
# signal is received.
shutdown_timeout: ~
# Configure the server to run with TLS encryption.
tls: ~
# # Path to a PEM bundle of Certificate Authorities to verify client certificates with.
# #
# # When this option is set, clients MUST provide a certificate that is valid.
# client_ca_bundle: ~
#
# # Enable TLS for the server.
# enabled: true
#
# # Maximum time in milliseconds a TLS handshake must complete in.
# #
# # If the handshake does not complete in time the connection is closed.
# handshake_timeout: ~
#
# # Path to the PEM encoded server private certificate file.
# #
# # REQUIRED when the TLS block is not empty.
# server_private_cert: /path/to/cert.pem
#
# # Path to the PEM encoded server private key file.
# #
# # REQUIRED when the TLS block is not empty.
# server_private_key: /path/to/key.pem
# Number of workers handling HTTP requests.
#
# Defaults to the number of CPUs available.
workers: ~
# Configuration of the tokio runtime for the process.
#
# These options configure the handling of synchronous and asynchronous tasks.
# These are low level code execution patters and you should be familiar with the concept of
# asynchronous programming before making changes.
#
# For an introduction to async in Rust you can refer to
# <https://rust-lang.github.io/async-book/01_getting_started/02_why_async.html>.
runtime:
# Allowed time, in seconds, for running operations to complete once process shutdown begins.
shutdown_grace_sec: 120
# Maximum number of threads processing blocking tasks.
#
# Blocking tasks take over a thread until they complete, even during wait times such as IO.
# To prevent blocking tasks from preventing non-blocking tasks from executing they get
# a dedicated pool of threads to execute on.
#
# This option sets the maximum number of threads that can run blocking tasks.
# If all threads are busy, new blocking tasks will be queued until threads are available.
sync_workers: ~
# Time in second to keep blocking task threads alive waiting for more tasks.
sync_workers_keep_alive: ~
# Number of threads processing non-blocking tasks.
#
# As tasks keep a thread busy only when they can progress a small number of threads
# can handle a large number of non-block tasks.
#
# This number is best kept small and defaults to the number of CPU cores on the system.
workers: ~
# Persistent Store service configuration.
store:
# Persistent Store implementation for the RepliCore control plane to use.
#
# Available implementations can be enabled and disabled at compile time so the exact
# list of options may vary but the following implementations are included by default:
#
# - sqlite: store information into a locally persisted SQLite database.
# NO SUPPORT FOR HIGH AVAILABLE CLUSTERS.
# ONLY SUITABLE FOR SMALL CLUSTERS.
backend: REQUIRED
# Implementation specific options are provided as additional attributes here.
# === For SQLite backend ===
# Path to the SQLite DB file.
#path: store.sqlite
# Configuration for background tasks execution and backend service.
tasks:
# Tasks executor backoff configuration in case of errors interacting with the Message Queue.
backoff:
# Maximum time, in seconds, to wait before retrying after errors from the Message Queue.
max_delay: 30
# Maximum number of retries before errors from the Message Queue cause process failure.
max_retries: 10
# Backoff multiplier every time a subsequent error is returned by the Message Queue.
multiplier: 2
# Initial delay, in milliseconds, to wait before the first retry.
start_delay: 200
# Maximum number of tasks to execute concurrently.
concurrent_tasks: 16 # Actual defaults varies based on available parallelism on the system.
# Filter queues from which tasks should be processed.
filters:
# Ignore subscriptions to any task queue listed here.
ignore: []
# If not empty, restrict subscriptions to only queues listed here.
#
# If the list is empty all queues can be subscribed to.
process: []
# Background Tasks service configuration.
service:
# Background Tasks implementation for the RepliCore control plane to use.
#
# Available implementations can be enabled and disabled at compile time so the exact
# list of options may vary but the following implementations are included by default:
#
# - sqlite: store tasks into a locally persisted SQLite database.
# NO SUPPORT FOR HIGH AVAILABLE CLUSTERS.
# ONLY SUITABLE FOR SMALL CLUSTERS.
backend: REQUIRED
# Implementation specific options are provided as additional attributes here.
# === For SQLite backend ===
# Path to the SQLite DB file.
#path: store.sqlite
# Telemetry configuration for the process.
telemetry:
# Logging configuration for the process.
logs:
# Emit log events asynchronously.
#
# Asynchronous logging can improve performance for but can result
# in some events loss if the process exists abruptly.
async: true
# Only emit log event with this level or grater.
#
# Valid options are: CRITICAL, ERROR, WARNING, INFO, DEBUG, TRACE
# or their lower case versions.
# Depending on how applications are compiled DEBUG and TRACE logs may
# not be emitted regardless of what this is set to.
level: info
# Set log levels that apply to specific modules only.
#
# Valid options are the same as the level field.
levels:
# For example you can disable request info logs for HTTP requests only.
"actix_web::middleware::logger": warning
# Select how logs are emitted by the process.
#
# Valid options are:
# - JSON: Format logs as a stream of JSON encoded lines to standard out.
# - TERMINAL: Display logs onto a terminal, with optional colour support.
mode: json
# OpenTelemetry configuration for the process.
otel:
# Enable export of data using the OpenTelemetry protocol.
enabled: false
# GRPC endpoint of the OpenTelemetry agent to send data to.
endpoint: ~
# Trace sampling configuration.
sampling:
# Follow the sampling decision of the parent span, if any exists.
follow_parent: true
# The sampling rule for traces without a parent span.
#
# Valid options are: ALWAYS, NEVER, RATIO
# or their lower case versions.
#
# For RATIO mode specify the ratio between 0.0 and 1.0 using an object: {ration: 0.6}.
mode: ALWAYS
# Timeout in seconds when communicating with the OpenTelemetry agent.
timeout_sec: ~
# Prometheus metrics configuration.
prom_metrics:
# Additional labels to attach to all metrics.
labels: {}
# Enable collection of process-level metrics (linux only).
process_metrics: true
# Sentry error reporting configuration.
sentry:
# Sentry DSN (Data Source Name) to send events to.
#
# If not set, the environment variable SENTRY_DSN is used.
dsn: ~
# Enable sentry integration.
#
# Once this option is set to true a DSN must also be specified
# either above or in SENTRY_DSN for the integration to work.
enabled: false
# The ratio of generated events that are submitted to Sentry (between 0.0 and 1.0).
sample_ratio: 1.0
# Maximum delay in seconds to process shutdown to flush pending events to Sentry.
shutdown_timeout: 2