4 ms·
How were you using CloudFlare? I keep hearing this a lot and just want to make sure the setup is accurate... Most CDNs are used to cache static files (javascri
by manigandham 12y ago
How were you using CloudFlare? I keep hearing this a lot and just want to make sure the setup is accurate...
Most CDNs are used to cache static files (javascript, images, etc) so they download faster but the webpage still loads from the origin server. CloudFlare is different and proxies everything through their servers (that's the only way they can provide the protection and caching benefits). If your origin is close to your location, then it WILL increase latency because a request now has to go through CloudFlare's network, to the origin, then back through CloudFlare and then back to you. It's an extra jump that will add some latency to all page requests that have to go to the origin.
It does help for far away users though because CloudFlare's private network and proxy servers can contact your origin server faster than the end-user making it all the way on their own connection. In either case - near or far - the latency should be minimal and definitely not something that adds seconds to load time.
If your pages don't change much, you can also just cache the HTML itself on the proxy servers which will definitely decrease load time to pretty much instantaneous. POST requests will still go back to the origin through CF's network but the GETs should be fast and the higher-end plans give pretty precise control over how long the caching lasts. (You can also do this with modern CDNs with more control but they don't provide the security benefits and the other apps that are part of CF).
EDIT: By the way, Hacker News uses CloudFlare.