Score:0

Experiencing latency with haproxy load balancer

it flag
B.U

I'm experiencing high latency with haproxy load balancer when backend configuration uses private network IP addresses.

But when I replace backend server addresses with public IP address or Reverse DNS name I experience no latency.

  • What is causing the latency?
  • If one uses public IP or fqdn or Reverse DNS name, does network traffic bypasses haproxy?
  • Is it allowed to use public IP or fqdn or Reverse DNS name for backend servers in haproxy conf?

Configuration With Private Network IP Addresses

global
    log /dev/log    local0
    log 127.0.0.1 local1 notice
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    daemon
    maxconn 18000

    # Default SSL material locations
    ca-base /etc/ssl/certs
    crt-base /etc/ssl/private

defaults
    log global
    mode http
    option  httplog

    timeout client 30s
    timeout connect 4s
    timeout server 30s

frontend www
    bind *:80
    default_backend webservers

backend webservers
    mode http
    balance roundrobin
    server server1 10.0.0.20:80
    server server2 10.0.0.30:80

Configuration With Reverse DNS or Public IP Addresses

global
    log /dev/log    local0
    log 127.0.0.1 local1 notice
    chroot /var/lib/haproxy
    user haproxy
    group haproxy
    daemon
    maxconn 18000

    # Default SSL material locations
    ca-base /etc/ssl/certs
    crt-base /etc/ssl/private

defaults
    log global
    mode http
    option  httplog

    timeout client 30s
    timeout connect 4s
    timeout server 30s

frontend www
    bind *:80
    default_backend webservers

backend webservers
    mode http
    balance roundrobin
    server server1 90-80-70-40.example.com:80
    server server2 90-80-70-50.example.com:80
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.