0
votes

Our Ruby on Rails website on heroku shows a Waiting (Time to First Byte) in chrome inspector of 1000ms+ on most requests for all pages. Heroku's logs and New Relic both show total response times of under 200ms however. (This includes request Queuing)

The heroku app has two dynos and doesn't go into idle.

What could account for 800ms on average of missing time?

2

2 Answers

0
votes

I believe this discrepancy is due to the time it takes to leave the server vs. the time it takes to be received by the client.

0
votes

I sent a support ticket to heroku support who were great enough to look into it show the latency was occurring before the request arrived at the heroku server. The application makes use of CloudFlare which was contributing to the latency. CloudFlare had a blog write up on this at https://blog.cloudflare.com/ttfb-time-to-first-byte-considered-meaningles/ which goes into full detail.