You are right, that's the way our DNS works.
I probably wasn't clear enough.  I will describe a scenario.

Let's say we have HTTP client which opened session to HAProxy and HAProxy bind 
to 10.0.0.1 backend server (HAProxy will get 10.0.0.1 from the DNS upon health 
check and not upon client request As far as I understand)
Session time out is 7 minutes.

After 1 minute the same HTTP client sent second request.
Now I have few questions:
1.      Will HAProxy keep 10.0.0.1 session (since the session time out 7 
minutes- not expired) for the second request from the HTTP client ?
2.      How HAproxy test / health check ips of exist sessions when configured 
working with DNS?
3.      I guess that new session will get ip from the latest DNS response by 
health check i.g 10.0.0.4, right ?

Hope my questions are clear now

Thanks
Amir Yosef


-----Original Message-----
From: Baptiste [mailto:bed...@gmail.com]
Sent: Monday, November 17, 2014 2:12 PM
To: Yosef Amir
Cc: Cohen Galit; HAProxy; Meltser Tiran
Subject: Re: HAProxy - DNS

On Mon, Nov 17, 2014 at 11:37 AM, Yosef Amir 
<amir.yo...@comverse.com<mailto:amir.yo...@comverse.com>> wrote:
> Lets say that the DNS is configure with s1.domain.com which has 5 ips:
> 10.0.0.1
> 10.0.0.2
> 10.0.0.3
> 10.0.0.4
> 10.0.0.5
>
> The DNS respond for the first DNS query 10.0.0.1 for the second 10.0.0.2 and 
> so on...(roundrobin)
> That's mean the for each health check (DNS query) HAProxy will get different 
> ip.
> Probably for TCP mode (stateless sessions) it is fine but I guess it will not 
> proper configuration for HTTP (statefull sessions), right ?
>

Actually, your DNS server will answer with all the IPs, but in different orders:
IE, response 1:
 10.0.0.1
 10.0.0.2
 10.0.0.3
 10.0.0.4
 10.0.0.5

response 2:
 10.0.0.2
 10.0.0.3
 10.0.0.4
 10.0.0.5
 10.0.0.1

response 3:
 10.0.0.3
 10.0.0.4
 10.0.0.5
 10.0.0.1
 10.0.0.2

and so on.
The IP of the server won't change as long as its current IP belongs to the list.

If you think your DNS server has a different behavior, please let me
know which one you're using and how it is configured, so I can give it
a try.

Baptiste

  ________________________________
"This e-mail message may contain confidential, commercial or privileged 
information that constitutes proprietary information of Comverse Inc. or its 
subsidiaries. If you are not the intended recipient of this message, you are 
hereby notified that any review, use or distribution of this information is 
absolutely prohibited and we request that you delete all copies and contact us 
by e-mailing to: secur...@comverse.com. Thank You."

Reply via email to