300ms+ longer response times through Cloudflare vs Heroku

For the past few days, I’ve been seeing significantly slower response times going through Cloudflare vs hitting Heroku directly. Based on 20hrs of Pingdom checks they’re currently showing an avg of 823ms hitting my domain through CF and an avg of 489ms hitting appname.herokuapp.com directly to the same app/dyno/endpoint. This is for a Rails app hitting an API call with a 619 byte JSON response, CF proxy enabled (orange cloud), and SSL full(strict) with CF cert set up on Heroku.

This app was running on Digital Ocean for almost 2yrs prior with the same endpoint going through CF proxy and I never saw issues like this. So it seems to be something specific to the combination of Heroku and Cloudflare. This seems to be supported and I’ve talked to a couple of friends that have done this same setup in the past with no response time issues.

Any ideas what might be wrong?

1 Like

When you test which Cloudflare location are you being served by and which Heroku availability zone (is that their term?) is the request hitting?

Also if you run a traceroute from your location where you see the issue to Cloudflare and direct to your Heroku origin and share that, that can also help understand more about the network paths involved.

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.