/
concierge.conf
275 lines (236 loc) · 7.98 KB
/
concierge.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
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
ditto {
mongodb {
hostname = "localhost"
hostname = ${?MONGO_DB_HOSTNAME}
port = 27017
port = ${?MONGO_DB_PORT}
authentication = ${?MONGO_DB_AUTHENTICATION}
database = "concierge"
database = ${?MONGO_DB_DATABASE}
options {
ssl = false
ssl = ${?MONGO_DB_SSL_ENABLED}
w = 1
}
}
concierge {
enforcement {
# maximum duration to wait for anwers from entity shard regions
ask-timeout = 30s
ask-timeout = ${?ENFORCEMENT_ASK_TIMEOUT}
# the buffer size used for the queue in the enforcement actor
# after this limit is reached, the mailbox of the enforcement actor will rise and buffer messages
buffer-size = 1000
buffer-size = ${?ENFORCEMENT_BUFFER_SIZE}
# parallelism to use for processing messages in parallel in the enforcement actor
# when configured too low, throughput of messages which perform blocking operations will be bad
parallelism = 16
parallelism = ${?ENFORCEMENT_PARALLELISM}
# the maximum of supported namespaces to start substreams for. Choose a high value as if the actual amount
# of substreams gets bigger than this maximum value, the whole enforcement stream will fail. But don't set too high
# as substreams require memory!
max-namespaces-substreams = 100000
max-namespaces-substreams = ${?ENFORCEMENT_MAX_NAMESPACES_SUBSTREAMS}
}
caches {
# maximum duration to wait for entity shard regions for cache update
ask-timeout = 30s
ask-timeout = ${?CONCIERGE_CACHES_ASK_TIMEOUT}
id {
# how many relations to cache
maximum-size = 80000
maximum-size = ${?AUTHORIZATION_ID_CACHE_SIZE}
# maximum duration of inconsistency after losing a cache invalidation
expire-after-write = 1h
expire-after-write = ${?EXPIRE_AFTER_WRITE_ID_CACHE}
# prolonged on each cache access by that duration
expire-after-access = 15m
expire-after-access = ${?EXPIRE_AFTER_ACCESS_ID_CACHE}
}
enforcer {
# how many enforcers to cache
maximum-size = 20000
maximum-size = ${?AUTHORIZATION_ENFORCER_CACHE_SIZE}
# maximum duration of inconsistency after losing a cache invalidation
expire-after-write = 1h
expire-after-write = ${?EXPIRE_AFTER_WRITE_ENFORCER_CACHE}
# prolonged on each cache access by that duration
expire-after-access = 15m
expire-after-access = ${?EXPIRE_AFTER_ACCESS_ENFORCER_CACHE}
}
}
things-aggregator {
single-retrieve-thing-timeout = 30s
single-retrieve-thing-timeout = ${?THINGS_AGGREGATOR_SINGLE_RETRIEVE_THING_TIMEOUT}
max-parallelism = 20
max-parallelism = ${?THINGS_AGGREGATOR_MAX_PARALLELISM}
}
}
}
akka.cluster.distributed-data {
ditto-replicator-facade {
read-timeout = 5s
write-timeout = 25s
}
}
akka {
actor {
deployment {
/conciergeRoot/dispatcherActor/aggregator {
router = round-robin-pool
# nr-of-instances = 5
resizer {
lower-bound = 5
upper-bound = 100
messages-per-resize = 50
}
}
}
}
cluster {
sharding {
role = "concierge"
}
roles = [
"concierge",
"blocked-namespaces-aware"
]
}
}
aggregator-internal-dispatcher {
# Dispatcher is the name of the event-based dispatcher
type = Dispatcher
# What kind of ExecutionService to use
executor = "fork-join-executor"
# Configuration for the fork join pool
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 4
# Parallelism (threads) ... ceil(available processors * factor)
parallelism-factor = 3.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 32
parallelism-max = ${?DEFAULT_DISPATCHER_PARALLELISM_MAX}
}
# Throughput defines the maximum number of messages to be
# processed per actor before the thread jumps to the next actor.
# Set to 1 for as fair as possible.
throughput = 5
}
batch-persistence-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 4
# Parallelism (threads) ... ceil(available processors * factor)
parallelism-factor = 3.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 32
parallelism-max = ${?DEFAULT_DISPATCHER_PARALLELISM_MAX}
}
throughput = 5
}
cached-namespace-invalidator-dispatcher {
# one thread per actor in case the actor blocks.
type = PinnedDispatcher
executor = "thread-pool-executor"
}
blocked-namespaces-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 4
# Parallelism (threads) ... ceil(available processors * factor)
parallelism-factor = 3.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 32
parallelism-max = ${?DEFAULT_DISPATCHER_PARALLELISM_MAX}
}
throughput = 5
}
thing-id-cache-dispatcher {
type = "Dispatcher"
executor = "thread-pool-executor"
thread-pool-executor {
keep-alive-time = 60s
fixed-pool-size = off
max-pool-size-max = 256
max-pool-size-max = ${?CACHE_DISPATCHER_POOL_SIZE_MAX}
max-pool-size-max = ${?THING_ID_CACHE_DISPATCHER_POOL_SIZE_MAX}
}
}
policy-enforcer-cache-dispatcher {
type = "Dispatcher"
executor = "thread-pool-executor"
thread-pool-executor {
keep-alive-time = 60s
fixed-pool-size = off
max-pool-size-max = 256
max-pool-size-max = ${?CACHE_DISPATCHER_POOL_SIZE_MAX}
max-pool-size-max = ${?POLICY_ENFORCER_CACHE_DISPATCHER_POOL_SIZE_MAX}
}
}
acl-enforcer-cache-dispatcher {
type = "Dispatcher"
executor = "thread-pool-executor"
thread-pool-executor {
keep-alive-time = 60s
fixed-pool-size = off
max-pool-size-max = 256
max-pool-size-max = ${?CACHE_DISPATCHER_POOL_SIZE_MAX}
max-pool-size-max = ${?ACL_ENFORCER_CACHE_DISPATCHER_POOL_SIZE_MAX}
}
}
akka-contrib-mongodb-persistence-batch-journal {
class = "akka.contrib.persistence.mongodb.MongoJournal"
plugin-dispatcher = "batch-persistence-dispatcher"
overrides {
journal-collection = "batch_journal"
journal-index = "batch_journal_index"
realtime-collection = "batch_realtime"
metadata-collection = "batch_metadata"
}
event-adapters {
mongodbobject = "org.eclipse.ditto.services.concierge.batch.MongoBatchEventAdapter"
}
event-adapter-bindings {
"org.eclipse.ditto.signals.events.base.Event" = mongodbobject
"org.bson.BsonValue" = mongodbobject
}
}
akka-contrib-mongodb-persistence-batch-snapshots {
class = "akka.contrib.persistence.mongodb.MongoSnapshots"
plugin-dispatcher = "batch-persistence-dispatcher"
overrides {
snaps-collection = "batch_snaps"
snaps-index = "batch_snaps_index"
}
}
akka-contrib-mongodb-persistence-batch-supervisor-journal {
class = "akka.contrib.persistence.mongodb.MongoJournal"
plugin-dispatcher = "batch-persistence-dispatcher"
overrides {
journal-collection = "batch_supervisor_journal"
journal-index = "batch_supervisor_journal_index"
realtime-collection = "batch_supervisor_realtime"
metadata-collection = "batch_supervisor_metadata"
}
event-adapters {
mongodbobject = "org.eclipse.ditto.services.concierge.batch.MongoBatchEventAdapter"
}
event-adapter-bindings {
"org.eclipse.ditto.signals.events.base.Event" = mongodbobject
"org.bson.BsonValue" = mongodbobject
}
}
akka-contrib-mongodb-persistence-batch-supervisor-snapshots {
class = "akka.contrib.persistence.mongodb.MongoSnapshots"
plugin-dispatcher = "batch-persistence-dispatcher"
overrides {
snaps-collection = "batch_supervisor_snaps"
snaps-index = "batch_supervisor_snaps_index"
}
}
include "concierge-extension"