Edge Application first steps

Before using Edge Application, make sure you have:

  • An Azion Console account. You can find more information about how to create your account on the documentation page.
  • An edge application. If you haven’t created an edge application yet, check the build an application page.

See also the guides on how to clone and how to delete an edge application.

Main Settings

To access the main settings and configure your edge application:

  1. Access Azion Console.
  2. On the upper-left corner of the page, open the Products menu, represented by three horizontal lines, and then select Edge Application.
  3. Select the edge application you want to configure.

You’re now in the page to configure the general delivery settings of your application.

Edge Application Modules

Edge Application offers the following modules:

Some Edge Application modules are billed products and it may generate usage-related costs. Check the Edge Application modules pricing for more information.

To enable a module in your edge application:

  1. Access Console.
  2. On the upper-left corner of the page, select Products Menu > Edge Application.
  3. Select the edge application.
  4. In the Main Settings tab, under the Modules section, activate the desired module.
  5. Click the Save button.

Advanced settings

Other than the Main Settings tab, you’ll see several other tabs:

Each tab stores in other configuration options for your edge application.

Configuring Your Backend (Origin) Connection

A backend, also known as an origin, is the server from which Azion retrieves your content. This can include object storage services, cloud servers, or other infrastructure that hosts your application assets or data.

To configure your edge application’s origin you’ll use Edge Connector.

  1. Access Console.
  2. On the upper-left corner of the page, select Products Menu > Edge Connector.
  3. Create an Edge Connector by clicking the + Edge Connector button.
  4. In the field Connector Type, select the desired Connector Type.
  5. Fill in the remaining fields.
  6. Click the Save button.

To activate an Edge Connector:

  1. Access the Rules Engine tab.
  2. Edit the default rule or add a new request phase rule.
  3. In the Criteria section, to apply the origin for your whole application, set the criteria to If ${uri} starts with /.
  4. In the Behavior section, select the Set Edge Connector behavior.
  5. Select the Edge Connector you want to apply.
  6. Click the Save button.

Edge Connector enables you to configure multiple origins and distribute traffic among them by using Load Balancer.

Device Groups

Manage devices using Device Groups:

  1. Access the Device Groups tab.
  2. Click the Add Device Group button.
  3. Name your device group.
  4. Add what contents the User-Agent header should contain in regex format following PCRE standard.
  5. Click the Save button.

To apply Adaptive Delivery to a device group:

  1. Access the Cache Settings tab.
  2. Select the cache setting from the list or add a new one.
  3. In Adaptive Delivery, select the option Content varies by some Device Groups (Whitelist).
  4. Click the + Device Group button.
  5. Select the device group from the list.
  6. Click the Save button.

The ${device_group} variable will also be available in Rules Engine:

  1. In the Main Settings tab of your application, activate the Application Accelerator module.
  2. Access the Rules Engine tab.
  3. Edit the default rule or add a new request rule.
  4. In the Criteria section, select the ${device_group} variable.
  5. Select the comparison operator is equal to and type the name of the device group in the argument field.
  6. Set the desired behavior.
  7. Click the Save button.

Cache Settings

Edit your cache configuration in Cache Settings:

  1. Access the Cache Settings tab.
  2. Click the Add Cache Settings button.
  3. Enter an easy to remember name for your cache setting. For example: /target-uri - Cache TTL.
  4. In the Expiration Settings, you can customize your cache’s TTL as follows:
    • Under Browser Cache Settings, select Override Cache Settings to define how long your content can be cached in browsers.
    • Under CDN Cache Settings, select Override Cache Settings to define how long your content can be cached at the edge.
  5. If you’ve chosen to override cache settings, add the desired Maximum TTL in seconds.
    • At this point, you may also customize other cache settings for dynamic content provided by the Advanced Cache Key feature.
  6. Click the Save button.

Tiered Cache

To use the Tiered Cache module:

  1. In the Main Settings tab, at the end of the Edge Application Modules section, enable the Tiered Cache switch.
  2. Access the Cache Settings tab.
  3. To manage the tiered cache 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.
  4. Set the Default TTL (seconds) field to a value greater than or equal to 3 seconds.
  5. Enable the Tiered Cache switch.
  6. Click the Save button.

Functions

Instantiate your functions using Edge Functions:

  1. In the Main Settings tab, activate the Edge Functions module.
  2. In the Functions tab, click Add function to instantiate the desired function.
  3. Access the Args tab and fill in the required information.
  4. Click the Save button.

To activate a function:

  1. Access the Rules Engine tab.
  2. Add a rule in any of the available phases.
  3. Set the desired criteria.
  4. In the Behavior section, choose the Run Function behavior.
  5. Select the instantiated function from the list.
  6. Click the Save button.

Rules Engine

Create conditional business rules for your application using Rules Engine.

Some variables and behaviors require you to activate the Application Accelerator.

  1. Access the Rules Engine tab.
  2. Click the Add Rule button.
  3. Select either the Request Phase or Response Phase.
  4. Name your rule.
  5. Add an optional description for your rule.
  6. In the Criteria section, you can determine the conditions that will trigger the desired behavior.
  7. In the Behaviors section, define what happens should the criteria be met.
  8. Click the Save button.

Real-Time Purge

To access Real-Time Purge, proceed as follows:

  1. Access Console.
  2. On the upper-left corner of the page, select Products Menu > Real-Time Purge.
  3. Click the New Purge button and fill in the required fields.
  4. Click the Purge button to perform a purge for the chosen options.