SetLoadBalancerHTTPListenerAttribute
Description
call SetLoadBalancerHTTPListenerAttribute to modify the configuration of HTTP listening.
Request Method
POST
Request Path
/apsara/route/Slb/SetLoadBalancerHTTPListenerAttribute
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
CookieTimeout | BODY | integer | No | 500 | Cookie timeout. value: 1 ~ 86400 seconds. description when StickySession is on and StickySessionType is insert, this parameter is required. |
MaxConnection | BODY | integer | No | 10 | Maximum number of connections. |
VServerGroupId | BODY | string | No | rsp-cige6j**** | server group ID. |
Description | BODY | string | No | test | set the description information of the listener. |
UnhealthyThreshold | BODY | integer | No | 4 | after how many consecutive health checks have failed, the health check status of the backend server is determined from success to failure . Value: 2 ~ 10. description is valid only when HealthCheck is on. |
Scheduler | BODY | string | No | wrr | scheduling algorithm. Value: wrr: the backend server with the higher the weight value, the number of times (probability) it is polled is also higher. wlc: in addition to polling according to the weight value set by each back-end server, the actual load (that is, the number of connections) of the back-end server 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 back-end servers in sequence according to the access order. |
HealthCheckURI | BODY | string | No | /test/index.html | URI for health check. the length is limited to 1~80, and only letters, numbers, dashes (-), forward slashes (/), half-width periods (.), percent signs (%), half-width question marks (?), pound signs (#), and(& amp;) characters can be used. The URL cannot only be a forward slash (/), but must start with a forward slash (/). description is valid only when HealthCheck is on. |
HealthCheck | BODY | string | No | on | whether to turn on health check. Value: on or off. |
IdleTimeout | BODY | integer | No | 12 | specify the connection idle timeout time, the value range is 1 ~ 60 seconds, and the default value is 15 seconds. there has been no access request during the timeout period. load balancing will temporarily interrupt the current connection until the next request comes to temporarily re-establish a new connection. |
LoadBalancerId | BODY | string | Yes | lb-bp1qjwo61pqz3ah**** | ID of the load balancing instance. |
VServerGroup | BODY | string | No | on | whether to use virtual server groups. Value: on or off. |
XForwardedFor_SLBID | BODY | string | No | on | whether to obtain the load balancing instance ID through the SLB-ID header field. Value: on or off. |
HealthCheckConnectPort | BODY | integer | No | 8080 | port used for health check. value: 1 ~ 65535. description only valid when HealthCheck value is on. |
Bandwidth | BODY | integer | No | -1 | The peak bandwidth of the monitor, in Mbps. Value: -1: for public network load balancing instances billed by traffic, the peak bandwidth can be set to -1, that is, the bandwidth peak is not limited. 1 ~ 5120: for public network load balancing instances that are billed by bandwidth, you can set the peak bandwidth of each listener, but the sum of the peak bandwidth of all listeners cannot exceed the peak bandwidth of the instance. |
Gzip | BODY | string | No | on | Whether to turn on Gzip compression to compress specific file types. Value: on or off. |
StickySessionType | BODY | string | No | insert | Cookie processing method. Value: insert: insert Cookie. /p> p data-tag = "p" class = "p"> when the client accesses for the first time, the load balancing service will insert a cookie into the return request (I .e. insert a ServerId into the HTTP or HTTPS response message). the next time the client carries this cookie for access, the load balancing service will directionally forward the request to the back-end server previously recorded. server: Rewrite Cookie. /p> p data-tag = "p" class = "p"> load balancing finds that the user has customized the cookie, and will rewrite the original cookie. next time the client carries a new cookie to access, the load balancing service will directionally forward the request to the previously recorded back-end server. description when StickySession is on, this parameter must be specified. |
XForwardedFor_SLBIP | BODY | string | No | on | whether to obtain the real IP requested by the client through the SLB-IP header field. Value: on or off. |
HealthCheckHttpCode | BODY | string | No | http_2xx | normal HTTP status code for health check. multiple status codes are divided by commas (,). Value: http_2xx, http_3xx, http_4xx or http_5xx. description is valid only when HealthCheck is on. |
Tags | BODY | string | No | {"tagKey":"Key1","tagValue":"Value1"} | tag key and value. |
Cookie | BODY | string | No | B490B5EBF6F3CD402E515D22BCDA1598 | Cookie configured on the server. The length is 1 ~ 200 characters, supports ASCII English letters and numeric characters, cannot contain half-width commas (,), half-width semicolons (;) or spaces, and cannot start with dollar signs ($). description when StickySession is on and StickySessionType is server, this parameter is required. |
ListenerPort | BODY | integer | Yes | 80 | the port used by the front end of the load balancing instance. value: 1 ~ 65535. |
RequestTimeout | BODY | integer | No | 3 | specify the request timeout time, the value range is 1 ~ 180 seconds. the default value is 60 seconds. /p> p data-tag = "p" class = "p"> the back-end server has not responded during the timeout period. load balancing will give up waiting and return HTTP 504 error code to the client. |
HealthCheckInterval | BODY | integer | No | 5 | time interval for health check. value: 1 ~ 50 seconds. description is valid only when HealthCheck is on. |
HealthCheckTimeout | BODY | integer | No | 3 | 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. Only valid when HealthCheck value is on. value: 1 ~ 300 seconds. description if the value of HealthCHeckTimeout is less than the value of HealthCheckInterval, then HealthCHeckTimeout is invalid, the timeout is the value of HealthCheckInterval. |
version | BODY | string | No | 2016-01-01 | version of api |
StickySession | BODY | string | No | on | whether to enable session persistence. Value: on or off. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
HealthyThreshold | BODY | integer | No | 4 | after how many consecutive successful health checks, the health check status of the backend server is determined from failure to success . Value: 2 ~ 10. description is valid only when HealthCheck is on. |
XForwardedFor | BODY | string | No | on | whether to obtain the real IP requested by the client through XForwardedFor. The value is on. |
HealthCheckDomain | BODY | string | No | 172.XX.XX.6 | domain name used for health check, value: $_ ip: the private IP address of the backend server. When $_ip is specified or the HealthCheckDomain is not specified, SLB uses the private IP address of each backend server as the domain name used for health check. domain: the domain name is 1 to 80 characters in length and can only contain letters, numbers, half-width periods (.) and dashes (-). description is valid only when HealthCheck is on. |
XForwardedFor_proto | BODY | string | No | on | whether to obtain the listening protocol of the load balancing instance through the X-Forwarded-Proto header field. Value: on or off. |
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
}
}