Ensure Availability using HA Pool of Data Gateways
Scenario Overview
High Availability (HA) configurations create pools of data gateway instances shared across devices in an HA setup. These pools enable failover and recovery during network disruptions or exceptions, ensuring uptime, resilience, and seamless fault management for users and applications.
Benefits of HA Pools
The benefits include the following:
- Increased Redundancy: HA pools ensure that devices can continue to operate even if one device in the cluster fails.
- Seamless Failover: When a device fails, other devices in the HA setup can effortlessly take over the workload using resources from the HA pool, ensuring minimal disruption to users.
- Simplified Management: HA pools simplify resource management by allowing dynamic allocation and reallocation without complex manual configuration.
This typically involves setting up a redundancy group and configuring the redundancy management interface to allow for CDG-to-CDG redundancy.
Prerequisites
Before using the examples in this guide, ensure that:
- Follow the guidelines that are specified in Getting started.
- In case u are trying it using Postman, before running this example, ensure to obtain access JWT token. Refer 'FAQs' section.
CRUDL APIs on HA Pools of Data Gateways
An HA pool is a logical group of Crosswork Data Gateway instances with optional high availability. If an instance fails, Cisco Crosswork replaces it with a spare from the pool to minimize data collection disruption. Instances must be assigned to a pool for use. These APIs handle CRUD operations for HA pools.
- Get list of HA pools
- Delete HA Pool
- Update HA pool
- Create HA Pool
- Update FQDNs of VIPs in a HA pool
- FAQs
- Additional resources and Cisco product examples:
Get List of HA pools
To get the list of HA Pools will be your first task in managing them. We provide API support for this activity which enables you to use it from any Northbound application that is employed as Operation Support System. Its execution can be experienced through cURL or applications like Postman.
Note: Execute a list command to retrieve UUIDs (e.g., Pool ID, Data Gateway instances, Device ID) needed for payload creation. The system auto-generates UUIDs during creation and includes them in the output JSON. Northbound applications should read them in real time to update scripts for Update or Delete API calls.
- To achieve it through API. (Using cURL)
API Usage sample |
---|
'curl -X POST --location 'https://<Crosswork Server IP>:<Crosswork port>/crosswork/dg-manager/v2/hapool/query' --header 'Authorization: Bearer<JWT Token>’ --header 'Content-Type: application/json' --data '{ "criteria": "select * from HAPool"}'' |
Sample Output
{
"data": [
{
"puuid": "32a4b3d6-9e88-47bf-a1ee-02e66dc568d2",
"name": "pool-1",
"ipaddrs": [
{
"inetaddrs": [
{
"inetAf": "ROBOT_INET_ADDR_TYPE_v4",
"inetAddr": "10.13.0.137",
"mask": "24",
"gateway": "10.13.0.1"
}
]
}
],
"pdgUuids": [
"efe62b5b-322a-492a-8df5-a14b8e92dacc",
"94a51091-11d8-4c4e-93e8-64062232ce16"
],
"spares": "1",
"protectionStatus": "PROTECTED",
"subnetMask": "24",
"gateway": "10.13.0.1",
"haStrategy": "VIP_BASED",
"balanced": true
}
],
"totalCount": 1
}
Create HA Pool
There are two types of HA pools-
- VIP-based: A pool where network devices connect to Crosswork Data Gateway instances within a high-availability pool on a single IP subnet. The subnet can be intra-DC (Data Center) or inter-DC extended.
- FQDN-based: A pool where network devices connect to Crosswork Data Gateway instances located in multiple subnets within the same HA pool.
To create an FQDN-based pool, an external NLB must host a VIP to route traffic to network devices, protecting the HA pool's internal subnet addresses.
To achieve it through API (Using cURL)
VIP Based
API Usage sample |
---|
'curl -X POST --location 'https://<Crosswork Server IP>:<Crosswork Port>/crosswork/dg-manager/v2/hapool/' --header 'Authorization:Bearer <JWT Token>’ --header 'Content-Type: application/json' --data '{ <Payload in JSON Format >}’’ |
Sample Payload:
{
"pools": [
{
"puuid": "f7c6322d-62d3-4988-8d93-44c8e666265d",
"name": "HAPool_VIP",
"ipaddrs": [
{
"ipaddr": {
"inetAf": "ROBOT_INET_ADDR_TYPE_v4",
"inetAddr": "10.11.0.11",
"mask": "16"
},
"gateway": "10.13.0.1"
}
],
"pdgUuids": [
"F2B6B534-14AA-4FC1-9A38-E6F97D1F5381",
"F2B6B534-14AA-4FC1-9A38-E6F97D1F53812"
],
"spares": "1",
"subnetMask": "16",
"gateway": "10.13.0.1",
"haStrategy": "VIP_BASED",
"balanced": true
}
]
}
Sample Output
{
"puuid": [
"f7c6322d-62d3-4988-8d93-44c8e666265d HAPOOL_VIP"
]
}
FQDN Based
API Usage sample |
---|
curl -X POST --location 'https://<Crosswork Server IP>:<Crosswork Port>/crosswork/dg-manager/v2/hapool/' --header 'Authorization:Bearer <JWT Token>’ --header 'Content-Type: application/json' --data '{ <Payload in JSON Format >}’’ |
Sample Payload:
{
"pools": [
{
"puuid": "294ae106-6d85-9283-9f5d-4a106cc03513",
"name": "HAPool-2",
"ipaddrs": [
{
"fqdn": "www.fqdn.com"
}
],
"pdgUuids": [
"F2B6B534-14AA-4FC1-9A38-E6F97D1F5381",
"F2B6B534-14AA-4FC1-9A38-E6F97D1F53812"
],
"spares": "1",
"protectionStatus": "PROTECTED",
"haStrategy": "FQDN_BASED"
}
]
}
Expected Output:
{
"puuid": [
"294ae106-6d85-9283-9f5d-4a106cc03513 HAPool-2"
]
}
Note: After successfully creating a pool, the FQDN is retrieved from DNS and appears in the output, provided FQDN is enabled during creation. It can also be enabled later. Refer to the User Guide for detailed HA pool creation strategies and error handling.
Update HA Pool
Users may want to add or edit IP addresses or include more gateways within the pool's scope. You can also modify a VIP-based pool.
To achieve it through API.
API Usage sample curl -X PUT
--location 'https://<Crosswork Server IP>:<Crosswork Port>/crosswork/dg-manager/v2/hapool/'
--header 'Authorization:Bearer <JWT Token>’
--header 'Content-Type: application/json'
--data '{ <Payload in JSON Format >}’’
Sample Payload:
{ "name": "Updated_Pool_Name",
"data_gateway_instances": ["dg1", "dg2"],
"ha_enabled": true }
Expected Output
{
"puuid": "a7c3e0f6-d113-4549-ac4e-6ef5cec0e2d4",
"message": "Name updated successfully for HA Pool: HAPool_Test"
}
Refer to the User Guide to explore various HA Pool update strategies and handle error conditions.
Delete HA Pool
TBD. Add introduction to business case here.
Note: You cannot delete pools with attached devices.
To achieve it through API.
API Usage sample curl -X DELETE
--location 'https://<Crosswork Server IP>:<Crosswork Port>/crosswork/dg-manager/v2/hapool/'
--header 'Authorization:Bearer <JWT Token>’
--header 'Content-Type: application/json'
--data '{ <Payload in JSON Format >}’’
Sample Payload
{
"pools": [
{
"puuid": "a7c3e0f6-d113-4549-ac4e-6ef5cec0e2d4"
}
]
}
Expected Output
"204: This Request has no response data available"
Update FQDNs of VIPs in a HA pool
Note: If enabled, FQDN must be configured in DNS server for all virtual addresses added, otherwise pool create/update operation will fail.
To achieve it through API. (Using curl)
API Usage sample curl -X PUT
--location 'https://<Crosswork Server IP>:<Crosswork Port>/crosswork/dg-manager/v2/hapool/'
--header 'Authorization:Bearer <JWT Token>’
--header 'Content-Type: application/json'
--data '{ <Payload in JSON Format >}’’
Sample Payload:
{
"pools": [
{
"puuid": "f7c6322d-62d3-4988-8d93-44c8e666265d",
"name": "HAPOOL_Fqdn",
"ipaddrs": [
{
"inetaddrs": [
{
"inetAf": "ROBOT_INET_ADDR_TYPE_v4",
"inetAddr": "10.11.0.11",
"mask": "16",
"gateway": "10.11.0.1"
}
]
},
{
"inetaddrs": [
{
"inetAf": "ROBOT_INET_ADDR_TYPE_v4",
"inetAddr": "10.11.0.12",
"mask": "16",
"gateway": "10.11.0.1"
}
]
}
],
"pdgUuids": [
"F2B6B534-14AA-4FC1-9A38-E6F97D1F5381",
"F2B6B534-14AA-4FC1-9A38-E6F97D1F53812"
],
"spares": "0",
"haStrategy": "FQDN_BASED",
"balanced": true,
"enable_fqdn": true
}
]
}
Expected Output:
{
"puuid": "f7c6322d-62d3-4988-8d93-44c8e666265d",
"message": "FQDN updated successfully for HA Pool: HAPOOL_Fqdn"
}
FAQs
- How to generate a JWT Token?
- How to update DNS with FQDN?
- How to utilize response jsons in Northbound applications?
- How dual stack HA Pool create/update need to be done?