1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

doc

Edge Caching

Speed up the delivery by keeping your content cached at the edge of the network, closer to your users.

Edge Caching is a standard module for all of your edge applications at Azion. This product reduces the latency and has a high transfer rate through Azion’s highly distributed global network.

  1. How it works
  2. Cache Settings
  3. Browser Cache Settings
  4. CDN Cache Settings
  5. L2 Caching
  6. Slice Settings
  7. HTTP method cache
  8. Stale Cache
  9. Advanced Cache Key

1. How it works

Edge Caching is a standard feature available for all Edge Applications on Azion, ensuring performance and low latency. It’s comprised of a reverse proxy architecture, through which your users connect to the Edge Nodes of our highly distributed global network. Edge Caching can cache your content and further extend its versatility with the L2 Caching add-on.

When a user requests content on the internet, their browser or application initiates the DNS resolution process in order to translate the requested domain into an IP address. When using Azion, you point your web application’s DNS to an address generated when creating a Domain on Azion.

Azion selects the Edge Node closest to the user by using its Software-Defined Networking (SDN) Router, reducing latency and increasing the speed of content transfer.

In this architecture, a web application or its content needs to be made available from a source, which can be:

  • One or more servers in your infrastructure.
  • A cloud service.
  • A cloud storage of your choice.

2. Cache Settings

It’s the service responsible for creating cache configurations, containing several features that expand the way content is delivered.

Cache Settings works with two versions:

  1. The first version focuses on static content. Thus, you don’t need to have the Application Acceleration service enabled.
  2. The second version, which employs Application Acceleration, extends numerous configuration options in the Cache Settings interface.

To create or edit a Cache Settings configuration, proceed as follows:

  1. Access Real-Time Manager (RTM).
  2. On the upper-left corner of the page, select Products Menu > Edge Application.
  3. Click the Add Application button to create a new Edge Application, or select an existing one in the list to edit it.
  4. Select the Cache Settings tab.
  5. Edit or create a Cache Settings configuration.
  6. Click the Save button to save the configuration.

3. Browser Cache Settings

The Browser Cache Settings configures the amount of time that content is cached in the web browser. You can set the Edge Application to:

Honor Origin Cache Headers Override Cache Settings No cache
This feature honors the cache definitions sent by your origin servers through HTTP headers (Cache-Control and Expires), sending the same headers to the web browser. This feature overrides the cache of your origin server by setting the TTL (Time to Live) manually. This feature sends the browser a no-cache instruction, indicating that the response must be validated with the origin servers before every use.

4. CDN Cache Settings

CDN Cache Settings is the amount of time Azion’s Edge Applications take to cache the content. You can set the Edge Application to:

Honor Origin Cache Headers Override Cache Settings
This feature honors the cache definitions sent by your origin servers through HTTP headers (Cache-Control and Expires), sending the same headers to the web browser. This feature overrides the cache of your origin server by setting the TTL manually.

5. L2 Caching

L2 Caching is an additional layer of caching between Azion’s edge and its origin that helps to further reduce the load on your infrastructure.

When accessing your applications on Azion, your user accesses our highly distributed network capable of edge caching. By enabling L2 Caching in your edge applications, you have a second cache layer that will be responsible for feeding the edge, keeping your content cached for as long as you determine it.

When using L2 Caching as an additional layer of caching, it’s necessary to include a configuration per region, for example: sa-brazil for Brazil, na-united-states for USA etc., depending on the region.

L2 Caching was specially designed for objects that can remain in cache for a long period of time. Thus, you can only activate it on cache policies with a TTL equal to or greater than 3 seconds, with the default TTL equal to 60 seconds.

Whenever necessary, you can use Real-Time Purge to expire your L2 Caching content before the expected TTL time. Remember to purge first in L2 and only later in Edge Caching. This avoids edge feedback with outdated L2 content.

Warning: it’s not possible to use the Honor Origin setting for CDN Cache. You need to set a TTL to overwrite the CDN cache.

