Create domain configurations
Increase the response reliability of your site using a global load balancer that routes traffic based on real-time data center performance, health, and global internet conditions.
What you'll do
Create a Global Traffic Management (GTM) domain, datacenter, and property to split or balance your traffic between two or more data centers.
1. Create a domain
Create a new GTM domain and define its type as one of failover-only
, static
, weighted
, basic
, or full
.
resource "akamai_gtm_domain" "my_gtm_domain" {
name = "my-gtm-domain.akadns.net"
type = "weighted"
group = 12345
contract = "C-0N7RAC7"
email_notification_list = ["jsmith@email.com"]
comment = "My new domain"
}
2. Set up a data center
Use your domain to create at least two data centers to which the load balancer directs traffic. Pass the data center's ID downstream when you configure your response behavior.
resource "akamai_gtm_datacenter" "my_datacenter" {
domain = "my-gtm-domain.akadns.net"
nickname = "my_datacenter_1"
}
3. Configure a property
Configure a set of rules in a GTM property that define load balancing response behavior for your site's requests.
Note: This property type is independent of property manager and only configures your GTM settings.
resource "akamai_gtm_property" "my_gtm_property" {
domain = "my-gtm-domain.akadns.net"
name = "my_gtm_property"
type = "weighted-round-robin"
score_aggregation_type = "median"
handout_limit = 5
handout_mode = "normal"
traffic_target {
datacenter_id = 3131
}
}
See also
For more information on additional arguments or attributes for these resources, see the corresponding resource reference.
Updated 6 days ago