copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-08-02 |
object storage, bucket |
CDN |
{{site.data.keyword.attribute-definition-list}}
{: #configure-cdn-with-ibm-cloud-object-storage}
You can use {{site.data.keyword.cloud}} Content Delivery Network (CDN) to quickly and securely deliver the website assets (images, videos, documents) hosted and served on the IBM Cloud Object Storage to users around the world.
{: #cos-before-you-begin}
Before you begin using CDN with IBM Cloud Object Storage (ICOS), you'll first need to store objects with public access in {{site.data.keyword.cloud_notm}} Object Storage.
{: #create-a-cdn-instance-with-icos}
- Follow the guidelines to create a CDN instance with Object Storage type of origin to configure your S3 Endpoint and Bucket name with public access objects stored in the ICOS.
- Follow the guidelines to get your CDN instance into RUNNING status.
- Access your ICOS objects with CDN URL:
http://<hostname>/<path>/index.html
.
{: #faqs-for-cdn-with-icos} {: faq}
{: #use-objects-stored-in-icos}
No. The CDN edge servers can only access the ICOS public endpoints, so objects in the ICOS buckets should provide public access.
{: #traffic-from-icos-to-cdn-charge}
Yes. The CDN and ICOS don't have a way of measuring each other's traffic, so both traffic from ICOS and CDN are charged.
{: #cdn-edge-server-retrieve-content}
The CDN uses the S3 endpoint to access the ICOS objects, and replaces the path in the url to the bucket name. For example, if your ICOS S3 endpoint s3.us-south.cloud-object-storage.appdomain.cloud
with bucket name xyz-bucket-name
is added in path /example-cos/*
, when you open the CDN URL www.example.com/example-cos/*
, the CDN edge server retrieves the content from s3.us-south.cloud-object-storage.appdomain.cloud/xyz-bucket-name/*
.
{: #using-icos-default-index-with-cdn}
The CDN does not support the default index page for the ICOS objects because the ICOS S3 endpoint does not have the default index. You must specify the complete request path in the browser's address bar (for example, www.example.com/index.html
). If you want the CDN to automatically access the default index page of the ICOS, create a CDN with Server type of origin instead of an Object Storage type. For example, if you have a ICOS with static website hosting endpoint xyz-bucket-name.s3-web.us-south.cloud-object-storage.appdomain.cloud
, you can create a CDN www.example.com
with server type of origin xyz-bucket-name.s3-web.us-south.cloud-object-storage.appdomain.cloud
in path /*
, when a user opens the CDN URL www.example.com
, the CDN edge server retrieves the content from xyz-bucket-name.s3-web.us-south.cloud-object-storage.appdomain.cloud/
, and ICOS will return your default index page.