Exploring Snapt is a recurring series of Snapt blog posts that looks at highlighted features of the product. For more, please see the Exploring Snapt category.

After using the Create a load balancer wizard, you may want to tweak certain settings within your group. We'll be using the HTTP wizard in this example.

Balance Method, Mode and Max Connections

The first tab of the Edit Group interface allows you to configure the general settings for the group. Primarily the Mode, Method and connection options.

The Balance Method allows you to choose the algorithm for the group. We recommend Round-robin for short sessions (like HTTP) and Least Connections for longer sessions (SQL, RDP, etc).

Balance Mode lets you set the group to HTTP (for all the added functionality), or TCP if it's another protocol. Note that when SSL termination is enabled, you want HTTP mode!

Max Connections is important to set wisely. Make it 5-10% lower than your global max connections (under Configuration -> Default Settings) and make them both reasonable. This helps the load balance to alert to over use, or pick up DoS attacks.

Protocol Tests

Snapt has support for several additional health checks to specific services, like SMTP, or SQL. In this example we'll be talking about the most common - HTTP/S.

Turning on HTTP Check's means the load balancer will request a web page from your system, and by default if it responds with a 200 status code consider it to be up.

The URL allows you to customize what to fetch, and the Expect feature lets you expect a very specific string.

In our example, test.php ensures it can connect to our MySQL and Redis servers, and if it can it returns the word UP. In this way we can ensure the dependencies of our app are also online!

The best way of doing session stickiness for HTTP! You can use source hashing, or stick tables, but cookie insertion allows a users IP to change, for them to take a laptop home, and still persist.

Generally speaking you will want to insert a cookie, and enable HTTP only (and Secure if it's HTTPS).

This will tag requests with which server they went to, and then pick that cookie up when the user comes back. No matter the network, IP change, etc! Awesome!


Snapt is the leading edge software load balancer, jam packed with metrics and tools for DevOps.

Want your load balancer (that you can deploy anywhere) to tell you an  app server is running 500ms slower than the rest? Via Slack?

Then you want Snapt! Try it for free today.