Hi,

On Tue, Oct 29, David Birdsong wrote:
> I've narrowed down a behavior that I think might be a bug, but is
> definitely not ideal.
> 
> This minimal configuration copies header: X-Host into Host and performs a
> dynamic DNS query against that field name, stores the output in a txn var,
> and then uses a backend whic sets the dest ip to that txn var.
> 
> For any requests with an X-Host header that matches a name already tracked
> by DNS in a backend, I see that haproxy spends 4-9 seconds reading the
> request from the client while any X-Host values which are not currently
> tracked by a backend show haproxy spending 1ms reading in the request from
> the client (normal.)
> 
> unnamed, fast: curl -v -H "X-Host: google.com" http://127.0.0.1:8080/foo
> 
> named, very slow:  curl -v -H "X-Host: mixpanel.com"
> http://127.0.0.1:8080/foo
> 
> Config:
> https://gist.github.com/davidbirdsong/1c3ec695fdbab10f64783437ffab901c
> haproxy -vv
> https://gist.github.com/davidbirdsong/d4c1c71e715d8461ad73a4891caca6f1

I tested this on latest 2.1dev3 snapshot. What happens if you add
timeouts to your main_resolver resolvers:
  hold valid           15s

For me increasing hold valid makes be_named requests take even longer
and if I add timeout client(to defaults) < hold valid then (be_named) requests 
fail with:
cR-- status

-Jarno

-- 
Jarno Huuskonen

Reply via email to