Hi James, Thanks for your reply. I would like to write my own plugin for load balancing and as a first step towards my goal, thought of understanding how the balancer plugin works. Any pointers for developing load balancing plugins are welcome.
I have changed the urls of origin servers to hostnames by giving only px205 and py205. But I am getting " 400 Multi hop-cycle detected" error as below: root@px207:~# wget http://px206.perk:80/ --2016-03-10 14:06:53-- http://px206.perk/ Resolving px206.perk (px206.perk)... 10.0.101.6 Connecting to px206.perk (px206.perk)|10.0.101.6|:80... connected. HTTP request sent, awaiting response... 400 Multi-Hop Cycle Detected 2016-03-10 14:06:54 ERROR 400: Multi-Hop Cycle Detected. The error-log also shows the Multi hop-cycle detection error. I have tried as told in https://issues.apache.org/jira/browse/TS-2298 by disabling proxy.config.http.insert_request_via_str but still I am getting the same error. After some trials I am getting: 20160310.14h30m24s RESPONSE: sent 10.0.101.6 status 502 (Server Hangup) for 'http://px206.perk/' Any suggestions are appreciated. Thanks Gandhimathi -----Original Message----- From: James Peach [mailto:[email protected]] Sent: Thursday, March 10, 2016 10:23 AM To: [email protected] Subject: Re: Unable to use Balancer plugin > On Mar 9, 2016, at 11:44 AM, Velusamy, Gandhimathi <[email protected]> > wrote: > > Hi, > I started using Traffic server recently for my graduate research. I want to > use balancer plugin for my experiment. That sounds great. A word of caution, the balancer is very simple, it might not be suitable for your experiment :) > I configured traffic server with configure enable-experimental plugin option. > I could see balance.so, hash.so and roundrobin.so files under > /usr/local/libexec/trafficserver/ folder. > I have set “proxy.config.plugin.plugin_dir” to the above folder. > My remap.config contains: > map http://px206.perk http://px206.perk \ > @plugin=balancer.so @pparam=--policy=roundrobin, url > @pparam=http://px205.perk:80 @pparam=http://py205.perk:80 The targets for the balancer plugin are hostnames or IP addreses not URLs. You should be able to verify what is happening in Traffic Server error logs or by using the "http_hdr" diagnostic tags, but I'd bet it ends up trying to send the request to a host named "http". > I tested with hash policy too. I am getting connection refused error as below: > > root@px207:~# wget http://px206.perk:80/ > --2016-03-09 13:35:43-- http://px206.perk/ Resolving px206.perk > (px206.perk)... 10.0.101.6 Connecting to px206.perk > (px206.perk)|10.0.101.6|:80... connected. > HTTP request sent, awaiting response... Read error (Connection reset by peer) > in headers. > Retrying. > --2016-03-09 13:36:42-- (try: 2) http://px206.perk/ Connecting to > px206.perk (px206.perk)|10.0.101.6|:80... failed: Connection refused. > Resolving px206.perk (px206.perk)... 10.0.101.6 Connecting to > px206.perk (px206.perk)|10.0.101.6|:80... failed: Connection refused. > root@px207:~# > > My client is px207.perk. Proxy is running from px206.perk and I want to load > balance between px205.perk and py205.perk. > On both px205 and py205 apache2 is running. I am just trying to get > index.html file. > > When I tested with reverse proxy configuration it worked for me for both > origin servers. > Am I missing something here. Kindly help me. > > Thanks > Gandhimathi
