Le 15/10/2012 14:43, Tomasz Sterna a écrit :
Dnia 2012-10-15, pon o godzinie 12:15 +0200, Alexandre Jousset pisze:
But I still don't see a rationale, why local components are better
than
remote ones?
Why does local component should be preferred just because the
connection
happened to come from local c2s?
Going to a remote component involves going through local
router, then through remote router, then remote component. It adds a
hop + a (physical) network access.
That's a technical detail that should not affect the load balancing
algorithm.
If I set two components one with weight 1 and one with weight 2, the
second one should get two times more requests than first one, regardless
where is it connected and where the requests are coming from.
You're right.
I think both behaviors make sense so I agree with you to add a binary
switch in configuration to tell the router whether it should take care of local
/ remote components or not. This would make, for example, the use of a
(separate and protocol agnostic) load balancer in front of the cluster more
efficient. But it's true that in that example the weighted randomization would
be useless. But as it (the binary switch) is easy to implement, letting the
admin choose is better.
--
-- \^/ --
-- -/ O \--------------------------------------- --
-- | |/ \| Alexandre (Midnite) Jousset | --
-- -|___|--------------------------------------- --