SYSTEM PLANNING : Network integration : Cluster discovery (Integrated Mode)
Cluster discovery (Integrated Mode)
When integrating multiple ConnectStations into a network, they need a way to find each other to set up the cluster. There are two options:
1. Explicit server selection via DNS SRV records
2. Automatic discovery by multicast announcements (with the option to override the default multicast address and port)
 
Order of methods for Cluster Discovery
The discovery process follows a strict order:
1. Explicit SRV
*When starting up, a ConnectStation will first query your DNS for _cnct._tcp SRV records. If it finds entries, it will try to connect to the specified server(s).
2. Multicast announcement on overridden address
*If no DNS SRV records are found, it will query your DNS for a _cnct._udp SRV record that can specify the multicast group and port for discovery. If found, it will use these values for the discovery process as described below.
3. Multicast announcement on default address
*If not specified in your DNS, it will use the default multicast group address 224.2.2.2 and port 32001 for the discovery process as described below.
 
Explicit server selection
You can explicitly set any of 1, 3 or 5 ConnectStation(s) as a server for your cluster. For that purpose, create a SRV record for _cnct._tcp pointing to the IP (or, if set in your DNS, hostname) for each of the ConnectStations you want to select as a server.
*It is advisable to select the stations with the least expected load (in terms of connected listeners and number of streams) to be servers.
*Note that the ConnectStations will observe DNS search domains as set by your DHCP server, and you will usually want to create the SRV entries under one of those search domains.
*If any of the explicitly selected servers are not reachable, the result is undefined and the whole cluster of ConnectStations might stop functioning.
*If you configure an illegal number of servers (any number other than 1, 3 or 5), the result again is undefined.
Example:
1. Assume you have a network setup with three ConnectStations, and you want to make one of those to be the server for your cluster explicitly.
2. Your DHCP hands out IP addresses to the ConnectStations connected via their LAN2 port- we’ll assume for this example that they are:
192.168.0.101, 192.168.0.102 and 192.168.0.103.
3. Your DHCP sets the domain field (DHCP Option 15) to an arbitrary domain name, let’s assume it is “your-domain.com”.
4. Create SRV entries for the ConnectStation you want to be the server. The priority and weight field are currently irrelevant. Set the TTL to a sane value according to your network requirements. Set the port to 8000:
5. When started up, the selected ConnectStation will discover it is set to be the single server and start listening for other ConnectStations to form a cluster.
6. The other ConnectStations will discover the selected server and connect to it to form a cluster.
7. You can configure the cluster via any connected station. If you are connected to the same network, you can browse to http://192.168.0.101/ to open the administration interface.
 
Automatic cluster setup via multicast announcement
*When no _cnct._tcp SRV records are found, the ConnectStations will fall back to automatic discovery via a simple multicast announcement protocol.
*On startup, a ConnectStation will listen for announcements on multicast address 224.2.2.2 and port 32001. The multicast group address and port can be overridden by _cnct._udp SRV entries in your DNS.
*If it detects announcements, it will connect to the ConnectStation sending them. If no announcements are detected, it will assume the server role and start sending announcements itself.
*If the Server ConnectStation disappears from the cluster, another station will take over the server role automatically.
 
Overriding the default multicast group address and port for multicast announcements
You can override the default multicast group address and port for announcements by adding a _cnct._udp SRV entry into your DNS. ConnectStations will then use the specified address/port for cluster discovery via multicast announcement (as well as for Client’s Discovery). As with explicit server selection, the entries need to correspond to the DNS search domain set by your DHCP server.
Example:
1. Assume you want to override the default multicast group address and port to be 224.1.2.3:1234.
2. Your DHCP sets the domain field (DHCP Option 15) to an arbitrary domain name, let’s assume it is “your-domain.com”.
3. Create a single SRV entry as follows. The priority and weight fields are currently irrelevant. Set the TTL to a sane value according to your network requirements.
4. When reconnected to your network, or restarted, all announcement and discovery between ConnectStations will now work on the group address and port specified.