edit-icon download-icon

DescribeLoadBalancerHTTPListenerAttribute

Last Updated: Mar 06, 2018

Description

Query the configurations of a specified HTTP listener.

Request parameter

Name Type Required Description
Action String Yes

The action to perform. Valid value:

DescribeLoadBalancerHTTPListenerAttribute

RegionId String Yes The ID of the region where the SLB instance is located.
LoadBalancerId String Yes The ID of the SLB instance for which the TCP listener is created.
ListenerPort Integer Yes

The front-end port of the listener that is used to receive incoming traffic and distribute the traffic to the backend servers.

Valid value: [1, 65535]

Response parameter

Name Type Description
RequestId String The ID of the request.
ListenerPort Integer Port used by the Server Load Balancer instance frontend.
Status String The status of the listener.
Bandwidth Integer

The peak bandwidth of the listener.

Note: If the value is set to -1, the listener is not limited by bandwidth.

ListenerPort Integer The front-end port of the listener that is used to receive incoming traffic and distribute the traffic to the backend servers.
BackendServerPort Integer The port opened on the backend server to receive requests.
VServerGroupId String The ID of the VServer group to add to the listener.
Scheduler String

The algorithm used to distribute traffic.

  • wrr (Default)

    Backend servers with higher weights receive more requests than those with smaller weights.

  • wlc

    A server with a higher weight will receive a larger percentage of live connections at any one time. If the weights are the same, the system directs network connections to the server with the fewest established connections.

  • rr

    Requests are evenly and sequentially distributed to the backend servers.

XForwardedFor String

Whether to use the XForwardedFor header to obtain the actual IP address of the client.

XForwardedFor_SLBIP String

Whether to use the XForwardedFor_SLBIP header to obtain the public IP address of the SLB instance.

XForwardedFor_SLBID String

Whether to use the XForwardedFor header to obtain the ID of the SLB instance.

XForwardedFor_proto String

Whether to use the XForwardedFor_proto header to obtain the protocol used by the listener.

StickySession String

Whether to enable session persistence. If enabled, all session requests from the same client are sent to the same backend server.

StickySessionType String

The method used to handle the cookie.

  • insert

    Server Load Balancer adds a session cookie to the first response from the backend server and identifies the server which has sent the response. The next request will contain the cookie and the listener will distribute the request to the same backend server.

  • server

    You can set the cookie name in the response. Server Load Balancer will overwrite the original cookie when it discovers that a new cookie is set. The next time the client carries the new cookie to access the Server Load Balancer, the listener will distribute the request to the previously recorded backend server.

Note: This parameter is returned when the value of the StickySession parameter is on.

CookieTimeout Integer

The cookie timeout in seconds.

Note: This parameter is returned when the value of the StickySessionType parameter is insert.

Cookie String

The cookie configured on the backend server.

Note: This parameter is returned when the value of the StickySessionType parameter is server.

Gzip String Whether to enable the Gzip compression.
HealthCheck String Whether to enable health check.
HealthCheckDomain String

The domain name used for health check.

By default, Server Load Balancer sends an HTTP head request to the default homepage configured on the application server through the intranet IP address of the backend ECS instance to do the health check.

HealthCheckURI String The URI used for health check.
HealthyThreshold Integer The number of consecutive successes of health check performed by the same LVS mode server on the same ECS instance (from failure to success).
UnhealthyThreshold Integer The number of consecutive failures of health check performed by the same LVS node server on the same ECS instance (from success to failure).

When HealthCheck is on, the parameter is required; and when HealthCheck is off, the parameter will be ignored.

HealthCheckConnectPort Integer The port used for health check.
HealthCheckTimeout Integer The amount of time in seconds to wait for the response from a health check. If an ECS instance sends no response within the specified timeout period, the health check fails.
HealthCheckInterval Integer The time interval between two consecutive health checks.
HealthCheckHttpCode String The HTTP status code indicating that the health check is normal.

Example

Request example

  1. https://slb.aliyuncs.com/?Action=DescribeLoadBalancerHTTPListenerAttribute
  2. &LoadBalancerId=139a00604ad-cn-east-hangzhou-01
  3. &ListenerPort=80
  4. &<CommonParameters>

Response example

  • XML format

    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <DescribeLoadBalancerHTTPListenerAttributeResponse>
    3. <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    4. <ListenerPort>80</ListenerPort>
    5. <BackendServerPort>80</BackendServerPort>
    6. <Bandwidth>-1</Bandwidth>
    7. <Status>stopped</Status>
    8. <Schedule>wrr</Schedule>
    9. <XForwardedFor>on</XForwardedFor>
    10. </DescribeLoadBalancerHTTPListenerAttributeResponse>
  • JSON format

    1. {
    2. "RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
    3. "ListenerPort":80,
    4. "BackendServerPort":80,
    5. "Bandwidth":-1,
    6. "Status":"stopped",
    7. "Schedule":"wrr",
    8. "XForwardedFor":"on"
    9. }
Thank you! We've received your feedback.