Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:54:34+00:00 2026-06-12T17:54:34+00:00

I’m using HAProxy 1.4.22. I have the following haproxy.conf file: global maxconn 100000 daemon

  • 0

I’m using HAProxy 1.4.22. I have the following haproxy.conf file:

global
    maxconn 100000
    daemon

defaults
    mode http
    retries 1
    contimeout 8000
    clitimeout 120000
    srvtimeout 120000
    stats enable
    stats uri     /haproxy-stats
    stats auth admin:****************
    option httpchk

frontend http-in
    bind 16.9.13.39:80
    maxconn 100000
    acl is_l1 hdr_end(host) -i l1.mydomain.com
    acl is_l2 hdr_end(host) -i l2.mydomain.com
    acl is_l3 hdr_end(host) -i l3.mydomain.com
    acl is_l0 hdr_end(host) -i mydomain.com
    use_backend lora1 if is_l1
    use_backend lora2 if is_l2
    use_backend lora3 if is_l3
    use_backend lora0 if is_l0
    default_backend lora0

backend lora0
    balance roundrobin
    option forwardfor except 127.0.0.1  # stunnel already adds the header
    server s0 127.0.0.1:5000 check inter 60000

backend lora1
    balance source
    option forwardfor except 127.0.0.1  # stunnel already adds the header
    server s1 127.0.0.1:5001 check inter 60000

backend lora2
    balance source
    option forwardfor except 127.0.0.1  # stunnel already adds the header
    server s2 127.0.0.1:5002 check inter 60000

backend lora3
    balance source
    option forwardfor except 127.0.0.1  # stunnel already adds the header
    server s3 127.0.0.1:5003 check inter 60000

It all works fine. Except, for some 0.2% of the clients. Sometimes when the request comes for l1, l2 or l3. For example:

http://l3.mydomain.com/something

and HAProxy does not match the domain name for some reason and uses default backend instead. I have set up logging in my application and it reports that hostname on the receiving end is in fact “l3.mydomain.com”. Here are the headers that my application receives:

host: 'l3.mydomain.com',
'user-agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
referer: 'http://mydomain.com/menu/2034414/e2e1abb5500ed51391d6351b1cf03695',
'accept-encoding': 'gzip,deflate,sdch',
'accept-language': 'en-US,en;q=0.8',
'accept-charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'x-proxy-id': '1407537728',
'x-forwarded-for': '10.201.4.168',
via: '1.1 10.201.255.254 (Mikrotik HttpProxy)'

Questions:

Am I using hdr_end() properly, and is there some special case when matching might fail?

Is there some way log the actual HTTP readers received by HAProxy, but only when nothing is matched and default_backend rule is used?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:54:35+00:00Added an answer on June 12, 2026 at 5:54 pm

    The problem was that the remote user’s proxy sees that both mydomain.com and l3.mydomain.com are the same IP address and tries to reuse the connection. Adding the http-server-close option solved the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.