@@ -90,7 +90,10 @@ CLUSTERER_CONTROLLER Module
9090
9191 1.22. Multiple clusters — same multicast IP, different ports
9292 1.23. Hybrid — DB-native cluster 10 + controller cluster 1
93- 1.24. Minimal HA cluster configuration
93+ 1.24. Hybrid, no DB — static native cluster 7 + controller
94+ cluster 1
95+
96+ 1.25. Minimal HA cluster configuration
9497
9598Chapter 1. Admin Guide
9699
@@ -827,6 +830,12 @@ modparam("clusterer_controller", "password", "MyStr0ngPassw0rd!")
827830
828831 Example 1.8. Global manage_shtags — applies to all clusters
829832...
833+ # clusters 1 and 2 registered as controller-managed on the clusterer sid
834+ e
835+ modparam("clusterer", "use_controller", 1)
836+ modparam("clusterer", "cluster_id", 1)
837+ modparam("clusterer", "cluster_id", 2)
838+
830839# Enable automatic failover for every cluster (this is also the default)
831840modparam("clusterer_controller", "manage_shtags", 1)
832841modparam("clusterer_controller", "cluster", "id=1,multicast=239.0.90.1:3
@@ -838,6 +847,12 @@ modparam("clusterer_controller", "cluster", "id=2,multicast=239.0.90.2:3
838847 Example 1.9. Per-cluster override — opt one cluster out of
839848 automatic failover
840849...
850+ # clusters 1 and 2 registered as controller-managed on the clusterer sid
851+ e
852+ modparam("clusterer", "use_controller", 1)
853+ modparam("clusterer", "cluster_id", 1)
854+ modparam("clusterer", "cluster_id", 2)
855+
841856# manage_shtags=1 globally, but cluster 2 uses its own MI/event-route sc
842857ripts
843858modparam("clusterer_controller", "manage_shtags", 1)
@@ -849,6 +864,12 @@ modparam("clusterer_controller", "cluster",
849864
850865 Example 1.10. Global opt-out with one cluster opting in
851866...
867+ # clusters 1 and 2 registered as controller-managed on the clusterer sid
868+ e
869+ modparam("clusterer", "use_controller", 1)
870+ modparam("clusterer", "cluster_id", 1)
871+ modparam("clusterer", "cluster_id", 2)
872+
852873# Disable automatic failover globally; enable it only for cluster 1
853874modparam("clusterer_controller", "manage_shtags", 0)
854875modparam("clusterer_controller", "cluster",
@@ -869,7 +890,10 @@ socket=bin:10.22.23.191:3857
869890loadmodule "proto_bin.so"
870891
871892loadmodule "clusterer.so"
872- modparam("clusterer", "use_controller", 1)
893+ modparam("clusterer", "use_controller", 1) # enable the controller p
894+ ath (global switch)
895+ modparam("clusterer", "cluster_id", 1) # register cluster 1 as c
896+ ontroller-managed
873897modparam("clusterer", "sharing_tag", "vip1/1=active")
874898modparam("clusterer", "ping_interval", 4)
875899modparam("clusterer", "ping_timeout", 1500)
@@ -914,6 +938,11 @@ modparam("clusterer_controller", "password", "MyStr0ngPassw0rd!")
914938
915939 Example 1.12. Set master_stickiness parameter
916940...
941+ # both clusters registered as controller-managed on the clusterer side
942+ modparam("clusterer", "use_controller", 1)
943+ modparam("clusterer", "cluster_id", 1)
944+ modparam("clusterer", "cluster_id", 2)
945+
917946# Global default (sticky) — omit entirely for the same effect
918947modparam("clusterer_controller", "master_stickiness", 1)
919948
@@ -1181,7 +1210,12 @@ socket=bin:10.0.2.10:5566
11811210loadmodule "proto_bin.so"
11821211
11831212loadmodule "clusterer.so"
1184- modparam("clusterer", "use_controller", 1)
1213+ modparam("clusterer", "use_controller", 1) # enable the controller pat
1214+ h (global switch)
1215+ modparam("clusterer", "cluster_id", 1) # cluster 1 is controller-
1216+ managed
1217+ modparam("clusterer", "cluster_id", 2) # cluster 2 is controller-
1218+ managed
11851219
11861220loadmodule "clusterer_controller.so"
11871221# Cluster 1 — dialog replication group, LAN segment 10.0.1.0/24
@@ -1204,7 +1238,12 @@ socket=bin:10.22.23.191:3857
12041238loadmodule "proto_bin.so"
12051239
12061240loadmodule "clusterer.so"
1207- modparam("clusterer", "use_controller", 1)
1241+ modparam("clusterer", "use_controller", 1) # enable the controller pat
1242+ h (global switch)
1243+ modparam("clusterer", "cluster_id", 1) # cluster 1 is controller-
1244+ managed
1245+ modparam("clusterer", "cluster_id", 2) # cluster 2 is controller-
1246+ managed
12081247
12091248loadmodule "clusterer_controller.so"
12101249modparam("clusterer_controller", "cluster",
@@ -1265,15 +1304,21 @@ loadmodule "db_mysql.so"
12651304loadmodule "proto_bin.so"
12661305
12671306loadmodule "clusterer.so"
1268- # native side: cluster 10 lives in the DB (nodes provisioned there)
1307+ # native side: cluster 10 is defined entirely by rows in the clusterer D
1308+ B
1309+ # table (one row per node, including a row whose node_id = my_node_id be
1310+ low
1311+ # for THIS node) - there is no cluster_id modparam for native clusters.
12691312modparam("clusterer", "db_mode", 1)
12701313modparam("clusterer", "db_url", "mysql://opensips:pass@localhost/opensip
12711314s")
1272- modparam("clusterer", "my_node_id", 5) # this node's id in cluster
1273- 10
1274- # controller side: cluster 1 is dynamic
1275- modparam("clusterer", "use_controller", 1)
1276- modparam("clusterer", "cluster_id", 1)
1315+ modparam("clusterer", "my_node_id", 5) # this node's id in its nati
1316+ ve/DB clusters (global)
1317+ # controller side: cluster 1 is dynamic (no DB, no static rows)
1318+ modparam("clusterer", "use_controller", 1) # enable the controller path
1319+ (global switch)
1320+ modparam("clusterer", "cluster_id", 1) # register cluster 1 as con
1321+ troller-managed
12771322
12781323loadmodule "clusterer_controller.so"
12791324modparam("clusterer_controller", "cluster",
@@ -1287,21 +1332,64 @@ ed
12871332loadmodule "dispatcher.so"
12881333modparam("dispatcher", "cluster_id", 10) # DB-native
12891334
1335+ Example 1.24. Hybrid, no DB — static native cluster 7 +
1336+ controller cluster 1
1337+ socket=bin:10.0.0.10:5566
1338+
1339+ loadmodule "proto_bin.so"
1340+
1341+ loadmodule "clusterer.so"
1342+ # native side: cluster 7 is provisioned statically (no DB).
1343+ # db_mode=0 is REQUIRED, otherwise my_node_info/neighbor_node_info are i
1344+ gnored.
1345+ modparam("clusterer", "db_mode", 0)
1346+ modparam("clusterer", "my_node_id", 5) # this node's id in
1347+ native cluster 7
1348+ modparam("clusterer", "my_node_info", "cluster_id=7, url=bin:10.0.
1349+ 0.10:5566")
1350+ modparam("clusterer", "neighbor_node_info", "cluster_id=7, node_id=6, ur
1351+ l=bin:10.0.0.11:5566")
1352+ # controller side: cluster 1 is dynamic
1353+ modparam("clusterer", "use_controller", 1) # enable the contro
1354+ ller path (global switch)
1355+ modparam("clusterer", "cluster_id", 1) # register cluster
1356+ 1 as controller-managed
1357+
1358+ loadmodule "clusterer_controller.so"
1359+ modparam("clusterer_controller", "cluster",
1360+ "id=1,multicast=239.0.90.1:3333,bin_socket=bin:10.0.0.10:5566,passwo
1361+ rd=S3cret")
1362+
1363+ loadmodule "dialog.so"
1364+ modparam("dialog", "dialog_replication_cluster", 1) # controller-manag
1365+ ed (cluster 1)
1366+
1367+ loadmodule "dispatcher.so"
1368+ modparam("dispatcher", "cluster_id", 7) # native (cluster 7
1369+ )
1370+
1371+ Here my_node_id=5 is this node's id in the native cluster 7; in
1372+ cluster 1 the controller assigns an id at runtime, which may
1373+ differ.
1374+
129013751.12. Configuration Example
12911376
12921377 The following example shows a minimal two-module configuration
12931378 for zero-config HA clustering with dialog replication. The
12941379 loadmodule order does not matter — the dependency system
12951380 enforces correct initialization order automatically.
12961381
1297- Example 1.24 . Minimal HA cluster configuration
1382+ Example 1.25 . Minimal HA cluster configuration
12981383# Each node needs an explicit BIN socket (no wildcard)
12991384socket=bin:10.22.23.191:3857
13001385
13011386loadmodule "proto_bin.so"
13021387
13031388loadmodule "clusterer.so"
1304- modparam("clusterer", "use_controller", 1)
1389+ modparam("clusterer", "use_controller", 1) # enable the controller p
1390+ ath (global switch)
1391+ modparam("clusterer", "cluster_id", 1) # register cluster 1 as c
1392+ ontroller-managed
13051393modparam("clusterer", "sharing_tag", "vip1/1=active")
13061394modparam("clusterer", "ping_interval", 4)
13071395modparam("clusterer", "ping_timeout", 1500)
0 commit comments