On Thu, Feb 02, 2012 at 01:44:57PM +0100, Baptiste wrote:
> Hi,
> 
> There is no way to do this.
> Even using stick tables, since only entries from a table are
> synchronized and not counters associated to each of them.

given that instances get equal load there is no need for any state table
as long as algorith is identical (the same applies to consistent
hashing, you don't need to sync anything to get identical results as
long as urls and backend ids are identical).

in this specific scenario this should be sufficient:

  use_backend app_50_percent if srv_is_up(cluster/other_haproxy)
  use_backend app_100_percent unless srv_is_up(cluster/other_haproxy)

  backend cluster
  server other_haproxy 1.2.3.4:80 check

  backend app_50_percent
  default-server maxconn 24

  backend app_100_percent
  default-server maxconn 48

a bit of hassle in configuration, though doable if you use configuration
management software and templates... but if you do context swithing
between almost gross of backends it came became a litle mess.

the "clean way" to do that would be:

  throttle_backend 50% if srv_is_up(cluster/other_haproxy)
  default_backend just_an_app

throttle is already in for slowstart, so it's just metter of correct
calculations when we trottle both from slowstart (local throttle) and
acl (super throttle).

anybody interested in incorporating it, possibly for a small fee?

-- 
 konrad rzentarzewski - Senior SA, Artegence sp. z o.o.
 Office: +48.223801313  NOC: +48.222010500  ARTE42-RIPE
 Ten mail nie stanowi pisma i zamówienia handlowego wg.
 Kodeksu spółek handlowych (Dz.U. 2000 nr 94 poz. 1037)

<legal_blurb>
Spółka wpisana do rejestru przedsiębiorców prowadzonego przez Sąd Rejonowy
dla m.st. Warszawy Wydział XIII Gospodarczy Krajowego Rejestru Sądowego pod
numerem KRS 0000066610
NIP: 521-30-18-541
wysokość kapitału zakładowego: 51 500,00 PLN
</legal_blurb>

Reply via email to