CreateLoadBalancerTCPListener

Last Updated: Jul 03, 2017

Description

  • Create TCP Listener; create Listeners based on the TCP protocol for the Server Load Balancer instance, including policies and health check configurations based on the TCP protocol.
  • The newly created Listener is in the Stopped status, and StartLoadBalancerListener shall be called to make it work. See the state transition diagram of the Server Load Balancer Listener for the state transition diagram of Listener.
  • The health check about the TCP Listener is always on, and users can set various parameter configurations of health checks but close the health check.

Request parameter

Name Type Mandatory or not Description
Action String Yes Name of the operating interface, which is specified in the system
Value :CreateLoadBalancerTCPListener
LoadBalancerId String Yes The unique ID of an Server Load Balancer instance.
ListenerPort Integer Yes Port used by the Server Load Balancer instance frontend
Value:1-65535
BackendServerPort Integer Yes Port used by the Server Load Balancer instance backend
Value:1-65535
Bandwidth Integer Yes Bandwidth peak of Listener
Value:-1 | 1-1000Mbps
For the public network instance charged per traffic consumed, the Bandwidth on Listener can be set to -1, indicating the bandwidth peak is unlimited.
Scheduler String No Scheduling algorithm
Value:wrr | wlc
Default:wrr
PersistenceTimeout Integer No Timeout of connection persistence
Value: 0-3600(in seconds)
Default:0 The value 0 indicates to close it.
HealthCheckType String No Type of health check
Value:tcp | http
Default:tcp
TCP supports TCP and HTTP health check mode, you can select the particular mode depending on your application.
HealthCheckDomain String No Domain name used for health check. When TCP listener need to use HTTP health check, this parameter will be configured; and when TCP health check is used, the parameter will be ignored.
Value: $_ip | custom string
Rules of the custom string: its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When the parameter is set to $_ip by the user, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.
HealthCheckURI String As appropriate URI used for health check. When TCP listener need to use HTTP health check, this parameter will be configured; and when TCP health check is used, the parameter will be ignored.
Value:Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.
HealthCheckConnectPort Integer No Port used for health check
Value: 1-65535
Default:None
When the parameter is not set, it means the backend server port is used (BackendServerPort).
HealthyThreshold Integer No Threshold determining the result of the health check is success. Namely, after how many successive successful health checks, the health check result of the
Value:1-10
Default:3
UnhealthyThreshold Integer As appropriate Threshold determining the result of the health check is fail. Namely, after how many successive failed health checks, the health check result of the backend server is changed from success to fail.
Value:1-10
Default:3
HealthCheckConnectTimeout Integer No Timeout of the health check connection
Value:1-50(in seconds)
Default:5
HealthCheckInterval Integer No Time interval of health checks
Value:1-5(in seconds)
Default:2
HealthCheckHttpCode String As appropriate Regular health check HTTP status code. Multiple codes are segmented by “,”.
When HealthCheck is on, the parameter is mandatory; and when HealthCheck is off, the parameter will be ignored.
Value:http_2xx | http_3xx | http_4xx | http_5xx
Default: http_2xx
VServerGroupId String No Virtual server group ID. Virtual server group ID and master-slave server group ID cannot be both used at the same time.
MasterSlaveServerGroupId String No Master-slave server group. Virtual server group ID and master-slave server group ID cannot be both used at the same time.

Return parameter

They are all common response parameters. For details see Common parameters.

Example

Request example

  1. https://slb.aliyuncs.com/
  2. &Action=CreateLoadBalancerTCPListener
  3. &LoadBalancerId=139a00604ad-cn-east-hangzhou-01
  4. &ListenerPort=443
  5. &BackendServerPort=443
  6. &Bandwidth=-1
  7. &VServerGroupId=rsp-cige6j5e7p
  8. &<common request parameter>

Return example

  • XML format
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <CreateLoadBalancerTCPListenerResponse>
    3. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
    4. </CreateLoadBalancerTCPListenerResponse>
  • JSON format
    1. {"RequestId":" CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
    2. }
Thank you! We've received your feedback.