-
Notifications
You must be signed in to change notification settings - Fork 224
/
concierge.conf
217 lines (183 loc) · 6.49 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
ditto {
service-name = "concierge"
mapping-strategy.implementation = "org.eclipse.ditto.concierge.service.ConciergeMappingStrategies"
mapping-strategy.implementation = ${?MAPPING_STRATEGY_IMPLEMENTATION}
concierge {
enforcement {
# configuration for retrieval of policies/things during enforcement via sharding
ask-with-retry {
# maximum duration to wait for anwers from entity shard regions
ask-timeout = 3s
ask-timeout = ${?ENFORCEMENT_ASK_TIMEOUT}
# one of: OFF, NO_DELAY, FIXED_DELAY, BACKOFF_DELAY
retry-strategy = BACKOFF_DELAY
retry-strategy = ${?ENFORCEMENT_ASK_RETRY_STRATEGY}
retry-attempts = 3
retry-attempts = ${?ENFORCEMENT_ASK_TIMEOUT_RETRIES}
fixed-delay = 5s
fixed-delay = ${?ENFORCEMENT_ASK_FIXED_DELAY}
backoff-delay {
min = 100ms
max = 10s
# must be between 0.0 and 1.0:
random-factor = 0.5
}
}
# the buffer size used for the queue in the enforcement actor
buffer-size = 100
buffer-size = ${?ENFORCEMENT_BUFFER_SIZE}
# whether to dispatch live response from channels other than subscribers of live messages.
global-live-response-dispatching = true
global-live-response-dispatching = ${?ENFORCEMENT_GLOBAL_LIVE_RESPONSE_DISPATCHING}
# list of namespaces for which a special usage logging should be enabled in enforcement
special-logging-inspected-namespaces = []
special-logging-inspected-namespaces = ${?ENFORCEMENT_SPECIAL_LOGGING_INSPECTED_NAMESPACES}
# restrict entity creation
entity-creation {
# this default entry allows every authenticated "auth-subject" to create any "resource-type" in any "namespace":
grant = [{}]
# same as "grant", but rejecting requests which already passed "grant"
revoke = []
}
}
caches {
# configuration for retrieval of policies/things during cache update via sharding
ask-with-retry {
# maximum duration to wait for answers from entity shard regions
ask-timeout = 3s
ask-timeout = ${?CONCIERGE_CACHES_ASK_TIMEOUT}
# one of: OFF, NO_DELAY, FIXED_DELAY, BACKOFF_DELAY
retry-strategy = BACKOFF_DELAY
retry-strategy = ${?CONCIERGE_CACHES_ASK_RETRY_STRATEGY}
retry-attempts = 3
retry-attempts = ${?CONCIERGE_CACHES_ASK_TIMEOUT_RETRIES}
fixed-delay = 5s
fixed-delay = ${?CONCIERGE_CACHES_ASK_FIXED_DELAY}
backoff-delay {
min = 100ms
max = 10s
# must be between 0.0 and 1.0:
random-factor = 0.5
}
}
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}
}
search-actor-path = "/user/thingsWildcardSearchRoot/thingsSearch"
search-actor-path = ${?CONCIERGE_SEARCH_ACTOR_PATH}
}
}
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 = ${ditto.service-name}
}
roles = [
"concierge",
"blocked-namespaces-aware",
"live-signal-aware",
"acks-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
}
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}
}
}
include "concierge-extension"