You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by "Velusamy, Gandhimathi" <gv...@Central.UH.EDU> on 2017/11/14 00:16:00 UTC

How to load balance across hierarchical Proxies

Hi,

I am trying to distribute the load balancing between servers connected with three proxies.

In my setup, I have three proxy servers and each of them have two origin servers and one client.
I would like to balance the load across servers connected with other proxies when the rate of incoming requests are more.
To begin, I started with round robin policy.
First I tried to add the proxy2 and proxy 2 as one of the origin servers in remap config as below:

map http://UHLB<http://uhlb> http://UHLB<http://uhlb> @plugin=balancer.so @pparam=--policy=roundrobin @pparam=192.168.20.2 @pparam=192.168.30.2 @pparam=192.168.40.2 @pparam=192.168.50.2
The last two IP addresses are proxy 2 and proxy3.
But It did not work.
I read about parent proxying. But in my case, I want to load balance. May I please know to configure to achieve load balancing across hierarchical proxies.

Thanks
Gandhimathi

[cid:4673FE66-3B3D-4C35-A510-82DAD42AF3D8@e.uh.edu]

Re: How to load balance across hierarchical Proxies

Posted by "Velusamy, Gandhimathi" <gv...@Central.UH.EDU>.
I didn’t edit splitdns.config but it is working now.

-Gandhimathi
On Nov 14, 2017, at 5:46 PM, Igor Cicimov <ig...@encompasscorporation.com>> wrote:

Yep that's exactly what I did (looking at my notes):

/etc/hosts
54.xxx.xxx.xxx subdomain.mydomain.com<http://subdomain.mydomain.com/> subdomain

splitdns.config
dest_domain=subdomain.mydomain.com<http://subdomain.mydomain.com/> named=127.0.0.1

Now we only need DNS server on the local loop interface which is done by installing dnsmasq. After that the resolv.conf will point to 127.0.0.1<http://127.0.0.1/>:

/etc/resolv.conf
nameserver 127.0.0.1
search eu-west-1.compute.internal

Good point on the proxy.config.http.insert_request_via_str


On Wed, Nov 15, 2017 at 10:39 AM, Velusamy, Gandhimathi <gv...@central.uh.edu>> wrote:
Hi Igor Cicimov,

     Thanks for your response.
I installed Dnsmasq on the nodes in which traffic server is running and now everything works fine. I did changes in records.config to make the traffic server works as transparent proxy and  set proxy.config.http.insert_request_via_str to 0 to avoid multi hop cycle error.

Thanks
Gandhimathi



On Nov 14, 2017, at 5:20 PM, Igor Cicimov <ig...@encompasscorporation.com>> wrote:

Hi,

I guess that very much depends on your DNS setup. For example if your ATS domain name is same as the domain name hosted by the origin servers then when ATS tries DNS resolution it will get it's own IP. I'm sure this does not sound very clear so recommend looking at the splitdns.config file and it's documentation for details.

On Wed, Nov 15, 2017 at 3:02 AM, Velusamy, Gandhimathi <gv...@central.uh.edu>> wrote:
Hi,
I noticed that there is problem with DNS resolution.
When I send http request  directly from the node on which the traffic server is installed  to the origin server, I am able to receive response from the server. That seems the DNS is working. But When I use Traffic server, It is giving 502 server not found error. When I debugged with “dns” option, it is returns response code 3.
Does Traffic server need any special DNS mapping.

I first tried with only one level of proxying but unable to do when I use hostnames in the remap config.
It resolves the hostname for traffic server node but the dns resolving does not happens for origin servers. WhenI use IP addresses for origin servers, the loadbalancer is working. But I need hostnames to be used for origin servers in the remap.config when I go hierarchical proxying.

Any pointers on where to look to solve this issue will be appreciated.

Thanks
Gandhimathi


