Google Cloud CDN Cache Hit Ratio - Confusion

1,247 views
Skip to first unread message

Chandan Kumar

unread,
May 27, 2017, 11:18:50 PM5/27/17
to gce-discussion
Hello,

I've enabled Google Cloud CDN to the backend in HTTP LB but not sure if it's working.  Cache hit ratio shows 0 as you can see below.


How do I ensure Cloud CDN cache is actually working?

David McWherter

unread,
May 28, 2017, 2:07:43 PM5/28/17
to Chandan Kumar, Todd Greer, gce-discussion
+tgreer

--
© 2017 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/cb4a5a86-c5db-4ed9-896a-61dfcb1a1a34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chandan

unread,
Jun 4, 2017, 6:35:52 AM6/4/17
to Todd Greer, gce-discussion, David McWherter, gcache-dev
Hello Todd,

Thanks for the response.

I looked into console again today, and found ratio is 6.3% so looks like it's working. There is no performance related problem, but I was just trying to understand how to prove that Google CDN cache is working.

I see "VIA: 1.1 Google" in the response header. Does it mean caching is working?

    1. Request URL:
    2. Request Method:
      GET
    3. Status Code:
      200 (from disk cache)
    4. Remote Address:
    5. Referrer Policy:
      no-referrer-when-downgrade
  1. Response Headers
    1. access-control-allow-origin:
      *
    2. cache-control:
      public, max-age=315360000
    3. cf-cache-status:
      HIT
    4. cf-ray:
      3696b9cdaad86f90-SIN
    5. content-encoding:
      gzip
    6. content-type:
      text/css
    7. date:
      Sun, 04 Jun 2017 00:20:20 GMT
    8. etag:
      W/"59326769-dfdf"
    9. expires:
      Wed, 02 Jun 2027 00:20:20 GMT
    10. last-modified:
      Sat, 03 Jun 2017 07:38:17 GMT
    11. server:
      cloudflare-nginx
    12. status:
      200
    13. vary:
      Accept-Encoding
    14. via:
      1.1 google
    15. x-content-type-options:
      nosniff

On Wed, May 31, 2017 at 2:22 AM, Todd Greer <tgr...@google.com> wrote:
Hi Chandan,

For the most common issues, see this GCache troubleshooting guide. Likely problems include traffic all coming from internal IPs, and responses not having headers that indicate cacheability. Much of this internal GCache guide and the external docs are also useful. If you give me a URL that should be cached but isn't, I'll take a look. Please include an example request/response pair with full headers.

On Sun, May 28, 2017 at 11:07 AM, David McWherter <ca...@google.com> wrote:
+tgreer

On Sat, May 27, 2017 at 8:18 PM, Chandan Kumar <scorpio...@gmail.com> wrote:
Hello,

I've enabled Google Cloud CDN to the backend in HTTP LB but not sure if it's working.  Cache hit ratio shows 0 as you can see below.


How do I ensure Cloud CDN cache is actually working?

--
© 2017 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.





--


Thanks,
Chandan 
 - Best Is Yet To Come!
Reply all
Reply to author
Forward
0 new messages