Welcome to Centmin Mod Community
Register Now

CDN Decreasing Time to First Byte (CDN)

Discussion in 'Domains, DNS, Email & SSL Certificates' started by RB1, Jan 26, 2017.

Tags:
  1. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    8:34 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    I posted this in Off Topic because it's not necessarily about Centminmod.

    My question is how you reduce the time to first byte. I'm currently testing out three different CDNs (Rackspace, Cloudfront, and KeyCDN). The website is 100% static and only contains one HTML file and one CSS file so it's all on the CDN. All three fail webpagetest.org with a First Byte Time between 0.928s and 1.172s.

    What I still don't understand is how I can get a lower time to first byte on the same website hosted on a VPS without a CDN. Keep in mind that my server is in the southern US and I'm testing in Europe/South America/Australia. Two static files on a CDN can't outperform a VPS thousands of miles away?

    I'm not discrediting Centminmod because the optimization is awesome, I just don't understand...there's latency/distance involved with a single server which should be minimal with nearby CDN POPs!?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:34 PM
    Nginx 1.13.x
    MariaDB 5.5
  3. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    8:34 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    Even initial render time is mostly slower.
    Data captured from: WebPagetest - Website Performance and Optimization Test

    CDN comparison Buenos Aires, Argentina:
    Rackspace: +287ms (32% increase)
    KeyCDN: +587ms (65% increase)
    Cloudfront: -119ms (13% decrease)
    Cloudflare: -522ms (58% decrease)

    CDN comparison Australia:
    Rackspace: +499ms (57% increase)
    KeyCDN: +986ms (112% increase)
    Cloudfront: -201ms (23% decrease)
    Cloudflare: -500ms (57% decrease)

    CDN comparison Singapore:
    Rackspace: +800ms (74% increase)
    KeyCDN: +592ms (55% increase)
    Cloudfront: +100ms (9% increase)
    Cloudflare: -307ms (28% decrease)

    CDN comparison Frankfurt, Germany:
    Rackspace: +796ms (117% increase)
    KeyCDN: -101ms (15% decrease)
    Cloudfront: +95ms (14% increase)
    Cloudflare: -302ms (44% decrease)

    Doesn't seem like enough data, but from these four tests Cloudfront looks to be just slightly better in terms of initial render time. Maybe I should just stick with Cloudfront and forget about benchmarking every little thing. Seems like Amazon has a good them going for them with Cloudfront + Route 53 (which I have yet to try out).

    Edit: Cloudflare might be a better option
     
    Last edited: Jan 27, 2017
  4. BamaStangGuy

    BamaStangGuy Active Member

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    10:34 PM
    What happens if you put it behind CloudFlare without any other cdn.
     
    • Like Like x 1
  5. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    8:34 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    Just added Cloudflare stats
    Maybe Cloudflare is the way to go!
     
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    yeah Cloudflare has improved alot due to number of CDN edge locations they have now!
     
    • Like Like x 1
  7. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    8:34 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    I still don't know how they offer all this for free compared to the other CDNs :)
    I know some specific features might be missing, but still...
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    2:34 PM
    Nginx 1.13.x
    MariaDB 5.5
    well it helps if they managed to get $182 million in funding to get started https://www.crunchbase.com/organization/cloudflare :)
     
    • Winner Winner x 1
  9. BamaStangGuy

    BamaStangGuy Active Member

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    10:34 PM
    When we move to OVH we will be upgrading to CloudFlare business and using Railgun. Looking forward to see the improvements with that.
     
    • Like Like x 2
  10. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    8:34 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    I wish they had account wide plans. I own about 15 domains I would like to have on Cloudflare but I can't see paying for each of them individually.
     
    • Agree Agree x 2
  11. BamaStangGuy

    BamaStangGuy Active Member

    475
    137
    43
    May 25, 2014
    Ratings:
    +181
    Local Time:
    10:34 PM
    Luckily we were grandfathered into their $5 plan.
     
    • Like Like x 2