Discover Centmin Mod today
Register Now

WebPerf Real World Results - Caching Anonymous Pages w/ CloudFlare

Discussion in 'All Internet & Web Performance News' started by BamaStangGuy, Mar 24, 2017.

  1. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    2:56 AM
    So I spent a few hours tonight playing with CloudFlare's API have these two rules:

    Screen Shot 2017-03-24 at 6.17.04 AM.png
    Screen Shot 2017-03-24 at 6.17.12 AM.png

    We are using this add-on for the cookie: Logged In Cookie

    and I am using the CloudFlare Api + a cron running every minute (right now, may lengthen it at some point).


    The results?

    Screen Shot 2017-03-24 at 6.14.23 AM.png

    :D :D :D :D :D

    So now, for one minute, CloudFlare is serving our home page and our /forums/ page from their Edge servers all over the world while members are still getting real time fresh reloads.

    From here, I am going to look into integrating the API directly into XenForo so that I can start caching all thread pages except the last for page.

    Lots of fun ahead :D
     
    Last edited: Mar 24, 2017
  2. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    2:56 AM
    Last edited: Mar 24, 2017
  3. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    2:56 AM
    Something seems wrong with your image proxy here. Shows up if I go to edit the post.
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    5:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice but what's difference between those 2 displayed rules, they seem to be the same page rule ?
    Yeah some imgurl hostnames have problems with image proxy when it's setup through $config['untrustedHttpClient'] defined HTTP proxy while other imgurl hostnames are fine!

    Probably easier to just paste cropped screenshots as attachments :)
     
  5. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    2:56 AM
    Accidentally added one twice. Fixed.

    Also, now have these caching for 30 minutes for guests:

    Screen Shot 2017-03-24 at 6.56.27 AM.png
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    5:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice.. thanks for sharing and another site/tool to check out now too Byte Check - Check Your Time To First Byte though the result is only relative to their server location and yours as latency matters for TTFB and their servers seem to be hosted in New York so US East coast. And yours is in OVH CA so latency wise much closer :)

    upload_2017-3-25_0-10-2.png

    best page load tester is still WebPagetest - Website Performance and Optimization Test :)

    Example webpagetest dulles cable results for your forums https://www.webpagetest.org/result/170324_T0_3M3Z/
     
    Last edited: Mar 25, 2017
  7. BamaStangGuy

    BamaStangGuy Active Member

    668
    192
    43
    May 25, 2014
    Ratings:
    +272
    Local Time:
    2:56 AM
    The imgur screenshot above is to Australia. We have quite a few members on CF that post from there so I have been working to get page loads down for especially that area.
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    5:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI Webpagetest.org AWS EC2 test servers always seem to be overloaded so test slower in some locations, so test multiple geographic locations to be sure as well.
     
  9. deltahf

    deltahf Premium Member Premium Member

    587
    265
    63
    Jun 8, 2014
    Ratings:
    +489
    Local Time:
    3:56 AM
    Wow, I didn't know we could check cookies with Page Rules now. That does indeed change everything!

    Might have to reconsider CloudFlare now...
     
  10. rdan

    rdan Well-Known Member

    5,447
    1,408
    113
    May 25, 2014
    Ratings:
    +2,201
    Local Time:
    3:56 PM
    Mainline
    10.2
    Cloudflare Business Plan only.