How to use Haproxy redis-check with a password

It seems like option redis-check in Haproxy does not support Redis-databases that requires authentication as of 1.9.6 (newest version).

That means that if you want to check the health of password protected redis-servers, you would have to use a tcp-check, so you will have to modify your check like this:

listen redisserver
  bind *:6380
  mode tcp
  server redis_backend someredisserver:11020

  option redis-check

to:

listen redisserver
  bind *:6380
  mode tcp
  server redis_backend someredisserver:11020

  option tcp-check
  tcp-check send AUTH\ aveeeeeryseeeecretpassword\r\n
  tcp-check expect string +OK
  tcp-check send PING\r\n
  tcp-check expect string +PONG
 
23
Kudos
 
23
Kudos

Now read this

Zero-downtime upgrades with AWS Elastic Loadbalancers (ELBs) and Haproxy

I have a Classic Loadbalancer configured in my infrastructure with Terraform: resource "aws_elb" "ingress" { # (...) # Regular traffic: listener { lb_port = 80 lb_protocol = "tcp" instance_port = 8888 instance_protocol = "tcp" } listener... Continue →