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 2016/08/12 04:36:40 UTC

delay based load balancing using Traffic server as a reverse proxy

Hi,

   I am working for my graduate thesis on load balancer. I am trying to implement delay based load balancing with Traffic server as a reverse proxy.
I am using balancer.cc and writing my functionality there. I am using  a map to store Sate Machine ids and delays computed between transaction start and transaction close events.
 
But I could not find any difference between round robin method and my delayed based policy even though my four origin servers are having different CPU and memory configurations.  I am guessing that the computation of comparing delays by accessing from maps causes more delay. I would like to contribute my implementation to Traffic server community once I finish my thesis. 

Any pointers on how to proceed or where to look will be appreciated. Also is there any tool available to load test. Current I used "ab" and "RUBiS"

Thanks
Gandhimathi
 


RE: delay based load balancing using Traffic server as a reverse proxy

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

The round robin policy sends requests to origin servers irrespective of the processing capacity of the servers or delay in responding to the requests.

I am trying to measure delay by each server for every request at the end of transaction close and send the next request to the server which gives the minimum delay. I am just trying greedy method as my first step and  based on that thought of developing other algorithms such that considering number of connections etc.  

First I measured the delay by recording time at the transaction start event and at transaction close event matched by smids. Then I realized that I could use TSHttpTxnMilestoneGet(txn, TS_MILESTONE_UA_BEGIN, &start_time) and TSHttpTxnMilestoneGet(txn, TS_MILESTONE_UA_CLOSE, &end_time) functions and changed my code.

As I am new to internals of traffic server, I am afraid that my code should not cause delay.

The origin servers are having different memory and CPU cores. The latency from all the servers to traffic server are same. 

Of course as you told the origin servers are not given different loads; that may be the reason for the uniformity. I will try to induce different loads on them  and let you know how it works.

Thanks
Gandhimathi






________________________________________
From: Sudheer Vinukonda [sudheervinukonda@yahoo.com]
Sent: Tuesday, August 16, 2016 11:46 AM
To: users@trafficserver.apache.org
Subject: Re: delay based load balancing using Traffic server as a reverse proxy

> On Aug 11, 2016, at 9:36 PM, Velusamy, Gandhimathi <gv...@Central.UH.EDU> wrote:
>
> Hi,
>
>   I am working for my graduate thesis on load balancer. I am trying to implement delay based load balancing with Traffic server as a reverse proxy.
> I am using balancer.cc and writing my functionality there. I am using  a map to store Sate Machine ids and delays computed between transaction start and transaction close events.
>
> But I could not find any difference between round robin method and my delayed based policy even though my four origin servers are having different CPU and memory configurations.

Can you provide more details, for example, What specific metric(s) are you using to compare between your implementation and the round robin? It'd be interesting to check the response times/latencies from your Origin servers if they are indeed different enough to change the routing distribution. If you are not putting enough load on them, it's possible that they are all responding with identical latencies thus making your implementation behave similar to a simple round robin.

> I am guessing that the computation of comparing delays by accessing from maps causes more delay.

This seems unlikely and would be very surprising if it's the case.


> I would like to contribute my implementation to Traffic server community once I finish my thesis.
>
> Any pointers on how to proceed or where to look will be appreciated. Also is there any tool available to load test. Current I used "ab" and "RUBiS"
>
> Thanks
> Gandhimathi
>
>


Re: delay based load balancing using Traffic server as a reverse proxy

Posted by Sudheer Vinukonda <su...@yahoo.com>.

> On Aug 11, 2016, at 9:36 PM, Velusamy, Gandhimathi <gv...@Central.UH.EDU> wrote:
> 
> Hi,
> 
>   I am working for my graduate thesis on load balancer. I am trying to implement delay based load balancing with Traffic server as a reverse proxy.
> I am using balancer.cc and writing my functionality there. I am using  a map to store Sate Machine ids and delays computed between transaction start and transaction close events.
> 
> But I could not find any difference between round robin method and my delayed based policy even though my four origin servers are having different CPU and memory configurations.  

Can you provide more details, for example, What specific metric(s) are you using to compare between your implementation and the round robin? It'd be interesting to check the response times/latencies from your Origin servers if they are indeed different enough to change the routing distribution. If you are not putting enough load on them, it's possible that they are all responding with identical latencies thus making your implementation behave similar to a simple round robin.

> I am guessing that the computation of comparing delays by accessing from maps causes more delay.

This seems unlikely and would be very surprising if it's the case.


> I would like to contribute my implementation to Traffic server community once I finish my thesis. 
> 
> Any pointers on how to proceed or where to look will be appreciated. Also is there any tool available to load test. Current I used "ab" and "RUBiS"
> 
> Thanks
> Gandhimathi
> 
> 


RE: delay based load balancing using Traffic server as a reverse proxy

Posted by "Velusamy, Gandhimathi" <gv...@Central.UH.EDU>.
Hi Bryan Call,

   Thanks for the information.

-Gandhimathi
________________________________________
From: Bryan Call [bcall@apache.org]
Sent: Monday, August 15, 2016 8:51 AM
To: users@trafficserver.apache.org
Subject: Re: delay based load balancing using Traffic server as a reverse proxy

Most of the time round robin will work well.  There are some traffic patterns (few heavy weight requests) or hardware imbalances that don’t do well with round robin.

The way to open source it would be to file a Jira ticket (https://issues.apache.org/jira/browse/TS) and then create a pull request on github (https://github.com/apache/trafficserver).

I use ab and depending on the work load http_load (https://github.com/apache/trafficserver/tree/master/tools/http_load) to do benchmarking.

-Bryan









Re: delay based load balancing using Traffic server as a reverse proxy

Posted by Bryan Call <bc...@apache.org>.
Most of the time round robin will work well.  There are some traffic patterns (few heavy weight requests) or hardware imbalances that don’t do well with round robin.

The way to open source it would be to file a Jira ticket (https://issues.apache.org/jira/browse/TS <https://issues.apache.org/jira/browse/TS>) and then create a pull request on github (https://github.com/apache/trafficserver <https://github.com/apache/trafficserver>).

I use ab and depending on the work load http_load (https://github.com/apache/trafficserver/tree/master/tools/http_load <https://github.com/apache/trafficserver/tree/master/tools/http_load>) to do benchmarking.

-Bryan




> On Aug 11, 2016, at 10:36 PM, Velusamy, Gandhimathi <gv...@Central.UH.EDU> wrote:
> 
> Hi,
> 
>   I am working for my graduate thesis on load balancer. I am trying to implement delay based load balancing with Traffic server as a reverse proxy.
> I am using balancer.cc and writing my functionality there. I am using  a map to store Sate Machine ids and delays computed between transaction start and transaction close events.
> 
> But I could not find any difference between round robin method and my delayed based policy even though my four origin servers are having different CPU and memory configurations.  I am guessing that the computation of comparing delays by accessing from maps causes more delay. I would like to contribute my implementation to Traffic server community once I finish my thesis. 
> 
> Any pointers on how to proceed or where to look will be appreciated. Also is there any tool available to load test. Current I used "ab" and "RUBiS"
> 
> Thanks
> Gandhimathi
> 
>