-
Notifications
You must be signed in to change notification settings - Fork 214
/
ditto-cluster-downing.conf
71 lines (54 loc) · 2.35 KB
/
ditto-cluster-downing.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
ditto.cluster {
sbr {
auto-enable-after = 1h
auto-enable-after = ${?DITTO_CLUSTER_SBR_AUTO_ENABLE_AFTER}
}
}
pekko.cluster {
# Akka built-in split brain resolver
downing-provider-class = org.eclipse.ditto.base.service.cluster.DittoSplitBrainResolverProvider
# Akka built-in split brain resolver configuration
split-brain-resolver {
# Possible to switch to "lease-majority" when run in a kubernetes cluster,
# so that the surviving minority does not down itself when a majority crashes.
# Additional configuration required for Kubernetes:
# https://pekko.apache.org/docs/pekko/current/split-brain-resolver.html#lease
active-strategy = keep-majority
active-strategy = ${?CLUSTER_DOWNING_ACTIVE_STRATEGY}
# how to find the right value:
# https://pekko.apache.org/docs/pekko/current/split-brain-resolver.html
stable-after = 8s
stable-after = ${?CLUSTER_DOWNING_STABLE_AFTER}
# if reachability of previous cluster members kept changing for this duration then
# all cluster members are downed. The default "on" means 0,75x stable-after max between the first node becoming
# unreachable and the last for the cluster not to down itself.
down-all-when-unstable = on
down-all-when-unstable = ${?CLUSTER_DOWNING_DOWN_ALL_WHEN_UNSTABLE}
lease-majority {
# implementation of lease, see below
lease-implementation = "pekko.coordination.lease.kubernetes"
}
}
}
pekko.coordination.lease.kubernetes {
lease-class = "org.apache.pekko.coordination.lease.kubernetes.KubernetesLease"
// Kubernetes mount these in pods
api-ca-path = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
api-token-path = "/var/run/secrets/kubernetes.io/serviceaccount/token"
namespace-path = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"
// use namespace in namespace-path
namespace = "<namespace>"
api-service-host = "localhost"
api-service-host = ${?KUBERNETES_SERVICE_HOST}
api-service-port = 8080
api-service-port = ${?KUBERNETES_SERVICE_PORT}
# lease refresh frequency by holder
heartbeat-interval = 10s
# lease TTL - lease locked out for this long after holder crashes
heartbeat-timeout = 120s
# default: 2s = 0.4*lease-operation-timeout
api-server-request-timeout = ""
# fail lease operation after this long
lease-operation-timeout = 5s
secure-api-server = true
}