The first SAFR Server you install will automatically become the primary server. All subsequent servers you install will be secondary servers. There are two types of secondary servers:
With both types of secondary servers the traffic for the CoVi and Event API services are load-balanced across all servers. Other services, such as VIRGA (feed management), Reports, and the Web Console are not load-balanced and are always served from the primary server.
Install a single SAFR Server. The database runs on the primary (and only) server.
This configuration provides no redundancy if the primary server is offline.
Install a primary server and one or more simple secondary servers. The database runs on the primary server only.
This configuration provides no redundancy if the primary server is offline.
The secondary servers can be offline without impacting functionality, although performance may suffer.
Install a primary server and a redundant secondary server. The database runs on both the primary and secondary servers.
This configuration provides no redundancy if the primary server is offline.
The secondary server can be offline without impacting functionality, although performance may suffer.
Database content is replicated to the secondary server, which provides another copy of the data. This can act as a backup in case of emergencies, but the backup & restore scripts should be used for proper and complete backups.
Install a primary server and 2 redundant secondary servers. The database runs on both the primary and both secondary servers.
This configuration provides redundancy if the primary server is offline.
A single server can be offline without impacting functionality. If the primary and one secondary, or both secondary servers go offline, the whole cluster will go offline. A majority of the servers are required to be online for your SAFR system to function.
Install a primary server and 3 or more redundant secondary servers. The database runs on both the primary server as well as all the secondary servers. Only the first two secondary servers that were added can act as the primary database host, though. Additional secondary servers will continue to replicate database data but cannot become the primary database host and do not count towards the “majority” count required for a primary database host to be elected.
This configuration provides redundancy if the primary server is offline.
A single server can be offline without impacting functionality. If the primary and one of the first two secondary, or both of the first two secondary servers go offline, the database cannot have a primary member, and the whole cluster will go offline. A majority of the first three installed servers is required to be online for SAFR to function. Additional secondary servers past the first two can be offline without any impact to functionality.
If your system is connected to the Internet, do the following to add a secondary server to your existing primary server:
If you are not connected to the Internet, you can still connect to the primary SAFR Server, but the auto-discovery process is not available. You must instead manually configure the newly installed secondary server to locate the primary server. When manually configuring the new secondary server, Windows and Linux users will need to choose if they want the server to be a simple secondary server or a redundant secondary server.
Download and install SAFR Platform on the second machine.
Run the safr-worker
script on your secondary server by doing the following:
For macOS:
sudo /Library/RealNetworks/SAFR/bin/safr-worker HOSTNAME
For Windows
On the primary server record the contents of C:\Program Files\RealNetworks\SAFR\mongo\.adminpass
and C:\Program Files\RealNetworks\SAFR\mongo\mongod.keyfile
On the new secondary server, open a command prompt by right-clicking on the Start menu, select Run, and enter cmd
.
If you want it to be a simple secondary server, in the new command prompt run the following command, substituting the password from Step 1 for PASSWORD and the primary server hostname for HOSTNAME:
"C:\Program Files\RealNetworks\SAFR\bin\safr-worker.py" -p PASSWORD HOSTNAME
OR
If you want it to be a redundant secondary server, in the new command prompt run the following command, substituting the mongod.keyfile
contents from Step 1 for KEYFILE, the password from Step 1 for PASSWORD, and the primary server hostname for HOSTNAME:
"C:\Program Files\RealNetworks\SAFR\bin\safr-worker.py" -s KEYFILE -p PASSWORD HOSTNAME
For Linux
On the primary server, record the contents of /opt/RealNetworks/SAFR/mongo/.adminpass
and /opt/RealNetworks/SAFR/mongo/mongod.keyfile
If you want it to be a simple secondary server, on the new secondary server run the following command, substituting the password from Step 1 for PASSWORD and the primary server hostname for HOSTNAME:
sudo python /opt/RealNetworks/SAFR/bin/safr-worker.py -p PASSWORD HOSTNAME
OR
If you want it to be a redundant secondary server, on the new secondary server run the following command, substituting the mongod.keyfile
contents from Step 1 for KEYFILE, the password from Step 1 for PASSWORD, and the primary server hostname for HOSTNAME:
sudo python /opt/RealNetworks/SAFR/bin/safr-worker.py -s KEYFILE -p PASSWORD HOSTNAME
When attempting to join a new secondary server, you might encounter the following error messages:
Error Message | Description |
---|---|
System is offline | Network or system connectivity issue. Attempt to access the system at a later time. |
SAFR master host is not reachable | Ensure all servers are connected to the same network and try again. |
Improperly configured SSL certificate | SSL certificates are required to set up multiple servers. See the SSL Certificate Installation page for information about how to install an SSL certificate. |
Secure connection error. Check server for valid SSL certificate | SSL certificates are required to set up multiple servers. See the SSL Certificate Installation page for information about how to install an SSL certificate. |
Incomplete server connection | Attempt to join again; a persistent issue may require either uninstalling and reinstalling SAFR Platform on your servers or contacting your SAFR support representative. |