Clustering with NxFilter
NxFilter supports clustering for load balancing and fail-safe. Once you have a master node you can add up to 4 slave nodes to your cluster. All the slave nodes in your cluster share the settings from their master node. So you can control everything on your master node.
Creating a clusterTo create a cluster, the first thing you need to do is to set up a master node. On 'Config > Cluster', you can make one of your NxFilter installations to be your master node. And then you can add the other NxFilter installations as the slave nodes to your mater node. You need to restart NxFilter after change the cluster setup.
Clustering requires TCP/19002, TCP/19003, TCP/19004 ports opened on the master node.
Starting NxFilter clusterWhen you start NxFilter cluster, start your master node first and then your slave nodes. This is because your slave nodes need to download the initial setup from their master node when they start.
Load balancing and fail-safeOne good thing about a DNS filter is that there is already a way of load balancing and fail-safe existing. Make your master node to be the primary DNS server and your slave node to be the secondary DNS server in your network. Then you have load balancing and fail-safe.
Redundancy for block redirecitonYou can have multiple block redirection IP addresses separated by commas on 'Config > Setup' for redundancy. But if you use NxCloud, you may want it to be even more secured. If you use NxCloud, you can do the block redirection to each slave node by setting up 'block_node_ip' on each slave node's /nxcloud/conf/cfg.properties file with its own IP. For example, if you have a slave node on 192.168.0.100, add the following line into /nxcloud/conf/cfg.properties file. block_node_ip = 192.168.0.100
When a cluster node downWhen a slave node down, the other nodes will not be affected. When your master node down, you still don't lose your filtering unless you restart your slave node before you restore the master node. But there are several things need to be aware of.
If you have an alert email setup on 'Config > Alert', you will receive an email when a cluster node down.1. Login redirection will not be working
When your master node down, we can't share the login session between cluster nodes. This means your login page will not be working correctly. So we don't redirect users to the login page.2. Unauthenticated users will be bypassed
If we don't redirect 'Password Users' to the login page they can't login. But we don't want to let them lose the Internet. So we bypass filtering for these unauthenticated users when your master node down. If you don't want to bypass filtering for any users even if your master node down try to have a default user covering the entire IP range of your network.3. Multiple server IP addresses with an agent
NxCloud's case is a bit different. It drops the requests from unauthenticated users because the login redirection is not a default option for NxCloud and the users on NxCloud mostly use other authentication methods.
If you use our agent programs with multiple server IP addresses for fail-safe, they will still be working.
Access control for a slave nodeIf you add all your slave node IP addresses into 'Config > Cluster', any attempt to join a slave node from an unknown source IP address will be blocked.
Monitoring connection stateYou can view the connection state of your slave nodes on 'Config > Cluster'. Once you set up your cluster then your slave nodes will be shown with the last contact time on the page. It is also showing each node's request, block, user, client-ip counting data. These counters will be set to 0 on midnight or when you restart NxFilter.
TroubleshootingWhen you don't have an entry for your master node on /etc/hosts file of your slave node your slave node might get stuck with the following message during its startup process,
This problem is from our DB library. It requires a hostname in /etc/hosts file to connect.
INFO [07-31 06:10:53] - MM, MasterCheck started.