GSLB Examples

This section contains examples for GSLB (Global Server Load Balancing), which requires the BIG-IP DNS (formerly GTM) module to be licensed and provisioned.

Configuring global GSLB settings in a declaration

In this example, we show how you can configure global GSLB settings in DO 1.17 and later using the GSLBGlobals class. This class uses the GSLBGlobals_general properties (synchronizationEnabled synchronizationGroupName, synchronizationTimeout, and synchronizationTimeTolerance) to configure GSLB global settings on the BIG-IP.

For more details on the properties and DO usage, see GSLBGlobals and GSLBGlobals_general in the Schema Reference.

For information on BIG-IP DNS, see the DNS/GTM knowledge center for your BIG-IP version.

This example only includes the GSLBGlobals class, which can be used as a part of a larger DO declaration.

{
    "schemaVersion": "1.0.0",
    "class": "Device",
    "async": true,
    "Common": {
        "class": "Tenant",
        "provisioning": {
            "class": "Provision",
            "gtm": "nominal"
        },
        "gslbGlobals": {
            "class": "GSLBGlobals",
            "general": {
                "synchronizationEnabled": true,
                "synchronizationGroupName": "newGroup",
                "synchronizationTimeTolerance": 123,
                "synchronizationTimeout": 1234
            }
        }
    }
}

Configuring a GSLB Data Center

In this example, we show how you can configure a GSLB Data Center in DO 1.18 and later using the GSLBDataCenter class. This allows you to configure GSLB Data Center properties in a Declarative Onboarding declaration.

All of the resources on your network are associated with a data center. BIG-IP DNS consolidates the paths and metrics data collected from the servers, virtual servers, and links in the data center. BIG-IP DNS uses that data to conduct load balancing and route client requests to the best-performing resource based on different factors. For information on BIG-IP DNS, including GSLB Data Centers, see the DNS/GTM knowledge center for your BIG-IP version.

For details on the available properties and DO usage, see GSLBDataCenter in the Schema Reference.

This example only includes the GSLBDataCenter class, which can be used as a part of a larger DO declaration.

{
    "schemaVersion": "1.17.0",
    "class": "Device",
    "async": true,
    "Common": {
        "class": "Tenant",
        "provisioning": {
            "class": "Provision",
            "gtm": "nominal"
        },
        "newDataCenter": {
            "class": "GSLBDataCenter",
            "enabled": true,
            "contact": "dataCenterContact",
            "location": "dataCenterLocation",
            "proberFallback": "outside-datacenter",
            "proberPreferred": "pool",
            "proberPool": "/Common/proberPool"
        }
    }
}

Configuring a GSLB Server

In this example, we show how you can configure a GSLB Server in DO 1.18 and later using the GSLBServer class. This allows you to configure GSLB Server properties in a Declarative Onboarding declaration.

A GSLB Server defines a physical system on the network. Servers contain the virtual servers that are the ultimate destinations of DNS name resolution requests. For information on BIG-IP DNS, including GSLB Servers, see the DNS/GTM knowledge center for your BIG-IP version.

DO 1.19 added support for Prober pools and GSLB virtual servers to GSLB Servers. For information on Prober pools, see Configuring a GSLB prober pool.
For information on GSLB virtual servers, see the Global Server Load Balancing chapter of the documentation. For DO options and usage, see GSLBServer-virtualServers.

For details on the available properties and DO usage, see GSLBServer in the Schema Reference.

Important

Because this example was updated to include a Prober pool and GSLB virtual servers, if you attempt to use the following declaration on a previous version of DO, it will fail. If you are using a version prior to 1.19, you can remove the Prober pool and virtual server lines (in yellow).

