The ADN platform provides the means through which the delivery of the customer’s dynamic content can be accelerated through a variety of methods. These methods are optimized network paths, protocol communications, and server efficiency. The focus of these optimizations is to improve the communication between the customer origin server and the customer’s clients. It does not address inefficiencies with the actual content being delivered to the customer’s clients.
The CDN’s Edge Optimizer feature is powered by Google PageSpeed and addresses this by leveraging the CDN’s edge servers to modify the dynamic web pages being delivered to the customer’s clients. The most common performance benefits that these modifications can achieve are to decrease the amount of data that needs to be transferred and the number of assets required to properly load the customer’s web page. This allows the customer to improve data delivery efficiency without requiring modification to his source code. The following illustration indicates how a website can be streamlined through Edge Optimizer.
On this picture you can see that Edge Optimizer decreases the number of objects requested by over half. It also decreases the total amount of data that must be transferred to clients by almost two-thirds. As a result, clients should experience a significant decrease in web page load times.
Edge Optimizer allows the customer to determine which content will be optimized through two separate mechanisms. The first mechanism requires that the customer associates the configuration that can be used to optimize his site with an edge CNAME. The second mechanism allows the customer to leverage HTTP Rules Engine to define which requests will be processed by Edge Optimizer. Requests that are made to the specified edge CNAME and that meet the match requirements defined in a rule will undergo optimization on an edge server. See as the process through which a client's request is processed by Edge Optimizer at the picture below.
Edge Optimizer processing can consist of any of the following:
- - Filters: A filter defines how requests will be optimized. A filter can target inefficiencies in HTML code, JavaScript code, CSS, images, or even an asset's cache policy.
- - Domain Rewriting: The hostname found in href and/or src attributes can be rewritten to a different hostname. One use for this feature is to quickly leverage the power of ADN and Edge Optimizer without having to modify the original source code. Another use for this feature is to perform domain sharding and increase the number of parallel requests that a web browser can perform.
An Edge Optimizer configuration consists of three parts, which are:
- - Site Setup;
- - Site Activation;
- - Enabling Edge Optimizer.
Site Setup
Edge Optimizer introduces the concept of sites. Each site contains a set of optimization settings and it identifies the edge CNAME on which they will be applied.
Sites
A site defines how the customer’s website will be processed by our edge servers. A typical configuration involves the following items:
- - Associating an edge CNAME to a site. Requests to the selected edge CNAME will undergo optimization by our edge servers.
- - Defining a set of authorized domains for the site. Only content stored on those domains are eligible for processing by Edge Optimizer.
- - Selecting a template that defines the default filter configuration that can be associated with the customer’s site.
- - Customizing the base set of filters assigned to the customer’s site by the Template option.
- - Defining whether the URLs for linked content will be rewritten to point to a different hostname. The two main reasons for rewriting URLs is to either quickly deploy ADN onto a new website or to improve website performance through domain sharding.
- - Indicating whether a site will be eligible for optimization through the Active option. This option determines whether the site will be available for selection in HTTP Rules Engine's Edge Optimizer.
Edge CNAME
An edge CNAME provides a friendly hostname (e.g., adn.mydomain.com) that points to a CDN domain (e.g., adn.0001.edgecastcdn.net). A site allows the customer to define the Edge Optimization configuration that will be performed for requests to a specific edge CNAME. This allows the customer to customize the type of optimizations that will be performed on each website that is accelerated by ADN.
Filters
Our edge servers can apply filters to all requests that are directed to a particular edge CNAME. These filters have been categorized according to the type of optimization that will be performed.
HTML Rewriters
This type of filter modifies HTML code to reduce bytes transferred and the number of assets that need to be requested.
CSS Rewriters
This type of filter modifies inline and referenced CSS to reduce bytes transferred and the number of assets that need to be requested.
Javascript Rewriters
This type of filter modifies inline and referenced JavaScript to reduce bytes transferred and the number of assets that need to be requested.
Image Rewriters
This type of filter transforms images and the HTML code used to reference them.
Cacheability
This type of filter modifies HTML code to increase the cache policy assigned to referenced content.
Common optimization techniques that can be automatically performed through our filters are:
Cache Optimization
Eliminates a client's subsequent requests for the customer’s application's data and logic by improving content cacheability. It is able to do this by extending a client's cache policy to reduce the round-trip-time required to load a web page.
Round-Trip Times Minimization
A web browser loads a web page by performing serial requests/responses for each referenced asset. This method reduces the amount of time spent on these request/response cycles by reducing the number of assets that are required to load the customer’s web page.
Request Overhead Minimization
Reduces the amount of header data that a client must send when requesting content.
Payload Size Minimization
Reduces the size of responses, downloads, and cached pages. In other words, it reduces the total amount of data that must be transferred to load a web page.
Browser Rendering Optimization
Reduces the amount of time that a browser spends reflowing a web page.
URL Rewriting
Hostnames referenced in the customer’s HTML code can be automatically rewritten to point to a different hostname. It’s useful to rewrite URLs for:
- - Easily accelerating a new website through ADN. Using URL rewriting to avoid modifying the customer’s source code to point to our ADN servers.
- - Serving static content from cookieless domains to reduce the size of HTTP requests from a user agent (e.g., web browser).
- - Using domain sharding to allow user agents (e.g., browsers) to bypass limitations on the number of simultaneous requests that can be performed to a domain. By splitting up requests over multiple domains, a user agent can simultaneously retrieve additional assets when loading a web page.
The customer must make sure to authorize each hostname that will be rewritten. The set of hostnames that will be rewritten can be identified through the Target Domain option.
Site Activation
Once the customer has created a site configuration, he will need to register it on our servers. This activation process is a safety measure designed to ensure that the customer’s website is only processed by the set of filters that have been vetted by his organization. The activation of a site configuration can be performed through the Edge Optimizer – Instantiate Configuration feature, which can be found on ADN's Rules Engine page. It’s necessary just to create or modify a rule and include this feature.
Enabling Edge Optimizer per Request
The final phase for setting up a site for optimization is to define the requests that will be processed by Edge Optimizer. HTTP Rules Engine provides the Edge Optimizer feature through which the customer can enable or disable Edge Optimizer processing. By default, requests will not be processed by Edge Optimizer. This means that the customer will need to enable the Edge Optimizer feature on the desired types of requests.
Enabling the Edge Optimizer feature can trigger Edge Optimizer processing for a request that meets the following requirements:
- - The request must be made with an edge CNAME URL.
- - The specified edge CNAME must correspond to a site configuration.
- - The site configuration must have been previously activated through HTTP Rules Engine.
Edge Optimizer can also process content embedded in a request that meets the above requirements. Although this embedded content can be located on any server and does not require a site configuration, it still requires that the Edge Optimizer feature be enabled.
In order to ensure optimal data delivery speed, it is very important to enable the Edge Optimizer feature for all traffic served to a user for the customer’s website. If Edge Optimizer is only able to process a portion of the site requested by a user, then this may lead to a suboptimal webpage response.
The Edge Optimizer feature can be added as many times as desired. This allows the customer to enable or disable processing based on different criteria (e.g., country, ASN, etc.).
Metadata Flushing
In order to make the optimization process more efficient, our edge servers store metadata that describe the type of optimizations that were performed on each edge CNAME. Our edge servers use this metadata to speed up the next request for the same content.
This metadata may not be immediately flushed upon changing the Edge Optimizer configuration associated with an edge CNAME. This may cause a situation where content requested from that edge CNAME is still being processed according to an old configuration. In turn, this may generate an undesired response to the customer’s users. In order to avoid this type of situation, it is highly recommended that the customer flush Edge Optimizer metadata whenever he makes changes to his site's configuration.
Flushing the Edge Optimizer metadata associated with an edge CNAME will generate a log entry that indicates the name of the edge CNAME and the date on which the request was submitted. The last 100 requests are displayed on the Meta Data Flush page.
Once the customer has defined the manner in which Edge Optimizer will streamline his web site, it will load empirically faster. This is the customer’s first indication that the experience that his users will enjoy when visiting his web site has been significantly improved. However, it is important to analyze and measure the actual improvement provided by Edge Optimizer.
The first step that must be taken to measure how much improvement has been brought about by Edge Optimizer is to run web site performance tests. Although any web site performance tool can be used to analyze the customer’s site, it’s recommended to use industry standard tool called WebPageTest. This web tool is hosted on a web page and does not require a client installation.
http://www.webpagetest.org/
Upon generating a web performance test, WebPageTest will display a summarized view of the results.
Statistics are reported by First View and Repeat View. These terms mean.
First View
Indicates statistics for the first time that the web page is requested. This data does not account for locally cached content.
Repeat View
Indicates statistics for every subsequent visit to the site.
This data has the following implications:
- It accounts for locally cached content.
- It accounts for Edge Optimizer filters that optimize subsequent requests (e.g., Extend Cache, Local Storage Cache, etc.).
The following table describes several key metrics that the customer should review for both First View and Repeat View.
Start Render
The significance of this metric is that it is the first visual indicator that the page is being successfully loaded.
It indicates the amount of time it takes from when the user requests the web page to when the first non-white content is drawn on the screen.
Document Complete (onload Event) – Time
This is a very important metric, since it reflects the amount of time by which your users will judge your site's performance.
It indicates the amount of time it takes from when the user requests the web page to when the document's onload event takes place. The onload event indicates the moment at which the user should be able to interact with the page.
Document Complete (onload Event) – Requests
This metric should be used to assess the total number of requests made over the network by the user agent (i.e., web browser). These requests could not be honored by the user agent's local cache. Although a typical web page contains several dozen assets, it is important to keep this value low. Each additional request that cannot be handled concurrently usually adds several additional round-trip times (RTT). For more information, please refer to the Waterfall Analysis section.
Document Complete (onload Event) – Bytes In
This metric should be used to measure the number of requested bytes required to reach the onload event. These requests could not be honored by the user agent's local cache. It is important to keep this value low, since requesting more data will result in more RTTs.
Directly below the summary of web performance metrics are waterfalls for both the First View and the Repeat View. These waterfalls provide a visual representation of the time spent loading a web page's resources. As previously indicated, a web page consists of various assets. A waterfall lists each asset that was not cached locally and is required to load a web page. They are listed in the order in which the user agent requested them.
Once the customer hase analyzed and optimized his site, it is time to measure the amount of improvement brought about by Edge Optimizer. The customer will definitely notice a significant improvement in web site performance between the baseline and optimized web site for both First View and Repeat View.