-
Notifications
You must be signed in to change notification settings - Fork 215
/
actors-test.conf
executable file
·214 lines (174 loc) · 6.7 KB
/
actors-test.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
ditto {
signal-enrichment.caching-signal-enrichment-facade.provider = org.eclipse.ditto.internal.models.signalenrichment.DittoCachingSignalEnrichmentFacadeProvider
mapping-strategy.implementation = "org.eclipse.ditto.thingsearch.api.ThingSearchMappingStrategies"
pre-enforcers = [
"org.eclipse.ditto.policies.enforcement.pre.HeaderSetterPreEnforcer"
]
persistence.operations.delay-after-persistence-actor-shutdown = 5s
persistence.operations.delay-after-persistence-actor-shutdown = ${?DELAY_AFTER_PERSISTENCE_ACTOR_SHUTDOWN}
mongodb {
uri = "mongodb://user-name-1234-5678-abcdefg:password12345@first.hostname.com:10000,second.hostname.com:20000,third.hostname.com:30000,fourth.hostnamefifth.hostname.com:50000,sixth.hostname.com:60000,seventh:hostname.com:70000/database-name?replicaSet=streched-0003&maxIdleTimeMS=240000&w=majority&readPreference=primaryPreferred&ssl=true&sslInvalidHostNameAllowed=true"
database = "searchDB"
database = ${?MONGO_DB_DATABASE}
pool {
maxSize = 1000
maxSize = ${?MONGO_DB_CONNECTION_POOL_SIZE}
maxWaitTime = 30s
maxWaitTime = ${?MONGO_DB_CONNECTION_POOL_WAIT_TIME}
jmxListenerEnabled = false
jmxListenerEnabled = ${?MONGO_DB_CONNECTION_POOL_JMX_LISTENER_ENABLED}
}
breaker {
maxFailures = 5 # defines ater how many failures the circuit breaker should open
maxFailures = ${?BREAKER_MAXFAILURES}
timeout {
call = 5s # MongoDB Timeouts causing the circuitBreaker to open - "0s" disables timeouts opening the breaker
call = ${?BREAKER_TIMEOUT}
reset = 10s # after this time in "Open" state, the cicuitBreaker is "Half-opened" again
reset = ${?BREAKER_RESET}
}
}
monitoring {
commands = true
commands = ${?MONGODB_MONITORING_COMMANDS_ENABLED}
connection-pool = true
commands = ${?MONGODB_MONITORING_CONNECTION_POOL_ENABLED}
}
}
search {
query-criteria-validator.implementation = "org.eclipse.ditto.thingsearch.service.persistence.query.validation.DefaultQueryCriteriaValidator"
search-update-mapper.implementation = "org.eclipse.ditto.thingsearch.service.persistence.write.streaming.DefaultSearchUpdateMapper"
search-update-observer.implementation = "org.eclipse.ditto.thingsearch.service.updater.actors.DefaultSearchUpdateObserver"
mongo-hints-by-namespace = ${?MONGO_HINTS_BY_NAMESPACE}
index-initialization {
#indices should be created within this application
enabled = true
enabled = ${?INDEX_INITIALIZATION_ENABLED}
}
updater {
max-idle-time = 15m
max-idle-time = ${?ACTIVITY_CHECK_INTERVAL}
event-processing-active = true
event-processing-active = ${?EVENT_PROCESSING_ACTIVE}
// how often to poll shard region for state updates
sharding-state-poll-interval = 15s
sharding-state-poll-interval = ${?SHARDING_STATE_POLL_INTERVAL}
background-sync {
enabled = true
enabled = ${?BACKGROUND_SYNC_ENABLED}
quiet-period = 8m
quiet-period = ${?BACKGROUND_SYNC_QUIET_PERIOD}
idle-timeout = 5m
idle-timeout = ${?BACKGROUND_SYNC_IDLE_TIMEOUT}
tolerance-window = 20m
tolerance-window = ${?BACKGROUND_SYNC_TOLERANCE_WINDOW}
policy-ask-timeout = 10s
policy-ask-timeout = ${?BACKGROUND_SYNC_POLICY_ASK_TIMEOUT}
keep {
events = 50
events = ${?BACKGROUND_SYNC_KEEP_EVENTS}
}
throttle {
throughput = 100
throughput = ${?BACKGROUND_SYNC_THROTTLE_THROUGHPUT}
period = 10s
period = ${?BACKGROUND_SYCN_THROTTLE_PERIOD}
}
# handle failures/stalling/expired cursors
min-backoff = 1s
min-backoff = ${?BACKGROUND_SYNC_MIN_BACKOFF}
max-backoff = 2m
max-backoff = ${?BACKGROUND_SYNC_MAX_BACKOFF}
max-restarts = 180 // give up stream resumption after about 6 hours = 180 * 120s
max-restarts = ${?BACKGROUND_SYNC_MAX_RESTARTS}
recovery = 5m // assume upstream healthy if no error happened for this long
recovery = ${?BACKGROUND_SYNC_RECOCVERY}
}
stream {
// arrays bigger than this are not indexed
max-array-size = 0
max-array-size = ${?THINGS_SEARCH_UPDATER_STREAM_MAX_ARRAY_SIZE}
// minimum delay between event dumps
write-interval = 1s
write-interval = ${?THINGS_SEARCH_UPDATER_STREAM_WRITE_INTERVAL}
// timeout for messages to Things-shard
ask-timeout = 30s
ask-timeout = ${?THINGS_SEARCH_UPDATER_STREAM_ASK_TIMEOUT}
// retrieval of things and policy-enforcers
retrieval {
// upper bound of parallel SudoRetrieveThing commands (by extension, parallel loads of policy enforcer cache)
parallelism = 16
parallelism = ${?THINGS_SEARCH_UPDATER_STREAM_RETRIEVAL_PARALLELISM}
// back-offs in case of failure
exponential-backoff {
min = 1s
max = 2m
random-factor = 2.0
}
}
// writing into the persistence
persistence {
// how many bulk writes to request in parallel; must be a power of 2
parallelism = 2
parallelism = ${?THINGS_SEARCH_UPDATER_STREAM_PERSISTENCE_PARALLELISM}
// backoffs in case of failure
exponential-backoff {
min = 1s
max = 2m
random-factor = 2.0
}
}
policy-cache {
dispatcher = "policy-enforcer-cache-dispatcher"
retry-delay = 1s
maximum-size = 20000
expire-after-write = 2h
expire-after-access = 30m
}
thing-cache {
dispatcher = "thing-cache-dispatcher"
retry-delay = 1s
maximum-size = 20000
expire-after-write = 2h
expire-after-access = 30m
}
}
}
}
}
akka {
cluster {
sharding {
role = "search"
}
roles = [
"search",
"ddata-aware",
"blocked-namespaces-aware",
"thing-event-aware"
]
}
}
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
}
policy-enforcer-cache-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
}
thing-cache-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
}
include "search-extension.conf"