A network load balancing cluster on Windows or Linux – the farm cluster

High availability and scalability of web services with a network load balancing cluster

The SafeKit farm cluster implements a network load balancing cluster among several servers. It provides a simple solution to critical application scalability and high availability.

In a network load balancing cluster, the same application runs on each server, and the load is balanced by the distribution of network activity on the different servers of the farm. This type of cluster is suited to front-end applications like web services.

The SafeKit software saves the cost of hardware load balancers. It does not require specific servers above the farm for implementing the network load balancing cluster.

Farm cluster - A network load balancing cluster on Windows, Linux or AIX

The network load balancing is very efficiently implemented by a network filter driver. This driver works on Windows and Linux (even on Windows editions for PCs).

SafeKit provides a generic farm module on Windows and Linux to build a network load balancing cluster. You can write your own farm module for your application starting from the generic farm module. Apache and Microsoft IIS are examples of farm modules.

Combined with the farm cluster, you can also implement a mirror cluster with real-time file replication and failover.

Example: Apache load balancing and failover

If you want to implement this demonstration of Apache load balancing and failover, read the following article.

Principle of a virtual IP address in a network load balancing cluster

The virtual IP address is configured locally on each server in the network load balancing cluster.

The input traffic for the virtual IP address is received by all the servers and split among them by a filter inside each server's kernel.

The network load balancing algorithm inside the filter is based on the identity of the client packets (client IP address, client TCP port). Depending on the identity of the client packet input, only one filter in a server accepts the packet; the other filters in other servers reject it.

Once a packet is accepted by the filter on a server, only the CPU and memory of this server are used by the application that responds to the request of the client. The output messages are sent directly from the application server to the client.

If a server fails, the SafeKit membership protocol reconfigures the filters in the network load balancing cluster to re-balance the traffic on the remaining available servers.

Note that a comparison between Microsoft NLB and SafeKit network load balancing is available here.  And note that SafeKit network load balancing is working not only on Windows (including Windows editions for PCs) but also on Linux.

Stateful or stateless web services in a network load balancing cluster

With a stateful server, there is session affinity. The same client must be connected to the same server on multiple HTTP/TCP sessions to retrieve its context on the server. In this case, the SafeKit load balancing rule is configured on the client IP address. Thus, the same client is always connected to the same server on multiple TCP sessions. And different clients are distributed across different servers in the farm. This configuration is used when there are session affinities.

With a stateless server, there is no session affinity. The same client can be connected to different servers in the farm on multiple HTTP/TCP sessions; because there is no context stored locally on a server from one session to another. In this case, the SafeKit load balancing rule is configured on the TCP client session identity. This configuration is the one which is the best for distributing sessions between servers, but it requires a TCP service without session affinity.

If you are also interested by real-time replication and failover in a mirror cluster, read this article.

Examples of cluster configurations with Windows and Linux high availability modules

Mirror modules



Microsoft SQL ServerWindows module-
OracleWindows moduleLinux module
MySQLWindows moduleLinux module
PostgreSQLWindows moduleLinux module
FirebirdWindows moduleLinux module
Hyper-VWindows module-
Milestone XProtect (based on Microsoft SQL Server)Windows module-
Hanwha SSM (based on PostgreSQL)Windows module-
Generic moduleWindows moduleLinux module

Farm modules



IIS moduleWindows module-
Apache moduleWindows moduleLinux module
Generic moduleWindows moduleLinux module

Evidian SafeKit Pricing

White Papers


To receive Evidian news, please fill the following form.