application_​load_​balancer

Version: v2025-01-13Includes use: No

Behavior name: Application Load Balancer Cloudlet

Enables the Application Load Balancer Cloudlet, which automates load balancing based on configurable criteria. To configure this behavior, use either the Cloudlets Policy Manager or the Cloudlets API to set up a policy.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "application_load_balancer" {
  rules_v2025_02_18 {
    name     = "Application Load Balancer Cloudlet"
    comments = "Enables the Application Load Balancer Cloudlet"
    behavior {
      application_load_balancer {
        enabled = true
        cloudlet_policy = ""
        label = ""
        stickiness_cookie_type = "ON_BROWSER_CLOSE"
        specify_stickiness_cookie_domain = false
        stickiness_cookie_automatic_salt = true
        stickiness_cookie_set_http_only_flag = true
        all_down_net_storage = ""
        all_down_net_storage_file = ""
        all_down_status_code = ""
        failover_status_codes = [
          "500",
          "501",
          "502",
          "503",
          "504",
          "505",
          "506",
          "507",
          "508",
          "509"
        ]
        failover_mode = "AUTOMATIC"
        failover_attempts_threshold = 5
        allow_cache_prefresh = true
      }
    }
  }
}
"behaviors": [
  {
    "name": "applicationLoadBalancer",
    "options": {
      "enabled": true,
      "cloudletPolicy": "",
      "label": "",
      "stickinessCookieType": "ON_BROWSER_CLOSE",
      "specifyStickinessCookieDomain": false,
      "stickinessCookieAutomaticSalt": true,
      "stickinessCookieSetHttpOnlyFlag": true,
      "allDownNetStorage": "",
      "allDownNetStorageFile": "",
      "allDownStatusCode": "",
      "failoverStatusCodes": [
        "500",
        "501",
        "502",
        "503",
        "504",
        "505",
        "506",
        "507",
        "508",
        "509"
      ],
      "failoverMode": "AUTOMATIC",
      "failoverAttemptsThreshold": 5,
      "allowCachePrefresh": true
    }
  }
]

Options

Option Description
enabled
Activates the Application Load Balancer Cloudlet.
cloudlet_policy
Identifies the Cloudlet policy. Contains:
  • id. The cloudlet policy's ID.
  • name. The cloudlet policy's name.
label
A label to distinguish this Application Load Balancer policy from any others within the same property.
stickiness_cookie_type
Determines how a cookie persistently associates the client with a load-balanced origin. Value is one of:
  • NONE. Dynamically reassigns different load-balanced origins for each request.
  • NEVER. Preserves the cookie indefinitely.
  • ON_BROWSER_CLOSE. Limit the cookie duration to browser sessions.
  • FIXED_DATE. Specify a specific time for when the cookie expires.
  • DURATION. Specify a delay for when the cookie expires
  • ORIGIN_SESSION. Limit the cookie duration to when the ORIGIN_SESSION terminates. After the cookie expires, the cookie type re-evaluates.
stickiness_expiration_date
Specifies when the cookie expires.
stickiness_duration
Sets how long it is before the cookie expires.
stickiness_refresh
Extends the duration of the cookie with each new request. When enabled, the DURATION thus specifies the latency between requests that would cause the cookie to expire.
origin_cookie_name
Specifies the name for your session cookie.
specify_stickiness_cookie_domain
Specifies whether to use a cookie domain with the stickiness cookie, to tell the browser to which domain to send the cookie.
stickiness_cookie_domain
Specifies the domain to track the stickiness cookie.
stickiness_cookie_automatic_salt
Sets whether to assign a salt value automatically to the cookie to prevent manipulation by the user. You should not enable this if sharing the population cookie across more than one property.
stickiness_cookie_salt
Specifies the stickiness cookie's salt value. Use this option to share the cookie across many properties.
stickiness_cookie_set_http_only_flag
Ensures the cookie is transmitted only over HTTP.
all_down_net_storage
Specifies a NetStorage account for a static maintenance page as a fallback when no origins are available. Contains:
  • cp_code. The CP code ID.
  • download_domain_name. The domain name from which content can be downloaded.
  • g2o_token. The Signature Header Authentication key.
all_down_net_storage_file
Specifies the fallback maintenance page's filename, expressed as a full path from the root of the NetStorage server.
all_down_status_code
Specifies the HTTP response code when all load-balancing origins are unavailable.
failover_status_codes
Specifies a set of HTTP status codes that signal a failure on the origin, in which case the cookie that binds the client to that origin is invalidated and the client is rerouted to another available origin.
failover_mode
Determines what to do if an origin fails. Value is one of:
  • AUTOMATIC. Automatically determines which origin in the policy to try next.
  • MANUAL. You define a sequence of failover origins. (If failover runs out of origins, requests are sent to NetStorage.)
  • DISABLED. Turns off failover, but maintains origin stickiness even when the origin goes down.
failover_origin_map
Specifies a fixed set of failover mapping rules. Contains:
  • from_origin_id. Specifies the origin whose failure triggers the mapping rule.
  • to_origin_ids. Requests stuck to the `fromOriginId` origin retry for each alternate origin `toOriginIds`, until one succeeds.
failover_attempts_threshold
Sets the number of failed requests that would trigger the failover process.
allow_cache_prefresh
Allows the cache to prefresh. Only appropriate if all origins serve the same content for the same URL.