Content delivery network (CDN)¶
E2E CDN is a fast content delivery network (CDN) service that securely delivers data, and static contents to customers globally with low latency, high transfer speeds.
The idea of a CDN is essentially to have multiple edges in different locations of the world which caches all the static content so that it can be delivered from the customers closest location. We intend to integrate CDN such that people hosting applications through us can use CDNs to improve their static asset delivery.
How to Create a CDN¶
Logging into E2E Networks MyAccount¶
Please go to My Account and log in using your credentials set up at the time of creating and activating the E2E Networks My Account.
Creation of CDN¶
- Click on the “Create CDN” button. You will be redirected to the “Setup CDN” page.
- Here, you need to specify the ‘Origin Domain Name’, ‘Origin Path’, and ‘Origin ID’.
- Origin Domain Name: Enter the “Origin Domain Name”. For example, xyz.abc.com / abc.com.
It is the DNS domain name of HTTP Server or E2E Object storage bucket from which your static content gets delivered. For example, xyz.abc.com / abc.com. The files in your origin must be publicly readable. E2E CDN will contact this origin for the content requested by the user if not found on CDN edge server cache.
- Origin Path: Enter the “Origin Path” beginning with /. For example, xyz.com/static. Do not include / at the end of the directory name.
It is the path of the folder or directory from where the content should be delivered. CDN appends the directory name to the value of Origin Domain Name when forwarding the request to the origin. If the content from this directory fails which, CDN will give a “Not Found” response to the user.
- Origin ID: Enter a description for the “Origin Path”. This value lets you distinguish multiple origins in the same distribution from one another. The description for each origin must be unique within the distribution.
- After specifying the above value, click on the ‘Create distribution’ button. You will automatically redirect to the “CDN Services” page and a confirmation message will appear on screen.
After creation of CDN distribution, it will take upto 30 minutes to deploy the configuration changes on the CDN Edge servers.
- When State is ‘InProgress’ and status is ‘Disabled’.
This signifies that the configuration changes deploy is In-progress on the CDN Edge servers and the CDN is inactive, the requests will not be served through the CDN Edge network.
- When State is ‘Deployed’ and status is ‘Enabled’.
This signifies that the configuration changes deployed on the CDN Edge servers and the CDN is active, the requests will be served through the CDN Edge network.
Manage/Update a CDN settings¶
There are basically 4 types of settings that user can change for any CDN:
The ‘Origin Path’, and ‘Origin ID’ details specified at the time of CDN creation.
- To update Origin path, select the CDN and click on the “edit” button beside the Origin Path field under the Basic Settings tab.
- Update the value with the desired one. Click on the “Tick” icon to confirm the modification.
Origin settings defines how CDN is going to communicate with the Origin server for any content or resource.
- SSL Protocol: Defines the minimum protocol when CDN communicates with Origin. To update, select desired value from the drop down besides “SSL Protocol”. The allowed protocol versions are “TLSv1”, “TLSv1.1” or “TLSv1.2”.
- Protocol Policy: Defines whether CDN will communicate with the origin using HTTP only, HTTPS only or to forward the protocol used by the end user. To update, select desired value from the drop down besides “Protocol Policy”.
- Response Timeout: Defines the amount of time that CDN waits for a response from Origin Server. The valid values are from 4 to 60 seconds. To update, click on the “edit” button corresponding to Response Timeout.
- KeepAlive Timeout: Defines the amount of time that CDN maintains an idle connection with the Origin Server before closing the connection. The valid values are from 1 to 60 seconds. To update, click on the “Tick” icon to confirm the modification
Cache settings define how the content will be delivered from the CDN Edge Servers to the user.
- Viewer Protocol Policy: Defines whether users will be able to access the content with HTTP or HTTPS protocol. To update, select desired value from the drop down corresponding to “Viewer Protocol Policy”. The allowed protocol versions are “HTTPS only”, “HTTP only” or “Redirect HTTP to HTTPS”.
- Allowed HTTP Methods: Defines the list of HTTP methods that you want to allow to be cached. To update, select desired value from the drop down corresponding to “Allowed HTTP Methods”.
- Minimum TTL: Defines the minimum time for which content will remain cached in edge server caches before CDN will request the updated content again from the origin server. To update, click on the “Tick” icon to confirm the modification.
- Maximum TTL: Defines the maximum time for which content will remain cached in edge server caches before CDN will request the updated content again from the origin server. To update, click on the “Tick” icon to confirm the modification.
- Default TTL: Defines the default time for which content will remain cached in edge server caches before CDN will request the updated content again from the origin server. To update, click on the “Tick” icon to confirm the modification.
Domain settings define how the response will be served from the domain for which CDN was enabled.
- Supported HTTP Versions: Defines whether CDN should accept the HTTP 2.0 requests from the users with HTTP 1.0. To update, select desired value from the drop down corresponding to Supported HTTP Versions.
- Root Object: Defines the resource that CDN will return when the user requests your root URL. To update, click on the “Tick” icon to confirm the modification.
The ‘Usage Details’ report provides information about your usage of E2E CDN This report will be having usage for the last 5 days.
Enable/Disable the CDN¶
- Click on the “Action” button for the CDN that you want to ‘Enable’/ ‘Disable’.
- The state of the CDN will change to “InProgress” with the desired status.
It takes approximately 30 minutes to deploy the configuration changes to all the CDN Edge servers. Once the changes are completed, the state of CDN changes to “Deployed”.
Deleting a CDN¶
- Click on the “Action” button for the CDN that you want to delete and select “Delete icon” from the drop down.
To delete the CDN, your CDN should be in “Deployed” state with “Disabled” status. Else, you will not be able to delete the CDN on any other state and status.
- Click on the “Delete” button in the confirmation popup.