SetLoadBalancerTCPListenerAttribute
Description
call SetLoadBalancerTCPListenerAttribute to modify the configuration of TCP listening.
Request Method
POST
Request Path
/apsara/route/Slb/SetLoadBalancerTCPListenerAttribute
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
MaxConnection | BODY | integer | No | 20 | Maximum number of connections. |
VServerGroupId | BODY | string | No | rsp-cige6j5**** | virtual server group ID. |
SynProxy | BODY | string | No | enable | whether to turn on the SynProxy attack protection function. It is recommended that users do not adjust this parameter under normal circumstances, and it is controlled by load balancing. Value:enable or disable. |
Description | BODY | string | No | test | TCP listening description. |
UnhealthyThreshold | BODY | integer | No | 4 | after how many consecutive health checks have failed, determine the health check status of the back-end server from success to failure . value:2~10. |
Scheduler | BODY | string | No | wrr | scheduling algorithm. Value: wrr: The higher the weight value, the higher the number of times (probability) of being polled. wlc: In addition to polling according to the weight value set by each back-end server, the actual load of the back-end server (that is, the number of connections) is also considered. When the weight value is the same, the number of times (probability) that the backend server with the smaller the current number of connections is polled is higher. rr: distribute external requests to backend servers in sequence according to the access order. sch: based on the consistent hash of the source IP address, the same source address will be scheduled to the same backend server. tch: based on the consistency hash of the quad (source IP, destination IP, source port and destination port), the same stream is scheduled to the same backend server. Description Only guaranteed instances support sch and tch consistent hash algorithms. |
HealthCheckURI | BODY | string | No | /test/index.html | URI for health check. It is 1 to 80 characters in length and supports letters, numbers and dashes (-), forward slashes (/), English periods (.), percent signs (%), question marks (?), pound signs (#) and (& amp;). The URL cannot only be a forward slash (/), but must start with a forward slash (/). This parameter can be configured when TCP listeners need to use HTTP health checks. If not configured, TCP health checks are used. ) |
LoadBalancerId | BODY | string | Yes | lb-bp1ygod3yctvg1y**** | ID of the load balancing instance. |
VServerGroup | BODY | string | No | on | whether to use virtual server groups. Value:on or off. VserverGroup and MasterSlaveServerGroup only one value is allowed to be on. |
MasterSlaveServerGroup | BODY | string | No | on | whether to use the primary and standby server group. Value:on or off. VserverGroup and MasterSlaveServerGroup only one value is allowed to be on. |
PersistenceTimeout | BODY | integer | No | 0 | timeout for session retention. Value:0~3600 seconds. default value:0, indicates closing session persistence. |
HealthCheckConnectPort | BODY | integer | No | 8080 | port used for health check. Value:1-65535. when this parameter is not set, indicates that the backend service port (BackendServerPort) is used. |
Bandwidth | BODY | integer | No | 43 | peak bandwidth of listening, in Mbps. Value:-1 or 1~5120. -1: for public network load balancing instances charged by traffic, you can set the peak bandwidth to -1, that is, the peak bandwidth is not limited. 1~5120: for public network load balancing instances charged by bandwidth, the bandwidth peak value of each monitor can be set, however, the sum of the peak bandwidth of all listeners cannot exceed the peak bandwidth of the instance. |
HealthCheckHttpCode | BODY | string | No | http_2xx | health check normal HTTP status code, multiple status codes are divided by commas (,). Value:http_2xx, http_3xx, http_4xx or http_5xx. |
Tags | BODY | string | No | {"tagKey":"Key1","tagValue":"Value1"} | tag key and value. |
EstablishedTimeout | BODY | integer | No | 500 | connection timeout. Value:10~900 seconds. |
ListenerPort | BODY | integer | Yes | 80 | the port used by the front end of the load balancing instance. Value:1~65535. |
HealthCheckInterval | BODY | integer | No | 5 | interval of health check. Value:1~50 seconds. |
HealthCheckConnectTimeout | BODY | integer | No | 100 | the time to wait to receive the response from the health check. If the backend ECS does not respond correctly within the specified time, the health check is determined to have failed. Value:1~300 seconds. description if HealthCheckConnectTimeout the value is less than HealthCheckInterval, then HCTimeout is invalid, the timeout period is HealthCheckInterval. |
version | BODY | string | No | 2016-01-01 | version of api |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
HealthyThreshold | BODY | integer | No | 4 | after how many consecutive successful health checks, determine the health check status of the back-end server from failure to success . value:2~10. |
HealthCheckDomain | BODY | string | No | 172.XX.XX.6 | domain name used for health check. This parameter can be configured when TCP listeners need to use HTTP health check. If not, TCP health check is performed. $_ ip: the private network IP of the backend server. /span>/p> p data-tag = "p" class = "p"> when IP is specified or this parameter is not specified, load balancing will use the private IP of each back-end server as the domain name used for health check. domain: The domain name is 1~80 in length and can only contain letters, numbers, English periods (.) and dashes (-). |
MasterSlaveServerGroupId | BODY | string | No | rsp-cige**** | primary and standby server group ID. description only one server group ID and primary/standby server group ID can be selected. |
HealthCheckType | BODY | string | No | tcp | health check type. Value:tcp or http. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestId | string | CEF72CEB-54B6-4AE8-B225-F876FF7BA984 | request ID. |
Example
Successful Response example
{
"RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}