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

site

doc

blog

success stories

Application Acceleration

Edit on GitHub

This service of accelerating web applications and APIs extends the functionality of the Azion Edge Application product through protocol optimizations and the management of the different dynamic content requirements.

Through Application Acceleration you can configure advanced cache rules by path – which allow granular caching, content segmentation and cache policies based on criteria such as name/value of Cookies and Query Strings – as well as features such as Bypass Cache, Forward Cookies and support for POST/PUT and other HTTP methods.

Get to know how to configure rules per path for the following features:

  1. Advanced Cache Key
  2. Bypass Cache
  3. Forward Cookies
  4. Support for POST/PUT and other methods

1. Advanced Cache Key

You can use Azion to deliver either 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: whether it is by city, browsing profile, or shopping profile.

As a standard, Azion considers each URL as a different object in cache.

Thus, if you want your dynamic content to be cached on Azion’s Edge Nodes, you can configure a custom cache key rule based on Cookies or Query String through the Advanced Cache Key and, this way, set up the segmentation of your content in your application.

To use this feature, follow these steps:

  1. Log into the Real-Time Manager and select Edge Applications on the Products menu.
  2. Add one Edge Application or edit one from your list.
  3. To enable the Application Acceleration module, in the tab Main Settings, select the option Application Acceleration in the section Edge Application Modules.
  4. After enabling the module, click on the Cache Settings tab.
  5. Add a custom cache setting or edit one from your list of Cache Settings.
  6. In the Advanced Cache Key section, define your custom Cache by Query String and Cache by Cookie settings.
  7. In the Rules Engine tab, add or edit a rule from your list in Request Phase to define the behavior for one or more paths.
  8. In the Set Cache Policy behavior, select the custom cache configuration.

Cache by Query String

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

Content does not vary by Query String (Improves Caching): defines that the cache key must ignore the Query String, that is, two distinct URLs just by varying the Query String will be considered as the same cached object, for example http://yourdomain.com/path?queryA e 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 Edge Caching. All other fields will be ignored. For example, if you list the field city, the URLs http://yourdomain.com/path?city=A&name=X and http://yourdomain.com/path?city=A&name=Y will be considered as a single object in cache, while the URLs http://yourdomain.com/path?city=A&name=X and http://yourdomain.com/path?city=B&name=X will be considered as different objects.

Content varies by Query String, except for some fields (Blacklist): you can list which Query String fields to ignore when differentiating cached objects. All other fields will be considered. For example, if you list the field random, the URLs http://yourdomain.com/path?city=A&random=123 and http://yourdomain/path?city=B&random=123 will be considered as a different object in cache, while http://yourdomain/path?city=A&random=123 and http://yourdomain.com/path?city=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 Query String fields, that is, two different URLs by the variation of the Query String will be considered as two different cached objects, for example http://yourdomain.com/path?queryA and http://yourdomain.com/path?queryB will be stored as separate objects in Azion cache.

Furthermore, to increase the cache efficiency, you can enable the Query String Sort feature. By enabling the Query String Sort functionality, all the fields in the query string will be sorted, making the fields position irrelevant to the definition of the cache key. If the field positions are relevant to differentiate your content, you must leave the feature disabled.

Cache by Cookie

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

Content does not vary by Cookies (Improves Caching): defines that cookies will not be taken into account to differentiate objects in Azion cache. Only the URL will be considered for differentiating objects.

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

Content varies by Cookies, with the exception of a few (Blacklist): you can list the name of the cookies you want to ignore in the definition of the cache key and, thus, all cookies will be considered, except the listed ones. Content varies by all Cookies: defines that, in addition to the URL, all cookies must be considered to differentiate objects in Azion cache.

Use this functionality to segment your content by user profile, browsing session, access region or according to your content targeting needs.


2. Bypass Cache

You can also use Azion to deliver your dynamic and personalized content, even when some of your content cannot be cached in Azion’s infrastructure. At Azion, you define cache rules per path. Create a Bypass Cache rule for the paths of your website that cannot be cached in our infrastructure.

To use the functionality, follow these steps:

  1. Log into the Real-Time Manager and select Edge Applications on the Products menu.
  2. Add an Edge Application or edit one from your list.
  3. In the Rules Engine tab, add or edit a rule from your list in Request Phase to define the behavior for one or more paths.
  4. Select the Bypass Cache behavior.

By using the Bypass Cache, you will configure Azion’s service to forward all requests to a path directly to their origin. However, you will count on important protocol optimizations to speed up your application and a keepalive connection between Azion Edge Nodes and their origin, whenever possible.

Difference between Bypass Cache and TTL 0 (zero)

There is a difference in behavior between Bypass Cache and cache with TTL (time-to-live) set to 0 (zero) seconds. Using Bypass Cache, all http and https requests received by Azion Edge Nodes will be sent to their origin, without any content caching. Select the Bypass Cache if you want to deliver distinct content for each user request.

However, for TTL set to 0 (zero) seconds, multiple requests in parallel to Azion Edge Nodes will be sent as a single request to their origin, by Azion’s Edge. Use TTL zero if the content can be delivered identically to all users who order simultaneously, but the content varies from time to time. In addition, when using TTL zero, Azion Edge Nodes will validate changes to the content with its origin by using the If-Modified-Since parameter and, if the object has not changed since the last request, the content will not need to be transferred again, which could result in a much faster 304 Not Modified response.

This difference is important for you to be able to obtain maximum optimization in your content delivery and load reduction at its origin.


3. Forward Cookies

If your origin manages application cookies, you may need the Forward Cookies functionality.

By default, Azion filters the Response Header Set-Cookie sent by its origin. If you wish, you can configure Azion so that the Set-Cookie is passed on to your users.

To use the functionality, follow these steps:

  1. Log into the Real-Time Manager and select Edge Applications on the Products menu.
  2. Add an Edge Application or edit one from your list.
  3. In the Rules Engine tab, add or edit a rule from your list in Request Phase to define the behavior for one or more paths.
  4. Select the Forward Cookies behavior.

By using the Forward Cookies functionality, you are determining that Azion forwards to users the Set-Cookie header received from your origin, even in a cache content situation (cache hit). To prevent a user from receiving another user’s Set-Cookie session, you must list all session cookies (private cookies) for your application in the Cache Settings tab of your Edge Application configuration, in the Advanced Cache Key section, in Cache by Cookie.

JavaScript Cookies

An alternative to sending the Response Header Set-Cookie is to create cookies using the JavaScript language, which allows you to create, read and expire cookies through the document.cookie property.

To create a JavaScript cookie, you must enter name = value and, optionally, expires and path:

document.cookie = “username=John Doe; expires=Thu, 18 Dec 2020 12:00:00 UTC; path=/”;

You will find more information about JavaScript Cookies by clicking here.

By default, Azion will not filter the Request Header Cookie regardless of its Forward Cookies configuration and therefore JavaScript Cookies may be sent to the origin to enable the management of your application.


4. Support for POST/PUT and other methods

You can use Azion to accelerate your web applications and APIs. Through the Application Acceleration you extend the Edge Application functionalities to support the POST, PUT, PATCH, DELETE methods, in addition to those already natively supported GET, HEAD and OPTIONS.

To use the functionality, follow these steps:

  1. Log into the Real-Time Manager and select Edge Applications on the Products menu.
  2. Add an Edge Application or edit one from your list.
  3. In the Main Settings tab, activate the Application Acceleration module.

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