How to set the request start time with HAProxy?

Posted by Tupy on Server Fault See other posts from Server Fault or by Tupy
Published on 2012-11-08T22:42:52Z Indexed on 2012/11/09 11:06 UTC
Read the original article Hit count: 287

Filed under:
|

I would like to measure the time of full request stack. The New Relic capture time of the middleware (e.g. java, python, ruby) and request time (See https://newrelic.com/docs/features/tracking-front-end-time). For this, I need to configure the X-Request-Start header as the request pass through the HAProxy load balance. The haproxy.cfg should look like:

backend www
  balance roundrobin
  mode http
reqadd      "X-Request-Start"  UNKNOWN_TIME_FUNCTION()
server servername 192.168.0.1:80 weight 1 check

There is a haproxy native function to replace the UNKNOWN_TIME_FUNCTION()?

© Server Fault or respective owner

Related posts about Performance

Related posts about haproxy