Bug 5740: Configure control-aware mailbox
[controller.git] / opendaylight / md-sal / sal-clustering-config / src / main / resources / initial / factory-akka.conf
index 9d80299618a0cc7b2d880091c259e75a55446df0..ad18d436118db4e1d69ad570bbcd85ca4341c3ef 100644 (file)
@@ -2,8 +2,8 @@
 odl-cluster-data {
   bounded-mailbox {
     mailbox-type = "org.opendaylight.controller.cluster.common.actor.MeteredBoundedMailbox"
-    mailbox-capacity = 1000
-    mailbox-push-timeout-time = 100ms
+    mailbox-capacity = 5000
+    mailbox-push-timeout-time = 10ms
   }
 
   metric-capture-enabled = true
@@ -28,6 +28,15 @@ odl-cluster-data {
     throughput = 1
   }
 
+  shard-dispatcher {
+    type = Dispatcher
+    executor = "default-executor"
+
+    # We use a ControlAwareMailbox so that raft messages that implement ControlMessage
+    # are given higher priority.
+    mailbox-type = "org.opendaylight.controller.cluster.common.actor.UnboundedDequeBasedControlAwareMailbox"
+  }
+
   akka {
     loglevel = "INFO"
     loggers = ["akka.event.slf4j.Slf4jLogger"]
@@ -61,31 +70,53 @@ odl-cluster-data {
     }
     remote {
       log-remote-lifecycle-events = off
+
       netty.tcp {
-        hostname = "127.0.0.1"
-        port = 2550
         maximum-frame-size = 419430400
         send-buffer-size = 52428800
         receive-buffer-size = 52428800
       }
+
+      artery {
+        advanced {
+          maximum-frame-size = 1 GiB
+          maximum-large-frame-size = 1 GiB
+        }
+      }
     }
 
     cluster {
-      seed-nodes = ["akka.tcp://opendaylight-cluster-data@127.0.0.1:2550"]
-
       seed-node-timeout = 12s
+      # Following is an excerpt from Akka Cluster Documentation
+      # link - http://doc.akka.io/docs/akka/snapshot/java/cluster-usage.html
+      # Warning - Akka recommends against using the auto-down feature of Akka Cluster in production.
+      # This is crucial for correct behavior if you use Cluster Singleton or Cluster Sharding, 
+      # especially together with Akka Persistence.
 
-      auto-down-unreachable-after = 30s
+      #auto-down-unreachable-after = 30s
 
-      roles = [
-        "member-1"
-      ]
+      allow-weakly-up-members = on
 
+      use-dispatcher = cluster-dispatcher
+
+      failure-detector.acceptable-heartbeat-pause = 3 s
     }
 
     persistence {
       journal.plugin = akka.persistence.journal.leveldb
+
+      snapshot-store.local.class = "org.opendaylight.controller.cluster.persistence.LocalSnapshotStore"
       snapshot-store.plugin = akka.persistence.snapshot-store.local
     }
   }
+
+  cluster-dispatcher {
+    type = "Dispatcher"
+    executor = "fork-join-executor"
+    fork-join-executor {
+      parallelism-min = 2
+      parallelism-max = 4
+    }
+  }
 }