To use the L2 Caching module, proceed as follows:

  1. Access Real-Time Manager (RTM).
  2. Select Products Menu > Edge Application.
  3. Select the Edge Application in which you want to use the module.
  4. Select the Main Settings tab, if it’s not already selected.
  5. At the end of the Edge Application Modules section, enable the L2 Caching switch.

    Note: The L2 Caching switch will only be available if the service is activated. To activate it, contact our Sales Team.

  6. Select the Cache Settings tab.
  7. To manage the L2 Caching layer settings, click the Add Cache Settings button to create a new cache settings, or select one of the existing ones from the Cache Settings List to edit it.
  8. Set the Default TTL (seconds) field to a value greater than or equal to 3 seconds.
  9. Enable the L2 Caching button.
  10. Click the Save button to save your configuration.

6. Slice Settings

Slice is a feature for Edge Applications that processes large amounts of data more effectively, reducing latency and saving bandwidth.

When enabling this functionality, files could be fragmented. Such fragments are gradually delivered to the end user according to data consumption, avoiding an abrupt data transfer that could be interrupted by the user. The Slice functionality caches data on demand at the moment the user requests it, initiating the cache operation.

Note: when activating the Slice functionality, the current cache key will be ignored and a new one will be created.

This feature works with a default slice-range of 1024kB. If you want to modify the slice-range, contact our Sales Team.

Tip: initially, the Slice functionality works with the Edge Caching layer, but it’s not restricted to it. In the Slice Settings section, it’s also possible to activate the slicing on the L2 Caching layer marking the L2 checkbox, provided that L2 Caching is already activated.

To enable the Slice Settings feature, follow these steps:

  1. Access Real-Time Manager (RTM).
  2. On the upper-left corner of the page, select Products Menu > Edge Application. The Edge Applications page appears with a list containing existing applications.
  3. In the table, select an Edge Application or create a new application.
  4. Select the Cache Settings tab. The Cache Settings List section shows a table containing the cache settings.
  5. Select the Cache Setting you want to enable Slice Settings.
  6. In the Slice Settings section, enable the Slice Configuration switch. By default, the Edge Caching setting will be automatically selected.
  7. If you have the L2 Caching module, check the L2 Caching checkbox to enable this option.

    Note: if you don’t have the module, the L2 Caching checkbox won’t be visible in the Slice Settings section. To enable the L2 Caching, contact our Sales Team.


7. Caching HTTP Methods

By default, Azion only caches GET and HEAD requests. To enable the OPTIONS method, you must activate the Cache Options button within your Edge Application settings in RTM.

The HTTP cache stores a response linked to a request and reuses it for subsequent requests.

You can enable the Enable caching for POST switch, allowing Azion to cache POST requests; the Enable caching for OPTIONS key allows Azion to cache OPTIONS requests. These two cache options imply using the request body as part of the cache key.

To enable the Cache OPTIONS or the Cache POST feature, you must have the Application Acceleration product activated.


8. Stale Cache

When your application’s cache passes its expiration date, it becomes stale (obsolete) and the server searches the source for the most up-to-date version. This new version, with an updated expiration date, overwrites the old one (stale).

However, the server may encounter problems and be unable to get the most up-to-date version of your application from the origin. In such cases, it delivers the latest version of it, even though it has expired. This behavior is known as Stale Cache.

Stale Cache is a standard configuration of the Edge Caching module. However, if your Edge Application needs, you can turn it off.

Attention: It is important to remember that when disabling Stale Cache, if the server is unable to update the cache from the origin, it’ll return an error to the user, interrupting the session.

9. Advanced Cache Key

You can use Azion to deliver your dynamic or static content. Even the dynamic part of a website can often be cached for a user profile, grouped according to the specific needs of your application, either city, browsing profile, or shopping profile.

If you want your dynamic content to be cached on Azion’s Edge Nodes, you can define advanced cache key rules based on Cookies or Query String.

