[squid-users] Originserver load balancing and health checks in Squid reverse proxy mode
Amos Jeffries
squid3 at treenet.co.nz
Wed Feb 10 00:25:30 UTC 2021
On 10/02/21 9:59 am, Alex Rousskov wrote:
> On 2/9/21 11:35 AM, Chris wrote:
>> This is what I'm seeing in peer_select in cache_log with 44,3 debug
>> options:
>
> Add (at least) "15,3" to your debug_options and then look for
> getWeightedRoundRobinParent lines. Looking at mgr:server_list Cache
> Manager page may also be useful.
>
>
>> Does the weighted-round-robin need some time to use those rtt values?
>
> I am not 100% sure, but I think the answer to that question is "no".
>
Well, only the time it takes to find out what the RTT actually is. As
soon as RTT is known it is used.
This algorithm works like round-robin in that each selection cycle the
peer with fewest "uses" gets selected. However, where normal round-robin
adds "(1 * weight) uses" to a peer each time it gets selected, this
algorithm adds "(RTT * weight) uses".
The debug lines Alex mentioned will tell you what weighted_rtt your
proxy is using as its RTT count per use. If that shows "1", then the RTT
is too small to calculate speed difference (math code improvements
needed to cope with modern fast networks).
Amos
More information about the squid-users
mailing list