edge_​load_​balancing_​data_​center

Version: v2025-01-13Includes use: No

Behavior name: Edge Load Balancing: Data Center

The Edge Load Balancing module allows you to specify groups of data centers that implement load balancing, session persistence, and real-time dynamic failover. Enabling ELB routes requests contextually based on location, device, or network, along with optional rules you specify.

This behavior specifies details about a data center and needs to be paired in the same rule with an edge_load_balancing_origin behavior, which specifies its origin. An origin is an abstraction that helps group a logical set of a website or application. It potentially includes information about many data centers and cloud providers, as well as many end points or IP addresses for each data center. More than one data center can thus refer to the same origin.

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" "edge_load_balancing_data_center" {
  rules_v2025_02_18 {
    name     = "Edge Load Balancing: Data Center"
    comments = "Specifies details about a data center."
    behavior {
      edge_load_balancing_data_center {
        origin_id       = ""
        description     = ""
        hostname        = ""
        cookie_name     = ""
        enable_failover = false
      }
    }
  }
}
"behaviors": [
  {
  "name": "edgeLoadBalancingDataCenter",
  "options": {
    "originId": "",
    "description": "",
    "hostname": "",
    "cookieName": "",
    "enableFailover": false
    }
  }
]

Options

Option Description
origin_id
Corresponds to the id specified by the edge_load_balancing_origin behavior associated with this data center.
description
Provides a description for the ELB data center, for your own reference.
hostname
Specifies the data center's hostname.
cookie_name
If using session persistence, this specifies the value of the cookie named in the corresponding edge_load_balancing_origin behavior's cookie_name option.
enable_failover
Allows you to specify failover rules.
ip
Specifies this data center's IP address.
failover_rules
Provides up to four failover rules to apply in the specified order. Contains:
  • failover_hostname. The hostname of the data center to fail over to.
  • modify_request. Allows you to modify the request's hostname or path.
  • override_hostname. Overrides the request's hostname with the failover_hostname.
    Requires: modify_request is true
  • context_root. Specifies the path to use in the forwarding request, typically the root (/) when failing over to a different data center, or a full path such as /static/error.html when failing over to an error page.
    Requires: modify_request is true
  • absolute_path. When enabled, interprets the path specified by context_root as an absolute server path, for example to reference a site-down page. Otherwise when disabled, the path is appended to the request.
    Requires: modify_request is true