Hi Folks,
I’m seeing quite a slow TTFB with our site hosted on Render (using the Docker runtime):
› curl -I -o /dev/null -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' https://whatsfinished.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
Establish Connection: 0.283034s
TTFB: 1.701468s
Total: 1.701554s
Compare that with say, Google:
› curl -I -o /dev/null -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' https://google.com
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 220 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Establish Connection: 0.088311s
TTFB: 0.397731s
Total: 0.397840s
The processing in the Rails app is taking ~4-5ms consistently (just rendering a very simple static template). I know it’s not a massive deal, but you never know how many impatient internet people you’ll lose in those ~2seconds
Is there anything I can do to speed this up? I’m guessing this represents time in the Render router? Or maybe it’s a geographical difference (I’m in New Zealand) - although wouldn’t Cloudflare alleviate that somewhat?
Thanks in advance!
Nik