Load Balancing Inventory

Properties

Name Description Optional Valid Value Starting Version
uuid The UUID. For more information, see Resource Property. 0.6
name The name. For more information, see Resource Property. 0.6
description The description. For more information, see Resource Property. Yes 0.6
state The state, which is always Enabled. 0.6
vipUuid The VIP UUID. 0.6
listeners The listeners. For more information, see Listeners. 0.6

Sample

 {
            "description": "",
            "listeners": [
                {
                    "createDate": "Dec 1, 2017 8:24:44 PM",
                    "instancePort": 22,
                    "lastOpDate": "Dec 1, 2017 8:49:24 PM",
                    "loadBalancerPort": 22,
                    "loadBalancerUuid": "8a745a63e9f24e28af2d81e156d070bf",
                    "name": "lb2-listener",
                    "protocol": "tcp",
                    "uuid": "19a454f0c461492b8228b4ebe185d8a4",
                    "vmNicRefs": [
                        {
                            "createDate": "Dec 1, 2017 8:25:05 PM",
                            "id": 1,
                            "lastOpDate": "Dec 1, 2017 8:25:05 PM",
                            "listenerUuid": "19a454f0c461492b8228b4ebe185d8a4",
                            "status": "Active",
                            "vmNicUuid": "e20efc6858ea4988950882934262b6d7"
                        }
                    ]
                }
            ],
            "name": "lb2",
            "state": "Enabled",
            "uuid": "8a745a63e9f24e28af2d81e156d070bf",
            "vipUuid": "81806eb3a0034f529e80034e749b2a8a"
}

Listener

  • A listener defines how a load balancer routes incoming traffics from a VIP port (loadBalancer port) to a backend port (instancePort) of a VM instance. In addition, it defines a set of properties, such as the connection timeout and health check threshold.
  • From your perspectives, a listener simply defined two important ports: the frontend port (loadBalancerPort) where the incoming traffics visit, and the backend port where the incoming traffics are routed.
  • A load balancer can have multiple listeners. Each listener can be used to set different ports. In addition, ZStack defines a variety of properties as system tags for listeners to control listener behaviors, such as idle connection timeout, maximum connections, healthy threshold, and unhealthy threshold.

Load Balancer Listener Inventory

Name Description Optional Valid Value Starting Version
uuid The UUID. For more information, see Resource Property. 0.6
name The name. For more information, see Resource Property. 0.6
description The description. For more information, see Resource Property. Yes 0.6
loadBalancerUuid The load balancer UUID. 1 ~ 65336 0.6
loadBalancerPort The frontend port where the data reaches the VIP. 1 ~ 65336 0.6
instancePort The backend port where the data is distributed to VM instances.
  • For TCP/UDP: 0 - 65535
  • For ICMP: Use '-1' to represent all types. For more information, see ICMP type and code.
0.6
protocol The protocol. For more information, see Protocol.
  • http
  • tcp
0.6
vmNicRefs The VM NIC references. For more information, see VM NIC References Inventory. 0.6
createDate The creation date. For more information, see Resource Property. 0.6
lastOpDate The last operation date. For more information, see Resource Property. 0.6

Sample

{
            "createDate": "Dec 1, 2017 8:24:44 PM",
            "instancePort": 22,
            "lastOpDate": "Dec 1, 2017 8:49:24 PM",
            "loadBalancerPort": 22,
            "loadBalancerUuid": "8a745a63e9f24e28af2d81e156d070bf",
            "name": "lb2-listener",
            "protocol": "tcp",
            "uuid": "19a454f0c461492b8228b4ebe185d8a4",
            "vmNicRefs": [
                {
                    "createDate": "Dec 1, 2017 8:25:05 PM",
                    "id": 1,
                    "lastOpDate": "Dec 1, 2017 8:25:05 PM",
                    "listenerUuid": "19a454f0c461492b8228b4ebe185d8a4",
                    "status": "Inactive",
                    "vmNicUuid": "e20efc6858ea4988950882934262b6d7"
                }
            ]
}

Access Control List Inventory