gvelus01@clb:/usr/local$ sudo bin/traffic_server -T "dns"
traffic_server: using root directory '/usr/local'
[Nov 14 10:30:56.876] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc/>:1604 (ink_dns_init)> (dns) ink_dns_init: called with init_called = 0
[Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc/>:247 (dns_init)> (dns) localhost=clb
[Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc/>:248 (dns_init)> (dns) Round-robin nameservers = 1
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:482 (startEvent)> (dns) DNSHandler::startEvent: on thread 0
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:427 (open_con)> (dns) open_con: opening connection 10.103.0.1:53<http://10.103.0.1:53/>
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNSConnection.cc<http://dnsconnection.cc/>:143 (connect)> (dns) random port = 0.0.0.0:52329<http://0.0.0.0:52329/>
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:455 (open_con)> (dns) opening connection 10.103.0.1:53<http://10.103.0.1:53/> SUCCEEDED for 0
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:504 (startEvent)> (dns_pas) opened connection to 10.103.0.1:53<http://10.103.0.1:53/>, n_con = 1
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1091 (getby)> (dns) received query cs2 type = 1, timeout = 0
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1057 (mainEvent)> (dns) enqueing query cs2
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1063 (mainEvent)> (dns) adding first to collapsing queue
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:978 (write_dns_event)> (dns) send query (qtype=1) for cs2 to fd 21
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1010 (write_dns_event)> (dns) sent qname = cs2, id = 22417, nameserver = 0
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <P_DNSProcessor.h:239 (sent_one)> (dns) sent_one: failover_number for resolver 0 is 1
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:759 (recv_dns)> (dns) received packet size = 21
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:761 (recv_dns)> (dns) round-robin: nameserver 0 DNS response code = 0
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1306 (dns_process)> (dns) received rcode = 3
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1328 (dns_process)> (dns) DNS error 3 for [cs2]



On Nov 13, 2017, at 6:16 PM, Velusamy, Gandhimathi <gv...@central.uh.edu>> wrote:

Hi,

I am trying to distribute the load balancing between servers connected with three proxies.

In my setup, I have three proxy servers and each of them have two origin servers and one client.
I would like to balance the load across servers connected with other proxies when the rate of incoming requests are more.
To begin, I started with round robin policy.
First I tried to add the proxy2 and proxy 2 as one of the origin servers in remap config as below:

map http://UHLB<http://uhlb/> http://UHLB<http://uhlb/> @plugin=balancer.so @pparam=--policy=roundrobin @pparam=192.168.20.2 @pparam=192.168.30.2 @pparam=192.168.40.2 @pparam=192.168.50.2
The last two IP addresses are proxy 2 and proxy3.
But It did not work.
I read about parent proxying. But in my case, I want to load balance. May I please know to configure to achieve load balancing across hierarchical proxies.

Thanks
Gandhimathi

<PastedGraphic-1.tiff>




--
Igor Cicimov | DevOps

[https://docs.google.com/uc?export=download&id=0B7WaFrYzRSehSFhOenVBajIzT3c&revid=0B7WaFrYzRSehL2k1RjZZd0sxZXd0L3BPeWdiVWlyUlNJMS9zPQ]

p. +61 (0) 433 078 728
e. igorc@encompasscorporation.com<http://encompasscorporation.com/>
w. www.encompasscorporation.com<http://www.encompasscorporation.com/>
a. Level 4, 65 York Street, Sydney 2000<https://maps.google.com/?q=Level+4,+65+York+Street,+Sydney+2000&entry=gmail&source=g>




--
Igor Cicimov | DevOps

[https://docs.google.com/uc?export=download&id=0B7WaFrYzRSehSFhOenVBajIzT3c&revid=0B7WaFrYzRSehL2k1RjZZd0sxZXd0L3BPeWdiVWlyUlNJMS9zPQ]

p. +61 (0) 433 078 728
e. igorc@encompasscorporation.com<http://encompasscorporation.com/>
w. www.encompasscorporation.com<http://www.encompasscorporation.com/>
a. Level 4, 65 York Street, Sydney 2000


Re: How to load balance across hierarchical Proxies

Posted by Igor Cicimov <ig...@encompasscorporation.com>.
Yep that's exactly what I did (looking at my notes):

/etc/hosts
54.xxx.xxx.xxx subdomain.mydomain.com subdomain

splitdns.config
dest_domain=subdomain.mydomain.com named=127.0.0.1

Now we only need DNS server on the local loop interface which is done by
installing dnsmasq. After that the resolv.conf will point to 127.0.0.1:

/etc/resolv.conf
nameserver 127.0.0.1
search eu-west-1.compute.internal

Good point on the proxy.config.http.insert_request_via_str


On Wed, Nov 15, 2017 at 10:39 AM, Velusamy, Gandhimathi <
gvelusam@central.uh.edu> wrote:

> Hi Igor Cicimov,
>
>      Thanks for your response.
> I installed Dnsmasq on the nodes in which traffic server is running and
> now everything works fine. I did changes in records.config to make the
> traffic server works as transparent proxy and  set proxy.config.http.insert_
> request_via_str to 0 to avoid multi hop cycle error.
>
> Thanks
> Gandhimathi
>
>
>
> On Nov 14, 2017, at 5:20 PM, Igor Cicimov <ig...@encompasscorporation.com>
> wrote:
>
> Hi,
>
> I guess that very much depends on your DNS setup. For example if your ATS
> domain name is same as the domain name hosted by the origin servers then
> when ATS tries DNS resolution it will get it's own IP. I'm sure this does
> not sound very clear so recommend looking at the *splitdns.config* file
> and it's documentation for details.
>
> On Wed, Nov 15, 2017 at 3:02 AM, Velusamy, Gandhimathi <
> gvelusam@central.uh.edu> wrote:
>
>> Hi,
>> I noticed that there is problem with DNS resolution.
>> When I send http request  directly from the node on which the traffic
>> server is installed  to the origin server, I am able to receive response
>> from the server. That seems the DNS is working. But When I use Traffic
>> server, It is giving 502 server not found error. When I debugged with “dns”
>> option, it is returns response code 3.
>> Does Traffic server need any special DNS mapping.
>>
>> I first tried with only one level of proxying but unable to do when I use
>> hostnames in the remap config.
>> It resolves the hostname for traffic server node but the dns resolving
>> does not happens for origin servers. WhenI use IP addresses for origin
>> servers, the loadbalancer is working. But I need hostnames to be used for
>> origin servers in the remap.config when I go hierarchical proxying.
>>
>> Any pointers on where to look to solve this issue will be appreciated.
>>
>> Thanks
>> Gandhimathi
>>
>>
>> gvelus01@clb:/usr/local$ sudo bin/traffic_server -T "dns"
>> traffic_server: using root directory '/usr/local'
>> [Nov 14 10:30:56.876] Server {0x7f41b7666780} DEBUG: <DNS.cc
>> <http://dns.cc/>:1604 (ink_dns_init)> (dns) ink_dns_init: called with
>> init_called = 0
>> [Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc
>> <http://dns.cc/>:247 (dns_init)> (dns) localhost=clb
>> [Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc
>> <http://dns.cc/>:248 (dns_init)> (dns) Round-robin nameservers = 1
>> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:482 (startEvent)> (dns) DNSHandler::startEvent: on
>> thread 0
>> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:427 (open_con)> (dns) open_con: opening connection
>> 10.103.0.1:53
>> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNSConnection.cc
>> <http://dnsconnection.cc/>:143 (connect)> (dns) random port =
>> 0.0.0.0:52329
>> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:455 (open_con)> (dns) opening connection 10.103.0.1:53
>> SUCCEEDED for 0
>> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:504 (startEvent)> (dns_pas) opened connection to
>> 10.103.0.1:53, n_con = 1
>> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:1091 (getby)> (dns) received query cs2 type = 1,
>> timeout = 0
>> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:1057 (mainEvent)> (dns) enqueing query cs2
>> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:1063 (mainEvent)> (dns) adding first to collapsing queue
>> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:978 (write_dns_event)> (dns) send query (qtype=1) for
>> cs2 to fd 21
>> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:1010 (write_dns_event)> (dns) sent qname = cs2, id =
>> 22417, nameserver = 0
>> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG:
>> <P_DNSProcessor.h:239 (sent_one)> (dns) sent_one: failover_number for
>> resolver 0 is 1
>> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:759 (recv_dns)> (dns) received packet size = 21
>> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:761 (recv_dns)> (dns) round-robin: nameserver 0 DNS
>> response code = 0
>> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:1306 (dns_process)> (dns) received rcode = 3
>> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
>> <http://dns.cc/>:1328 (dns_process)> (dns) DNS error 3 for [cs2]
>>
>>
>>
>> On Nov 13, 2017, at 6:16 PM, Velusamy, Gandhimathi <
>> gvelusam@Central.UH.EDU <gv...@central.uh.edu>> wrote:
>>
>> Hi,
>>
>> I am trying to distribute the load balancing between servers connected
>> with three proxies.
>>
>> In my setup, I have three proxy servers and each of them have two origin
>> servers and one client.
>> I would like to balance the load across servers connected with other
>> proxies when the rate of incoming requests are more.
>> To begin, I started with round robin policy.
>> First I tried to add the proxy2 and proxy 2 as one of the origin servers
>> in remap config as below:
>>
>> map http://UHLB <http://uhlb/> http://UHLB <http://uhlb/>
>> @plugin=balancer.so @pparam=--policy=roundrobin @pparam=192.168.20.2
>> @pparam=192.168.30.2 @pparam=192.168.40.2 @pparam=192.168.50.2
>> The last two IP addresses are proxy 2 and proxy3.
>> But It did not work.
>> I read about parent proxying. But in my case, I want to load balance. May
>> I please know to configure to achieve load balancing across hierarchical
>> proxies.
>>
>> Thanks
>> Gandhimathi
>>
>> <PastedGraphic-1.tiff>
>>
>>
>>
>
>
> --
> Igor Cicimov | DevOps
>
>
> p. +61 (0) 433 078 728
> e. igorc@encompasscorporation.com <http://encompasscorporation.com/>
> w*.* www.encompasscorporation.com
> a. Level 4, 65 York Street, Sydney 2000
> <https://maps.google.com/?q=Level+4,+65+York+Street,+Sydney+2000&entry=gmail&source=g>
>
>
>


-- 
Igor Cicimov | DevOps


p. +61 (0) 433 078 728
e. igorc@encompasscorporation.com <http://encompasscorporation.com/>
w*.* www.encompasscorporation.com
a. Level 4, 65 York Street, Sydney 2000

Re: How to load balance across hierarchical Proxies

Posted by "Velusamy, Gandhimathi" <gv...@Central.UH.EDU>.
Hi Igor Cicimov,

     Thanks for your response.
I installed Dnsmasq on the nodes in which traffic server is running and now everything works fine. I did changes in records.config to make the traffic server works as transparent proxy and  set proxy.config.http.insert_request_via_str to 0 to avoid multi hop cycle error.

Thanks
Gandhimathi



On Nov 14, 2017, at 5:20 PM, Igor Cicimov <ig...@encompasscorporation.com>> wrote:

Hi,

I guess that very much depends on your DNS setup. For example if your ATS domain name is same as the domain name hosted by the origin servers then when ATS tries DNS resolution it will get it's own IP. I'm sure this does not sound very clear so recommend looking at the splitdns.config file and it's documentation for details.

On Wed, Nov 15, 2017 at 3:02 AM, Velusamy, Gandhimathi <gv...@central.uh.edu>> wrote:
Hi,
I noticed that there is problem with DNS resolution.
When I send http request  directly from the node on which the traffic server is installed  to the origin server, I am able to receive response from the server. That seems the DNS is working. But When I use Traffic server, It is giving 502 server not found error. When I debugged with “dns” option, it is returns response code 3.
Does Traffic server need any special DNS mapping.

I first tried with only one level of proxying but unable to do when I use hostnames in the remap config.
It resolves the hostname for traffic server node but the dns resolving does not happens for origin servers. WhenI use IP addresses for origin servers, the loadbalancer is working. But I need hostnames to be used for origin servers in the remap.config when I go hierarchical proxying.

Any pointers on where to look to solve this issue will be appreciated.

Thanks
Gandhimathi


gvelus01@clb:/usr/local$ sudo bin/traffic_server -T "dns"
traffic_server: using root directory '/usr/local'
[Nov 14 10:30:56.876] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc/>:1604 (ink_dns_init)> (dns) ink_dns_init: called with init_called = 0
[Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc/>:247 (dns_init)> (dns) localhost=clb
[Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc/>:248 (dns_init)> (dns) Round-robin nameservers = 1
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:482 (startEvent)> (dns) DNSHandler::startEvent: on thread 0
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:427 (open_con)> (dns) open_con: opening connection 10.103.0.1:53<http://10.103.0.1:53/>
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNSConnection.cc<http://dnsconnection.cc/>:143 (connect)> (dns) random port = 0.0.0.0:52329<http://0.0.0.0:52329/>
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:455 (open_con)> (dns) opening connection 10.103.0.1:53<http://10.103.0.1:53/> SUCCEEDED for 0
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:504 (startEvent)> (dns_pas) opened connection to 10.103.0.1:53<http://10.103.0.1:53/>, n_con = 1
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1091 (getby)> (dns) received query cs2 type = 1, timeout = 0
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1057 (mainEvent)> (dns) enqueing query cs2
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1063 (mainEvent)> (dns) adding first to collapsing queue
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:978 (write_dns_event)> (dns) send query (qtype=1) for cs2 to fd 21
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1010 (write_dns_event)> (dns) sent qname = cs2, id = 22417, nameserver = 0
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <P_DNSProcessor.h:239 (sent_one)> (dns) sent_one: failover_number for resolver 0 is 1
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:759 (recv_dns)> (dns) received packet size = 21
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:761 (recv_dns)> (dns) round-robin: nameserver 0 DNS response code = 0
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1306 (dns_process)> (dns) received rcode = 3
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc/>:1328 (dns_process)> (dns) DNS error 3 for [cs2]



On Nov 13, 2017, at 6:16 PM, Velusamy, Gandhimathi <gv...@central.uh.edu>> wrote:

Hi,

I am trying to distribute the load balancing between servers connected with three proxies.

In my setup, I have three proxy servers and each of them have two origin servers and one client.
I would like to balance the load across servers connected with other proxies when the rate of incoming requests are more.
To begin, I started with round robin policy.
First I tried to add the proxy2 and proxy 2 as one of the origin servers in remap config as below:

map http://UHLB<http://uhlb/> http://UHLB<http://uhlb/> @plugin=balancer.so @pparam=--policy=roundrobin @pparam=192.168.20.2 @pparam=192.168.30.2 @pparam=192.168.40.2 @pparam=192.168.50.2
The last two IP addresses are proxy 2 and proxy3.
But It did not work.
I read about parent proxying. But in my case, I want to load balance. May I please know to configure to achieve load balancing across hierarchical proxies.

Thanks
Gandhimathi

<PastedGraphic-1.tiff>




--
Igor Cicimov | DevOps

[https://docs.google.com/uc?export=download&id=0B7WaFrYzRSehSFhOenVBajIzT3c&revid=0B7WaFrYzRSehL2k1RjZZd0sxZXd0L3BPeWdiVWlyUlNJMS9zPQ]

p. +61 (0) 433 078 728
e. igorc@encompasscorporation.com<http://encompasscorporation.com/>
w. www.encompasscorporation.com<http://www.encompasscorporation.com/>
a. Level 4, 65 York Street, Sydney 2000


Re: How to load balance across hierarchical Proxies

Posted by Igor Cicimov <ig...@encompasscorporation.com>.
Hi,

I guess that very much depends on your DNS setup. For example if your ATS
domain name is same as the domain name hosted by the origin servers then
when ATS tries DNS resolution it will get it's own IP. I'm sure this does
not sound very clear so recommend looking at the *splitdns.config* file and
it's documentation for details.

On Wed, Nov 15, 2017 at 3:02 AM, Velusamy, Gandhimathi <
gvelusam@central.uh.edu> wrote:

> Hi,
> I noticed that there is problem with DNS resolution.
> When I send http request  directly from the node on which the traffic
> server is installed  to the origin server, I am able to receive response
> from the server. That seems the DNS is working. But When I use Traffic
> server, It is giving 502 server not found error. When I debugged with “dns”
> option, it is returns response code 3.
> Does Traffic server need any special DNS mapping.
>
> I first tried with only one level of proxying but unable to do when I use
> hostnames in the remap config.
> It resolves the hostname for traffic server node but the dns resolving
> does not happens for origin servers. WhenI use IP addresses for origin
> servers, the loadbalancer is working. But I need hostnames to be used for
> origin servers in the remap.config when I go hierarchical proxying.
>
> Any pointers on where to look to solve this issue will be appreciated.
>
> Thanks
> Gandhimathi
>
>
> gvelus01@clb:/usr/local$ sudo bin/traffic_server -T "dns"
> traffic_server: using root directory '/usr/local'
> [Nov 14 10:30:56.876] Server {0x7f41b7666780} DEBUG: <DNS.cc
> <http://dns.cc>:1604 (ink_dns_init)> (dns) ink_dns_init: called with
> init_called = 0
> [Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc
> <http://dns.cc>:247 (dns_init)> (dns) localhost=clb
> [Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc
> <http://dns.cc>:248 (dns_init)> (dns) Round-robin nameservers = 1
> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:482 (startEvent)> (dns) DNSHandler::startEvent: on thread
> 0
> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:427 (open_con)> (dns) open_con: opening connection
> 10.103.0.1:53
> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNSConnection.cc
> <http://dnsconnection.cc>:143 (connect)> (dns) random port = 0.0.0.0:52329
> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:455 (open_con)> (dns) opening connection 10.103.0.1:53
> SUCCEEDED for 0
> [Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:504 (startEvent)> (dns_pas) opened connection to
> 10.103.0.1:53, n_con = 1
> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:1091 (getby)> (dns) received query cs2 type = 1, timeout
> = 0
> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:1057 (mainEvent)> (dns) enqueing query cs2
> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:1063 (mainEvent)> (dns) adding first to collapsing queue
> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:978 (write_dns_event)> (dns) send query (qtype=1) for cs2
> to fd 21
> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:1010 (write_dns_event)> (dns) sent qname = cs2, id =
> 22417, nameserver = 0
> [Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <P_DNSProcessor.h:239
> (sent_one)> (dns) sent_one: failover_number for resolver 0 is 1
> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:759 (recv_dns)> (dns) received packet size = 21
> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:761 (recv_dns)> (dns) round-robin: nameserver 0 DNS
> response code = 0
> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:1306 (dns_process)> (dns) received rcode = 3
> [Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc
> <http://dns.cc>:1328 (dns_process)> (dns) DNS error 3 for [cs2]
>
>
>
> On Nov 13, 2017, at 6:16 PM, Velusamy, Gandhimathi <
> gvelusam@Central.UH.EDU <gv...@central.uh.edu>> wrote:
>
> Hi,
>
> I am trying to distribute the load balancing between servers connected
> with three proxies.
>
> In my setup, I have three proxy servers and each of them have two origin
> servers and one client.
> I would like to balance the load across servers connected with other
> proxies when the rate of incoming requests are more.
> To begin, I started with round robin policy.
> First I tried to add the proxy2 and proxy 2 as one of the origin servers
> in remap config as below:
>
> map http://UHLB <http://uhlb/> http://UHLB <http://uhlb/>
> @plugin=balancer.so @pparam=--policy=roundrobin @pparam=192.168.20.2
> @pparam=192.168.30.2 @pparam=192.168.40.2 @pparam=192.168.50.2
> The last two IP addresses are proxy 2 and proxy3.
> But It did not work.
> I read about parent proxying. But in my case, I want to load balance. May
> I please know to configure to achieve load balancing across hierarchical
> proxies.
>
> Thanks
> Gandhimathi
>
> <PastedGraphic-1.tiff>
>
>
>


-- 
Igor Cicimov | DevOps


p. +61 (0) 433 078 728
e. igorc@encompasscorporation.com <http://encompasscorporation.com/>
w*.* www.encompasscorporation.com
a. Level 4, 65 York Street, Sydney 2000

Re: How to load balance across hierarchical Proxies

Posted by "Velusamy, Gandhimathi" <gv...@Central.UH.EDU>.
Hi,
I noticed that there is problem with DNS resolution.
When I send http request  directly from the node on which the traffic server is installed  to the origin server, I am able to receive response from the server. That seems the DNS is working. But When I use Traffic server, It is giving 502 server not found error. When I debugged with “dns” option, it is returns response code 3.
Does Traffic server need any special DNS mapping.

I first tried with only one level of proxying but unable to do when I use hostnames in the remap config.
It resolves the hostname for traffic server node but the dns resolving does not happens for origin servers. WhenI use IP addresses for origin servers, the loadbalancer is working. But I need hostnames to be used for origin servers in the remap.config when I go hierarchical proxying.

Any pointers on where to look to solve this issue will be appreciated.

Thanks
Gandhimathi


gvelus01@clb:/usr/local$ sudo bin/traffic_server -T "dns"
traffic_server: using root directory '/usr/local'
[Nov 14 10:30:56.876] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc>:1604 (ink_dns_init)> (dns) ink_dns_init: called with init_called = 0
[Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc>:247 (dns_init)> (dns) localhost=clb
[Nov 14 10:30:56.879] Server {0x7f41b7666780} DEBUG: <DNS.cc<http://dns.cc>:248 (dns_init)> (dns) Round-robin nameservers = 1
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:482 (startEvent)> (dns) DNSHandler::startEvent: on thread 0
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:427 (open_con)> (dns) open_con: opening connection 10.103.0.1:53
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNSConnection.cc<http://dnsconnection.cc>:143 (connect)> (dns) random port = 0.0.0.0:52329
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:455 (open_con)> (dns) opening connection 10.103.0.1:53 SUCCEEDED for 0
[Nov 14 10:30:56.888] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:504 (startEvent)> (dns_pas) opened connection to 10.103.0.1:53, n_con = 1
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:1091 (getby)> (dns) received query cs2 type = 1, timeout = 0
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:1057 (mainEvent)> (dns) enqueing query cs2
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:1063 (mainEvent)> (dns) adding first to collapsing queue
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:978 (write_dns_event)> (dns) send query (qtype=1) for cs2 to fd 21
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:1010 (write_dns_event)> (dns) sent qname = cs2, id = 22417, nameserver = 0
[Nov 14 10:31:11.913] Server {0x7f41b3c7d700} DEBUG: <P_DNSProcessor.h:239 (sent_one)> (dns) sent_one: failover_number for resolver 0 is 1
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:759 (recv_dns)> (dns) received packet size = 21
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:761 (recv_dns)> (dns) round-robin: nameserver 0 DNS response code = 0
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:1306 (dns_process)> (dns) received rcode = 3
[Nov 14 10:31:11.914] Server {0x7f41b3c7d700} DEBUG: <DNS.cc<http://dns.cc>:1328 (dns_process)> (dns) DNS error 3 for [cs2]



On Nov 13, 2017, at 6:16 PM, Velusamy, Gandhimathi <gv...@central.uh.edu>> wrote:

Hi,

I am trying to distribute the load balancing between servers connected with three proxies.

In my setup, I have three proxy servers and each of them have two origin servers and one client.
I would like to balance the load across servers connected with other proxies when the rate of incoming requests are more.
To begin, I started with round robin policy.
First I tried to add the proxy2 and proxy 2 as one of the origin servers in remap config as below:

map http://UHLB<http://uhlb/> http://UHLB<http://uhlb/> @plugin=balancer.so @pparam=--policy=roundrobin @pparam=192.168.20.2 @pparam=192.168.30.2 @pparam=192.168.40.2 @pparam=192.168.50.2
The last two IP addresses are proxy 2 and proxy3.
But It did not work.
I read about parent proxying. But in my case, I want to load balance. May I please know to configure to achieve load balancing across hierarchical proxies.

Thanks
Gandhimathi

<PastedGraphic-1.tiff>