{
    "schemaVersion": "1.19.0",
    "class": "Device",
    "Common": {
        "class": "Tenant",
        "gslbDataCenter": {
            "class": "GSLBDataCenter"
        },
        "gslbProberPool": {
            "class": "GSLBProberPool"
        },
        "gslbServer": {
            "class": "GSLBServer",
            "label": "Example of all GSLB server properties",
            "remark": "GSLB server description",
            "devices": [
                {
                    "address": "10.10.10.10",
                    "addressTranslation": "192.0.2.12",
                    "remark": "GSLB server device description"
                }
            ],
            "dataCenter": "/Common/gslbDataCenter",
            "serverType": "generic-host",
            "enabled": false,
            "proberPreferred": "pool",
            "proberFallback": "any-available",
            "proberPool": "/Common/gslbProberPool",
            "bpsLimit": 10,
            "bpsLimitEnabled": true,
            "ppsLimit": 10,
            "ppsLimitEnabled": true,
            "connectionsLimit": 10,
            "connectionsLimitEnabled": true,
            "serviceCheckProbeEnabled": false,
            "pathProbeEnabled": false,
            "snmpProbeEnabled": false,
            "virtualServerDiscoveryMode": "enabled",
            "exposeRouteDomainsEnabled": true,
            "cpuUsageLimit": 10,
            "cpuUsageLimitEnabled": true,
            "memoryLimit": 10,
            "memoryLimitEnabled": true,
            "virtualServers": [
                {
                    "address": "10.0.20.1"
                },
                {
                    "name": "virtualServer",
                    "label": "Example of all GSLB server virtual server properties",
                    "remark": "GSLB server virtual server description",
                    "enabled": false,
                    "address": "a989:1c34:009c:0000:0000:b099:c1c7:8bfe",
                    "port": 8080,
                    "addressTranslation": "1:0:1:0:0:0:0:0",
                    "addressTranslationPort": 80,
                    "monitors": [
                        "/Common/tcp",
                        "/Common/http"
                    ]
                }
            ]
        }
    }
}

Configuring GSLB health monitors

In this example, we show how you can configure a GSLB health monitors in a Declarative Onboarding declaration. Health monitors verify the availability and/or performance status of a particular protocol, service, or application. You can configure HTTP, HTTPS, Gateway-ICMP, TCP, or UDP GSLB health monitors in a declaration.

For information on BIG-IP DNS, including GSLB monitors, see the DNS/GTM knowledge center for your BIG-IP version.

For details on the available properties and DO usage, see GSLBMonitor in the Schema Reference.

Note

GSLB Monitor has a number of built-in monitors, such as http and http_head_f5. You cannot use these names in a declaration or it will fail. These default monitors cannot be deleted.

This example includes each of the available GSLB monitors which you can use as part of a larger Declarative Onboarding declaration. In this declaration, the monitors are all used in the GSLB Server (see the GSLB Server example).