Name Description Optional Valid Value Starting Version
uuid The UUID. For more information, see Resource Property. 3.9.0
name The name. For more information, see Resource Property. 3.9.0
description The description. For more information, see Resource Property. 3.9.0
ipVersion The IP version. 3.9.0
entries The entries. 3.9.0
groupBy Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. Yes 3.9.0
createDate The creation date. For more information, see Resource Property. 3.9.0
lastOpDate The last operation date. For more information, see Resource Property. 3.9.0
userTags The user tags. For more information, see CreateUserTag. Yes 3.9.0
systemTags The system tags. For more information, see CreateSystemTag. Yes 3.9.0
Sample
{
  "inventories": [
    {
      "uuid": "0abdbd20b8173ccf89f881309b5e40d0",
      "name": "acl-group"
    }
  ]
}

Protocol

A protocol defines the type of data packets that a load balancer routes. Currently, two protocol modes are supported: TCP (layer 4) and HTTP (layer 7). Note that TCP is the default mode. When the protocol is TCP, the load balancer will work in a pure TCP mode. Then, a full-duplex connection will be established between client sides and server sides. When the protocol is HTTP, connections from client sides to the load balancer and from the load balancer to server sides will be established respectively.

Backend VM NICs

You can add a new VM instance to a load balancer by adding the VM NIC to the load balancer's listener. Once the VM NIC UUID is added successfully, the load balancer will route the incoming traffics at appropriate time according the corresponding load balancing algorithm. A VM NIC can be added to different listeners of different load balancers. No matter how many listeners you have added, the VM instances where the NIC is located must have the capability to handle corresponding network requests.

The load balancer listener will add the corresponding VM instances by invoking NIC references, as shown in the following table.

Load Balancer Server Group Inventory

Name Description Optional Valid Value Starting Version
uuid The UUID of the server group. 4.0.0
name The name of the server group. 4.0.0
description The detailed description of the server group. 4.0.0
loadBalancerUuid The load balancer UUID. 4.0.0
createDate The time when the server group was created. 4.0.0
lastOpDate The time when the server group was last modified. 4.0.0
listenerServerGroupRefs 4.0.0
serverIps 4.0.0
vmNicRefs 4.0.0
systemTags The user tags. For more information, see CreateUserTag. Yes 4.0.0
userTags The user tags. For more information, see CreateUserTag. Yes 4.0.0
Sample
{
    "inventories": [
        {
            "createDate": "Dec 1, 2020 7:18:18 PM",
            "description": "default server group for load balancer shared2",
            "lastOpDate": "Dec 1, 2020 7:18:18 PM",
            "listenerServerGroupRefs": [],
            "loadBalancerUuid": "a20d5ce157f24494a98288022ce69ce0",
            "name": "default-server-group-shared2",
            "serverIps": [],
            "uuid": "5501293a2c2d4ea3855dae2051a5a29f",
            "vmNicRefs": []
        },
        {
            "createDate": "Dec 1, 2020 4:11:48 PM",
            "description": "default server group for load balancer slb1",
            "lastOpDate": "Dec 1, 2020 4:11:48 PM",
            "listenerServerGroupRefs": [],
            "loadBalancerUuid": "8d651d83ac424257abb66f766c793a7b",
            "name": "default-server-group-slb1",
            "serverIps": [],
            "uuid": "7ca8c9ad58774d698d833d79cbcdfb5c",
            "vmNicRefs": []
        },
        {
            "createDate": "Dec 4, 2020 3:55:17 PM",
            "description": "default server group for load balancer test-vip",
            "lastOpDate": "Dec 4, 2020 3:55:17 PM",
            "listenerServerGroupRefs": [],
            "loadBalancerUuid": "51e511c7ad5d49849509747a38a9c7dd",
            "name": "default-server-group-test-vip",
            "serverIps": [],
            "uuid": "89bc36bdf6674323844f4afe21ed5fb2",
            "vmNicRefs": []
        },
        {
            "createDate": "Dec 1, 2020 7:36:20 PM",
            "description": "default server group for load balancer flat",
            "lastOpDate": "Dec 1, 2020 7:36:20 PM",
            "listenerServerGroupRefs": [],
            "loadBalancerUuid": "b7597d60df48459fabee0809773ddf06",
            "name": "default-server-group-flat",
            "serverIps": [],
            "uuid": "b44ccf09cca74ab188d493177570865c",
            "vmNicRefs": []
        },
        {
            "createDate": "Dec 1, 2020 2:53:37 PM",
            "description": "default server group for load balancer Shared",
            "lastOpDate": "Dec 1, 2020 2:53:37 PM",
            "listenerServerGroupRefs": [
                {
                    "createDate": "Dec 2, 2020 11:20:00 AM",
                    "id": 1,
                    "lastOpDate": "Dec 2, 2020 11:20:00 AM",
                    "listenerUuid": "5631ff3bb6494fc98c16f3c135e2ebe9",
                    "serverGroupUuid": "b645b7e618ff482d8738d885426b2799"
                }
            ],
            "loadBalancerUuid": "6874bc033d4b41369a8c0216cb9b4b04",
            "name": "default-server-group-Shared",
            "serverIps": [],
            "uuid": "b645b7e618ff482d8738d885426b2799",
            "vmNicRefs": []
        }
    ],
    "success": true
}

