Hey folks, I’m doing some experiments with stick-table and peers. This is my 
configuration:

h1.cfg .. h9.cfg

global
  localpeer h1 # <<--- changing to h2..h9 on h2.cfg .. h9.cfg
  log stdout format raw local0
listen l
  timeout server 1m
  timeout client 1m
  timeout connect 5s
  log global
  option httplog
  mode http
  bind :28081 # <<--- changing to 28082 to 28089
  stick-table type string size 1 peers p store gpc(1),conn_rate(10s)
  http-request track-sc0 str(1)
  http-request return hdr x-gpc %[sc_inc_gpc(0,0)] hdr x-rate %[sc_conn_rate(0)]
peers p
  bind :29001 # <<--- changing to 29002 to 29009
  log stdout format raw local0
  server h1 # <<--- adding h1 endpoint on others
  server h2 127.0.0.1:29002 # <<--- endpoint removed only on h2
  server h3 127.0.0.1:29003 # <<--- endpoint removed only on h3
  ... until h9 and :29009

Running as `haproxy -f h[1..9].cfg`.

And these are my findings so far:

1. when rotating requests manually between ports 28081 to 28089, I can see:
* on 2.6.22, metrics being shared - gpc updates accordingly, rate seems 
coherent with the speed I send the requests;
* on 3.2.3, it seems like the instances are isolated, when rotating the 
requests, I cannot see the next instance updated based on data coming from the 
former ones.

2. when running parallel calls (via vegeta), some instances receiving 10rps, 
others receiving 15rps, during 60s:
* 2.6.22 seems to receive metrics from one other peer only, like, rate in the 
10s window about 300 and total gpc about 1800 when the test finishes;
* 3.2.3 seems to continue isolated

I’ll continue my tests, but wanted to share some partial results, so you folks 
can share if I’m having some misunderstanding on how peers works or if I’m 
missing some configuration.

--jm



Reply via email to