As a standard, Azion considers each URL as a different object in cache. Through the Advanced Cache Key setting, you can set up a custom cache key rule based on Cookies or Query String and thereby define the segmentation of your content in your application.

To activate this feature, follow these steps:

  1. Access Real-Time Manager.
  2. In the upper-left corner of the page, select Products Menu > Edge Application.
  3. Select the Edge Application of the table in which you want to use the module.
  4. On the Cache Settings tab, add or edit a custom cache setting.
  5. In the Advanced Cache Key section, define your custom configuration of Cache by Query String and Cache by Cookie.

Cache by Query String

At Azion, you define how you want the content to be cached according to variations of Query String in your URLs:

  • Content doesn’t vary by Query String (Improves Caching): defines that the cache key must ignore the Query String. That is, two URLs that are different just by the variation of the Query String will be considered as the same cached object. For example, http://yourdomain.com/path?queryA and http://yourdomain.com/path?queryB will deliver the same cache content to your users.

  • Content varies by some Query String fields (Whitelist): you can list which Query String fields should be considered to differentiate between objects in the Azion cache. All other fields will be ignored. For example, if you list the field city, the URLs http://seudominio.com/path?cidade=A&nome=X and http://yourdomain.com/path?cidade=A&nome=Y will be considered as a single object in cache, while URLs http://yourdomain.com/path?cidade=A&nome=X and http://yourdomain.com/path?cidade=B&nome=X will be considered as different objects.

  • Content varies by Query String, except for some fields (Blocklist): you can list which fields in the Query String should be ignored when differentiating cached objects. All other fields will be considered. For example, if you list the field random, the URLs http://yourdomain.com/path?cidade=A&random=123 and http://yourdomain.com/path?cidade=B&random=123 will be considered different object in cache, while http://yourdomain.com/path?cidade=A&random=123 and http://yourdomain.com/path?cidade=A&random=456 will be considered as the same object in cache.

  • Content varies by all Query String fields: defines that the cache key must consider all fields of the Query String. That is, two URLs distinct by the variation of the Query String will be considered as two distinct objects in the cache. For example, http://yourdomain.com/path?queryA and http://yourdomain.com/path?queryB will be stored as separate objects in the Azion cache.

Tip: to increase the efficiency of cashing, you can enable the Query String Sort feature. If activated, it orders all the fields of the query string, making the position of the fields irrelevant in the definition of the cache key. If the position of the fields is relevant to differentiate your content, you should leave the functionality disabled.

Note: by default, Azion will only cache GET and HEAD requests. By checking the Enable caching for POST option, you allow Azion to also cache POST requests. POST request caching entails using the request body as part of the cache key.

You can also distinguish objects in the Azion cache by name/value of cookies.

Content doesn’t vary by Cookies (Improves Caching): doesn’t take cookies into account. That is, it considers only the URL to differentiate objects in Azion’s cache.

Content varies by some Cookies (Allowed Rules): you can list the name of the cookies that your application uses to differentiate cached objects. All other cookies will be ignored, allowing you to segment your content by user profiles and other settings. This is the most recommended option if you use cookies to manage user sessions.

Content varies by Cookies, with the exception of a few (Blocklist): you can list the name of the cookies you want to ignore in the cache key setting, considering all cookies except those listed.

Content varies by all Cookies: in addition to the URL, it considers all cookies to differentiate objects in Azion’s cache.

Tip: use this feature to segment your content by user profile, browsing session, access region, or according to your content targeting needs.

Adaptive Delivery

The Adaptive Delivery functionality detects the user’s device group and allows you to configure how Azion Content Delivery should store your content. This functionality requires the Adaptive Delivery product.

  • Content doesn’t vary by Device Groups (Improves Caching): choose this option to deliver the same version of the content, regardless of device detection.

  • Content varies by some Device Groups (Allowed rules): choose this option so that Azion keeps device-based variations of its objects in the cache.

Note: click the Save button to save your settings.


Didn’t find what you were looking for? Open a support ticket.