Switch to using tell-based protocol
[controller.git] / opendaylight / md-sal / sal-clustering-config / src / main / resources / initial / factory-akka.conf
1
2 odl-cluster-data {
3   bounded-mailbox {
4     mailbox-type = "org.opendaylight.controller.cluster.common.actor.MeteredBoundedMailbox"
5     mailbox-capacity = 5000
6     mailbox-push-timeout-time = 10ms
7   }
8
9   metric-capture-enabled = true
10
11   notification-dispatcher {
12     # Dispatcher is the name of the event-based dispatcher
13     type = Dispatcher
14     # What kind of ExecutionService to use
15     executor = "fork-join-executor"
16     # Configuration for the fork join pool
17     fork-join-executor {
18       # Min number of threads to cap factor-based parallelism number to
19       parallelism-min = 2
20       # Parallelism (threads) ... ceil(available processors * factor)
21       parallelism-factor = 3.0
22       # Max number of threads to cap factor-based parallelism number to
23       parallelism-max = 15
24     }
25     # Throughput defines the maximum number of messages to be
26     # processed per actor before the thread jumps to the next actor.
27     # Set to 1 for as fair as possible.
28     throughput = 1
29   }
30
31   serialization-dispatcher {
32     type = Dispatcher
33     executor = "fork-join-executor"
34     fork-join-executor {
35       # Min number of threads to cap factor-based parallelism number to
36       parallelism-min = 2
37       # Parallelism (threads) ... ceil(available processors * factor)
38       parallelism-factor = 2.0
39       # Max number of threads to cap factor-based parallelism number to
40       parallelism-max = 15
41     }
42     throughput = 1
43   }
44
45   shard-dispatcher {
46     type = Dispatcher
47     executor = "default-executor"
48
49     # We use a ControlAwareMailbox so that raft messages that implement ControlMessage
50     # are given higher priority.
51     mailbox-type = "org.opendaylight.controller.cluster.common.actor.UnboundedDequeBasedControlAwareMailbox"
52   }
53
54   akka {
55     loglevel = "INFO"
56     loggers = ["akka.event.slf4j.Slf4jLogger"]
57     logger-startup-timeout = 300s
58
59     # JFR requires boot delegation, which we do not have by default
60     java-flight-recorder {
61       enabled = false
62     }
63
64     actor {
65       warn-about-java-serializer-usage = off
66       provider = "akka.cluster.ClusterActorRefProvider"
67       serializers {
68         java = "akka.serialization.JavaSerializer"
69         proto = "akka.remote.serialization.ProtobufSerializer"
70         readylocal = "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransactionSerializer"
71         simpleReplicatedLogEntry = "org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntrySerializer"
72       }
73
74       serialization-bindings {
75         "com.google.protobuf.Message" = proto
76         "org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction" = readylocal
77         "org.opendaylight.controller.cluster.raft.persisted.SimpleReplicatedLogEntry" = simpleReplicatedLogEntry
78       }
79
80       default-dispatcher {
81         # Setting throughput to 1 makes the dispatcher fair. It processes 1 message from
82         # the mailbox before moving on to the next mailbox
83         throughput = 1
84       }
85
86       default-mailbox {
87         # When not using a BalancingDispatcher it is recommended that we use the SingleConsumerOnlyUnboundedMailbox
88         # as it is the most efficient for multiple producer/single consumer use cases
89         mailbox-type="akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
90       }
91     }
92     remote {
93       log-remote-lifecycle-events = off
94       # Disable passive connections, as we are seeing issues
95       # with read-only associations
96       use-passive-connections = off
97
98       classic.netty.tcp {
99         maximum-frame-size = 419430400
100         send-buffer-size = 52428800
101         receive-buffer-size = 52428800
102       }
103
104       artery {
105         enabled = on
106         transport = tcp
107
108         advanced {
109           maximum-frame-size = 512 KiB
110           maximum-large-frame-size = 2 MiB
111         }
112       }
113     }
114
115     cluster {
116       seed-node-timeout = 12s
117
118       # Following is an excerpt from Akka Cluster Documentation
119       # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
120       # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
121       # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding,
122       # especially together with Akka Persistence.
123
124       allow-weakly-up-members = on
125
126       use-dispatcher = cluster-dispatcher
127
128       failure-detector.acceptable-heartbeat-pause = 3 s
129
130       distributed-data {
131         # How often the Replicator should send out gossip information.
132         # This value controls how quickly Entity Ownership Service data is replicated
133         # across cluster nodes.
134         gossip-interval = 100 ms
135
136         # How often the subscribers will be notified of changes, if any.
137         # This value controls how quickly Entity Ownership Service decisions are
138         # propagated within a node.
139         notify-subscribers-interval = 20 ms
140       }
141     }
142
143     persistence {
144       journal {
145         # The following activates the default segmented file journal. Each persistent actor
146         # is stored in a separate directory, with multiple segment files. Segments are removed
147         # when they are no longer required.
148         #
149         plugin = akka.persistence.journal.segmented-file
150
151         segmented-file {
152           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
153           # Root directory for segmented journal storage
154           root-directory = "segmented-journal"
155           # Maximum size of a single entry in the segmented journal
156           max-entry-size = 16M
157           # Maximum size of a segment
158           max-segment-size = 128M
159           # Map each segment into memory. Defaults to true, use false to keep a heap-based
160           # buffer instead.
161           memory-mapped = true
162         }
163       }
164
165       # Journal configuration for shards that have persistence turned off. They still need to have a journal plugin
166       # configured, since they still need to store things in the journal occasionally, but having larger segment sizes
167       # would be wastefull.
168       non-persistent {
169         journal {
170           class = "org.opendaylight.controller.akka.segjournal.SegmentedFileJournal"
171           # Root directory for segmented journal storage
172           root-directory = "segmented-journal"
173           # Maximum size of a single entry in the segmented journal
174           max-entry-size = 512K
175           # Maximum size of a segment
176           max-segment-size = 1M
177           # Map each segment into memory. Note that while this can improve performance,
178           # it will also place additional burden on system resources.
179           memory-mapped = false
180         }
181       }
182
183       snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
184       snapshot-store.plugin = akka.persistence.snapshot-store.local
185     }
186   }
187
188   cluster-dispatcher {
189     type = "Dispatcher"
190     executor = "fork-join-executor"
191     fork-join-executor {
192       parallelism-min = 2
193       parallelism-max = 4
194     }
195   }
196 }