Content delivery network (CDN)
Introduction
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 customer’s closest location. We intend to integrate CDN such that people hosting applications through us can use CDNs to improve their static asset delivery.
With E2E’s CDN, you can take the initial steps to speed up the delivery of your static content (for example images, JavaScripts, Style Sheets, and many others). With E2E CDN, you can guarantee your viewers a fast, reliable, and safe experience across the globe. To create CDN with E2E, please follow the following steps:
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
After the request is approved, you can proceed with the CDN creation process.
Click on the “Create CDN” button then form will be open and you have to enter details after that click on Create Distribution button.
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 the 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 the 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, 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. Currently, you can add only a single origin for a distribution.
SSL Certificate:
Default SSL Certificate (*.e2enetworks.net) Choose this option if you want your users to use HTTPS or HTTP to access your content with the E2E Networks domain name (such as https://example.cdn.e2enetworks.net/logo.jpg) Important: if you choose this option, it requires that browsers or devices support TLSv1 or later to access your content.
Custom Certificate (example.com) Choose this option if you want your users to access your content by using an alternate domain name, such as https://www.example.com/logo.jpg.
If you want to use a custom certificate then you need to specify the CNAMEs separated with commas or put each on a new line.
Note
Origin Domain and Alternate Domain Names(CNAMEs)(if any provided) should have the same domain names. All the Alternate Domain Names(CNAMEs) on the CDN should be covered by the Subject Alternative Name (SAN) of the certificate.
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 the screen.
Note
After the creation of CDN distribution, it will take up to 30 minutes to deploy the configuration changes on the CDN Edge servers.
When the 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.
Note
Origin Domain and Alternate Domain Names(CNAMEs)(if any provided) should have the same domain names. All the Alternate Domain Names(CNAMEs) on the CDN should be covered by the Subject Alternative Name (SAN) of the certificate.
Manage/Update CDN settings
There are 5 types of settings that a user can check and update for any CDN:
Basic Details
In the Basic detail tab, you will get to the general information about your CDN which are the default settings and you specify during the creation/updation of the CDN. Click on the Edit button to update the basic setting of your distribution.
Distribution ID: When you perform an action on a distribution using the E2E API, you use the distribution ID to specify which distribution to use, for example, EJYJR0EOUM6MD. You can’t change a distribution’s distribution ID.
Distribution Domain URL: When you create a distribution, E2E CDN returns a domain name for the distribution. You can change a distribution’s domain URL by changing the SSL certificate. If a default SSL certificate used then a distribution’s domain URL with generated, d111111abcdef8.cdn.e2enetworks.net
You can use the e2e networks domain name for your files, the URL for a file called /images/image.jpg is: https://d111111abcdef8.cdn.e2enetworks.net/images/image.jpg
Distribution Status: The possible state values for distribution are listed below
Disabled - The distribution is disabled when the changes have not yet fully propagated to edge servers.
Enabled - The distribution is enabled when the changes have been fully propagated to edge servers.
Distribution State: The possible state values for distribution are listed below.
InProgress - The distribution is still being created or updated, and the changes have not yet fully propagated to edge servers.
Deployed - The distribution has been created or updated and the changes have been fully propagated to edge servers.
SSL Certificate:
Default SSL Certificate (*.e2enetworks.net) Choose this option if you want your users to use HTTPS or HTTP to access your content with the E2E Networks domain name (such as https://example.cdn.e2enetworks.net/logo.jpg) Important: if you choose this option, it requires that browsers or devices support TLSv1 or later to access your content.
Custom Certificate (example.com) Choose this option if you want your users to access your content by using an alternate domain name, such as https://www.example.com/logo.jpg.
If you want to use a custom certificate then you need to specify the CNAMEs separated with commas or put each on a new line.
Note
Origin Domain and Alternate Domain Names(CNAMEs)(if any provided) should have the same domain names. All the Alternate Domain Names(CNAMEs) on the CDN should be covered by the Subject Alternative Name (SAN) of the certificate.
Supported HTTP Versions: Choose the HTTP versions that you want your distribution to support when viewers communicate with the content distribution network. For viewers and CDN to use HTTP/2, viewers must support TLS 1.2 or later, and must support Server Name Identification (SNI).
In general, configuring CloudFront to communicate with viewers using HTTP/2 reduces latency. You can improve performance by optimizing for HTTP/2. For more information, do an internet search for “http/2 optimization.”
Security Policy: The security policy is used for HTTPS connections with viewers (clients), and it depends upon the SSL Certificate which is by default E2E Networks Certificate (*.e2enetworks.net) is currently used. Thus, the TLSv1.2 security policy automatically sets for your CDN.
Root object: The object that you want E2E CDN to request from your origin (for example, index.html) when a viewer requests the root URL of your distribution (http://www.example.com/) instead of an object in your distribution (http://www.example.com/product-description.html). Specifying a default root object avoids exposing the contents of your distribution. The maximum length of the name is 255 characters. The name can contain any of the following characters:
A-Z, a-z
0-9
_ - . * $ / ~ ” ‘
&, passed and returned as &
When you specify the default root object, enter only the object name, for example, index.html. Do not add a / before the object name. This is optional and you can edit the root object value anytime.
Modified on (IST): The date and time that the distribution was last modified.
Created on (IST): The date and time that the distribution was created.
Origin Detail
When you create or update a distribution, you provide information about one location—known as origins—where you store the original versions of your web content. E2E CDN gets your web content from your origins and serves it to viewers via a network of edge servers. Each origin is either a storage bucket or an HTTP server, for example, a web server.
You would not be allowed to delete an origin and currently, the single-origin can be used to create E2E CDN distribution. When you create or update a distribution, you specify the following values for the origin. Click on Edit button to update the origin setting of your distribution.
Origin Domain Name: The DNS domain name of the EOS S3 bucket or HTTP server from which you want E2E CDN to get objects for this origin. You can’t change the domain name. This is not an editable value.
Origin Path: If you want E2E CDN to request your content from a directory in your E2E resource or your custom origin, enter the directory path, beginning with a slash (/). E2E CDN appends the directory path to the value of Origin Domain Name, for example, cf-origin.example.com/production/images. Do not add a slash (/) at the end of the path. For example, suppose you’ve specified the following values for your distribution:
Origin Domain Name – domain name (CNAMEs) – test.com Or EOS bucket - bucket2.objectstore.e2enetworks.net
Origin Path – /directory
Origin ID - bucket2.objectstore.e2enetworks.net/directory
When a user enters test.com/index.html. in a browser, E2E CDN sends a request to the EOS storage bucket for mybucket/production/index.html.
When a user enters example.com/acme/index.html in a browser, CDN sends a request to EOS storage bucker for bucket2.objectstore.e2enetworks.net/directory/index.html.
Origin ID: A string that uniquely distinguishes this origin or origin group in this distribution. Currently, you can add only a single origin for a distribution.
Origin SSL Protocol: Choose the minimum TLS/SSL protocol that CloudFront can use when it establishes an HTTPS connection to your origin. Lower TLS protocols are less secure, so we recommend that you choose the latest TLS protocol that your origin supports. The allowed protocol versions are “TLSv1”, “TLSv1.1” or “TLSv1.2”.
Origin Protocol Policy: The protocol policy that you want CDN to use when fetching objects from your origin server. Choose one of the following values:
HTTP Only: CDN uses the only HTTP to access the origin.
HTTPS Only: CDN uses only HTTPS to access the origin.
Match Viewer: CDN communicates with your origin using HTTP or HTTPS, depending on the protocol of the viewer request. CDN caches the object only once even if viewers make requests using both HTTP and HTTPS protocols.
Important
For HTTPS viewer requests that CDN forwards to this origin, your origin server must match the domain name that you specify for Origin Domain Name. Otherwise, CDN responds to the viewer requests with an HTTP status code 502 (Bad Gateway) instead of returning the requested object.
Origin Response Timeout: The origin response timeout, also known as the origin read timeout or origin request timeout, applies to both of the following values:
How long (in seconds) CDN waits for a response after forwarding a request to the origin.
How long (in seconds) CDN waits after receiving a packet of a response from the origin and before receiving the next packet.
The default timeout is 30 seconds. You can change the value to be from 1 to 60 seconds.
Tip
If you want to increase the timeout value because viewers are experiencing HTTP 504 status code errors, consider exploring other ways to eliminate those errors before changing the timeout value.
Origin KeepAlive Timeout: How long (in seconds) CDN tries to maintain a connection to your origin after it gets the last packet of a response. Maintaining a persistent connection saves the time that is required to re-establish the TCP connection and perform another TLS handshake for subsequent requests. Increasing the keep-alive timeout helps improve the request-per-connection metric for distributions. The default timeout is 5 seconds. You can change the value to a number from 1 to 60 seconds.
Note
For the Origin Keep-alive Timeout value to have an effect, your origin must be configured to allow persistent connections.
Cache Behaviour
When you create a new distribution, the settings of the cache behavior is the default setup, which automatically forwards all requests to the origin that you specify when you create the distribution. After you create a distribution, you can update cache behaviors that define how CDN responds when it receives a request for objects. Currently, you are not allowed to add more cache behavior for your distribution network. Click on Edit button to update the cache behaviour of your distribution.
Viewer Protocol Policy: Choose the protocol policy that you want viewers to use to access your content in CDN edge locations:
HTTP and HTTPS: Viewers can use both protocols.
Redirect HTTP to HTTPS: Viewers can use both protocols, but HTTP requests are automatically redirected to HTTPS requests.
HTTPS Only: Viewers can only access your content if they’re using HTTPS.
Allowed HTTP Methods: Specify the HTTP methods that you want CDN to process and forward to your origin:
GET, HEAD: You can use CDN only to get objects from your origin or to get object headers.
GET, HEAD, OPTIONS: You can use CDN only to get objects from your origin, get object headers, or retrieve a list of the options that your origin server supports.
GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE: You can use CDN to get, add, update, and delete objects, and to get object headers.
Minimum TTL: Specify the minimum amount of time, in seconds, that you want objects to stay in CDN caches before CDN forwards another request to your origin to determine whether the object has been updated. The value that you specify for Maximum TTL applies only when your origin adds HTTP headers. The default value for Minimum TTL is 0 seconds.
Maximum TTL: Specify the maximum amount of time, in seconds, that you want objects to stay in CDN caches before CDN queries your origin to see whether the object has been updated. The default value for Maximum TTL is 31536000 seconds (one year).
Default TTL: Specify the default amount of time, in seconds, that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify for Default TTL applies only when your origin does not add HTTP headers. The default value for Default TTL is 86400 seconds (one day).
Invalidations
If you need to remove a file from CDN edge caches before it expires, you can do one of the following:
Invalidate the file from edge caches. The next time a viewer requests the file, CDN returns to the origin to fetch the latest version of the file.
To invalidate files click on the ‘Flush Cache’ button, you can specify either the path for individual files or a path that ends with the * wildcard, which might apply to one file or many, as shown in the following examples:
/images/image1.jpg
/images/image*
/images/*
Bandwidth Usage
You can view data about requests that CDN received and served by selected distribution in the last 5 days, but data can occasionally be delayed by as much as 24 hours.
Go to the Distribution Bandwidth usage page on click the CDN Bandwidth Usage button.
You can view data of any other distribution network that had activity during the specified period and you have not deleted it.
CDN Monitoring
Click on CDN Monitoring button then you need to fill all the parameter as per your requirment then click on Show report button.
CDN Plan
For seeing the CDN Plan you have to click on CDN Plan button and Select your plan after that click on Save and Apply button.
Disable CDN
Click on the “Action” button for the CDN that you want to ‘Disable Distribution’.
The Disable Distribution window will open. Click on the Disable button after reading the information.
The state of the CDN will change to “InProgress”.
Note
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”.
Enable CDN
Click on the “Action” button for the CDN that you want to ‘Enable Distribution’.
The Enable Distribution window will open. Click on the Enable button after reading the information.
The state of the CDN will change to “InProgress”.
Note
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 click on the “Delete” from the drop-down.
Note
To delete the CDN, your CDN should be in the “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.
A confirmation message will appear on the screen.