Listener Server Group Refs Inventory

Name Description Optional Valid Value Starting Version
id 4.0.0
listenerUuid 4.0.0
serverGroupUuid 4.0.0
createDate The time when the listener was created. 4.0.0
lastOpDate The time when the listener was last modified. 4.0.0

SLB Group Inventory

Name Type Description Starting Version Type
uuid The UUID of the SLB group. 4.0.0
name The name of the SLB group. 4.0.0
backendType 4.0.0
deployType 4.0.0
slbOfferingUuid 4.0.0
description The detailed description of the SLB group. 4.0.0
groupBy 4.0.0
createDate The time when the SLB group was created. 4.0.0
lastOpDate The time when the SLB group was last modified. 4.0.0
slbVms 4.0.0
lbs 4.0.0
networks 4.0.0
systemTags The user tags. For more information, see CreateUserTag 4.0.0
userTags The system tags. For more information, see CreateSystemTag 4.0.0
Sample
{
  "inventories": [
    {
      "name": "slb",
      "backendType": "vyos",
      "deployType": "direct",
      "description": "slb test"
    }
  ]
}

SLB Offering Inventory

Name Type Description Starting Version Type
managementNetworkUuid String The management network UUID. 4.0.0
zoneUuid String The zone UUID. 4.0.0
imageUuid String The image UUID. 4.0.0
uuid String The record UUID. 4.0.0
name String The name of the SLB offering. 4.0.0
description String The detailed description of the SLB offering. 4.0.0
cpuNum Integer 4.0.0
cpuSpeed Integer 4.0.0
memorySize Long 4.0.0
type String 4.0.0
allocatorStrategy String 4.0.0
sortKey Integer 4.0.0
createDate Timestamp The time when the SLB offering was created. 4.0.0
systemTags The user tags. For more information, see CreateUserTag 4.0.0
userTags The system tags. For more information, see CreateSystemTag 4.0.0
Sample
{
  "inventories": [
    {
      "managementNetworkUuid": "fdd51745e9ee3a4cb5bca03cf021c22f",
      "zoneUuid": "305d0c8b5c5a3edd81a641911126c332",
      "imageUuid": "b2f980076c3e3e6f8e9f3d4fd22bb7fb",
      "name": "SLB-Offering",
      "cpuNum": 2.0,
      "cpuSpeed": 1.0,
      "memorySize": 1024.0,
      "type": "SLB"
    }
  ]
}

VM NIC References Inventory

Name Description Optional Valid Value Starting Version
id The UUID of the VM NIC references. 0.6
listenerUuid The listener UUID. 0.6
vmNicUuid The VM NIC UUID. 0.6
status The status. When the VM instance of the NIC is running, the status is Active. Otherwise, it is Inactive.
  • Active
  • Inactive
0.6
createDate The creation date. For more information, see Resource Property. 0.6

After a VM NIC is added successfully to a load balancer listener, if you stop the VM instance, the status of vmNicRefs will be changed to Inactive. If you start the VM instance, the status of vmNicRefs will be changed to Active. If you delete the VM instance, the corresponding NIC will be removed from the load balancer listener.