{
    "schemaVersion": "1.19.0",
    "class": "Device",
    "async": true,
    "controls": {
        "traceResponse": true
    },
    "Common": {
        "class": "Tenant",
        "myProvisioning": {
            "class": "Provision",
            "ltm": "nominal",
            "gtm": "nominal"
        },
        "gslbDataCenter": {
            "class": "GSLBDataCenter"
        },
        "gslbServer": {
            "class": "GSLBServer",
            "devices": [
                {
                    "address": "10.10.10.10",
                    "addressTranslation": "192.0.2.12",
                    "remark": "GSLB server device description"
                }
            ],
            "dataCenter": "/Common/gslbDataCenter",
            "monitors": [
                "/Common/gslbMonitorHTTP",
                "/Common/gslbMonitorHTTPS",
                "/Common/gslbMonitorICMP",
                "/Common/gslbMonitorTCP",
                "/Common/gslbMonitorUDP"
            ]
        },
        "gslbMonitorHTTP": {
            "class": "GSLBMonitor",
            "remark": "description",
            "monitorType": "http",
            "target": "1.1.1.1:80",
            "interval": 100,
            "timeout": 1000,
            "probeTimeout": 110,
            "ignoreDownResponseEnabled": true,
            "transparent": true,
            "reverseEnabled": true,
            "send": "HEAD / HTTP/1.0\\r\\n",
            "receive": "HTTP"
        },
        "gslbMonitorHTTPS": {
            "class": "GSLBMonitor",
            "remark": "description",
            "monitorType": "https",
            "target": "2.2.2.2:80",
            "interval": 100,
            "timeout": 1000,
            "probeTimeout": 110,
            "ignoreDownResponseEnabled": true,
            "transparent": true,
            "reverseEnabled": true,
            "send": "HEAD / HTTP/1.0\\r\\n",
            "receive": "HTTP",
            "ciphers": "DEFAULT",
            "clientCertificate": "/Common/default.crt"
        },
        "gslbMonitorICMP": {
            "class": "GSLBMonitor",
            "remark": "description",
            "monitorType": "gateway-icmp",
            "target": "3.3.3.3:80",
            "interval": 100,
            "timeout": 1000,
            "probeTimeout": 110,
            "ignoreDownResponseEnabled": true,
            "transparent": true,
            "probeInterval": 1,
            "probeAttempts": 3
        },
        "gslbMonitorTCP": {
            "class": "GSLBMonitor",
            "remark": "description",
            "monitorType": "tcp",
            "target": "4.4.4.4:80",
            "interval": 100,
            "timeout": 1000,
            "probeTimeout": 110,
            "ignoreDownResponseEnabled": true,
            "transparent": true,
            "reverseEnabled": true,
            "send": "example send",
            "receive": "example receive"
        },
        "gslbMonitorUDP": {
            "class": "GSLBMonitor",
            "remark": "description",
            "monitorType": "udp",
            "target": "5.5.5.5:80",
            "interval": 100,
            "timeout": 1000,
            "probeTimeout": 110,
            "ignoreDownResponseEnabled": true,
            "transparent": true,
            "reverseEnabled": true,
            "send": "default send string",
            "receive": "udp receive",
            "debug": true,
            "probeInterval": 1,
            "probeAttempts": 3
        }
    }
}

Configuring a GSLB prober pool

In this example, we show how you can configure a GSLB prober pool in a Declarative Onboarding declaration. Prober pools contain specific BIG-IP devices that probe data centers and servers.

For more information on Prober pools, including manual configuration, see K08433560: Configuring prober pools.

For details on the available properties and DO usage, see GSLBProberPool in the Schema Reference.

{
    "schemaVersion": "1.19.0",
    "class": "Device",
    "Common": {
        "class": "Tenant",
        "gslbDataCenter": {
            "class": "GSLBDataCenter"
        },
        "gslbServer": {
            "class": "GSLBServer",
            "label": "Example of all GSLB server properties",
            "remark": "GSLB server description",
            "devices": [
                {
                    "address": "10.10.10.10",
                    "addressTranslation": "192.0.2.12",
                    "remark": "GSLB server device description"
                }
            ],
            "dataCenter": "/Common/gslbDataCenter",
            "serverType": "bigip",
            "enabled": false,
            "proberPreferred": "inside-datacenter",
            "proberFallback": "any-available",
            "bpsLimit": 10,
            "bpsLimitEnabled": true,
            "ppsLimit": 10,
            "ppsLimitEnabled": true,
            "connectionsLimit": 10,
            "connectionsLimitEnabled": true,
            "serviceCheckProbeEnabled": false,
            "pathProbeEnabled": false,
            "snmpProbeEnabled": false,
            "virtualServerDiscoveryMode": "enabled",
            "exposeRouteDomainsEnabled": true,
            "cpuUsageLimit": 10,
            "cpuUsageLimitEnabled": true,
            "memoryLimit": 10,
            "memoryLimitEnabled": true
        },
        "gslbProberPool": {
            "class": "GSLBProberPool",
            "label": "Example of all GSLB prober pool properties",
            "remark": "GSLB prober pool description",
            "enabled": false,
            "lbMode": "round-robin",
            "members": [
                {
                    "server": "/Common/gslbServer",
                    "label": "Example of all GSLB prober pool member properties",
                    "remark": "GSLB prober pool member description",
                    "enabled": false
                }
            ]
        }
    }
}