I have enabled "allUsers" with "storage legacy object reader permission". Now how can i find CDN is active or not ? Please help me. Thanks
3 Answers
To use a Google Cloud CDN with Cloud Storage requires an HTTP(S) Load Balancer. To see if you have a CDN configured, look at the configuration for your load balancers. You can also check the Cloud CDN page in the Google Cloud Console:

- 74,467
- 6
- 95
- 159
In addition of @JohnJanley answer, you maybe have been confused by this feature description
Cloud Storage behaves essentially like a Content Delivery Network (CDN) with no work on your part because publicly readable objects are, by default, cached in the Cloud Storage network.
Cloud Storage acts as a CDN, but it's not a CDN and it doesn't use Google CDN. For controlling the cache, you can play with metadata

- 66,369
- 2
- 47
- 76
-
1To be precise, Cloud Storage has a simple caching layer - provided the correct cache headers are set - but does not provide global caching or the reduced Cloud CDN egress rate. – elithrar Dec 23 '19 at 22:22
First setup the base components:
- Create storage bucket
- Create HTTP(S) Load Balancer and tick the CDN checkbox
Next, for each object to be cached:
- Make the object publicly readable
- Set object metadata cache-control headers to include
public
and anmax-age
to store in the cache, for exampleCache-Control:public,max-age=3600
To test if an object was served by the Cloud CDN access the object using your load balancer's hostname and look for the Age:
response header which is added by Cloud CDN:
$ curl -s -D - -o /dev/null http://example.com/style.css
HTTP/1.1 200 OK
Date: Tue, 16 Feb 2016 12:00:30 GMT
Content-Type: text/css
Content-Length: 1977
Cache-Control: max-age=86400,public
Via: 1.1 google
Age: 2

- 2,510
- 2
- 17
- 11