0

I am noticing a large discrepancy between TTFB in my browser networking tool and the HAProxy logs. HAProxy will say the request returned in 29 ms for example, but the browser reports anywhere from 50-600ms. I'm noticing this when traffic is the heaviest. The HAProxy server has 8 cores and 1gb networking connection on bare metal so I do not think its a limitation of the machine, but instead tuning that I can't figure out how to sort.

For example here is a line from the HAProxy Log (option httplog)

Jan 14 01:51:06 localhost haproxy[258127]: 555.555.555.555:59310 [14/Jan/2022:01:51:06.900] https-www~ ngt/api_srv_3 0/0/0/29/29 200 645 - - ---- 316/316/3/3/0 0/0 "GET [URL] HTTP/1.1" 

The TTFB in Chrome and Brave shows anywhere from 50-600ms. 50ms makes sense but 600ms does not. Is there something I am overlooking for the discrepency? The times it corresponds to 600ms tends to coincide with busier times of the day, but the HAProxy log will still show 29ms for example.

Thank you in advance

1
  • 1
    There is network between haproxy and a browser and it has its own latency. Commented Jan 14, 2022 at 7:14

1 Answer 1

1

TTFB in a browser and Tr in HAProxy logs are different metrics. TTFB in a browser includes the time required to perform DNS resolution, time for the request to travel from the browser to the HAProxy and time for the first packet of the HAProxy response to travel from the HAProxy to the browser.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.