Posts

Showing posts with the label haproxy

High Availability Redis with Automatic Failover

Image
Redis is a powerful tool to store key-value data in various formats. Here’s a simple way to create failover replication. Sometimes people call this a Redis cluster, but in reality it’s just a few servers (preferably 3 for Sentinel quorum) with one master and multiple slaves in different configurations (slave of slave, slave by priority, local slave, etc.).

HAProxy in Front of InfluxDB

We have Telegraf sending stats to two InfluxDB servers, but our dashboard should point to only one. Additionally, Nagios monitors InfluxDB health. Here’s how we can combine a script, xinetd, and HAProxy to manage this.

Routing Part of an Application to a New Version with HAProxy

Sometimes you need to roll out only part of an application to production. This often happens after refactoring or when introducing a new version of specific endpoints. With HAProxy you can route only selected requests to the new backend while keeping the rest of the traffic on the existing servers.

Mass redirect using Haproxy map file

During application upgrades or migrations it’s common to keep old URLs working for backward compatibility. One simple way to handle large numbers of redirects in HAProxy is to use a map file. If you are using Nginx, you can find a similar approach here: Nginx .