Create an HTTP Listener for an External ELB Instance

<p>This article describes how to create an external HTTP listener.</p> <p><span style="font-size:18px"><strong>Prerequisites</strong></span></p> <p>You have successfully created an external ELB instance.</p> <p><span style="font-size:18px"><strong>Procedures</strong></span></p> <p>1.&nbsp;Log in to the <a href="https://pinganyun.com/console/loadBalance/overview" target="_blank">ELB Console</a>.</p> <p>2.&nbsp;In the left navigation pane, click <strong>Instance Management</strong> to enter the <strong>Instance Management</strong> page.</p> <p>3.&nbsp;Click the instance name of the target ELB instance and enter the <strong>Instance Information</strong> page.</p> <p>4.&nbsp;Click the <strong>Listener</strong> tab.</p> <p>5.&nbsp;In the upper-right corner of the tab, Click <strong>Create</strong> to enter the <strong>Create Listener</strong> page.</p> <p>6.&nbsp;Configure the listener as described in the following tables:</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201607120024-18f79a369a49.png" style="height:566px; width:830px" /></p> <p><strong>Basic Information</strong></p> <table border="1" cellpadding="0" cellspacing="0" style="width:0px"> <tbody> <tr> <td style="background-color:#ededed; vertical-align:top; width:223px"> <p><strong>Configuration item</strong></p> </td> <td style="background-color:#ededed; vertical-align:top; width:558px"> <p><strong>Description</strong></p> </td> </tr> <tr> <td style="vertical-align:top; width:223px"> <p>Description</p> </td> <td style="vertical-align:top; width:558px"> <p>Customize the description of a listener.</p> </td> </tr> <tr> <td style="vertical-align:top; width:223px"> <p>Frontend protocol</p> </td> <td style="vertical-align:top; width:558px"> <p>Select HTTP as the frontend protocol.</p> </td> </tr> <tr> <td style="vertical-align:top; width:223px"> <p>Port</p> </td> <td style="vertical-align:top; width:558px"> <p>Enter the port number used to receive the request and forward the request to the pool.</p> <p><strong>Note:</strong> In the same ELB instance, the listener port number cannot be repeated.</p> </td> </tr> <tr> <td style="width:223px"> <p>Listen forward</p> </td> <td style="vertical-align:top; width:558px"> <p>Only HTTP listeners support forwarding to HTTPS listeners, where the port for listening and forwarding can be customized. When the HTTP listener configures this option, ELB will forward the request received on the HTTP port to the specified HTTPS listener. It is often used to jump between HTTP requests and HTTPS requests in Web services.</p> <p>When HTTP specifies the target HTTPS listener, the dependency relationship is established and HTTPS cannot be released. You need to delete the HTTP forwarder first.</p> </td> </tr> <tr> <td style="vertical-align:top; width:223px"> <p>Schedule algorithm</p> </td> <td style="vertical-align:top; width:558px"> <p>Select a schedule algorithm. Currently only <strong>Weighted Round Robin</strong> is supported. In the weighted round robin mode, the access request will be assigned to the hosts in the pool according to the weight value. The higher the host weight, the greater the probability of being distributed. If the weight values are the same, the round robin mode is implemented.</p> </td> </tr> <tr> <td style="vertical-align:top; width:223px"> <p>Pool</p> </td> <td style="vertical-align:top; width:558px"> <p>Select a server resource pool.</p> <p>You need to select a sever resource pool based on the following steps:</p> <p>1.&nbsp;Click <strong>Choose Pool</strong>, and the <strong>Choose Pool </strong>dialog box opens.</p> <p>2.&nbsp;Check the target pool, and click <strong>Confirm</strong>.</p> <p>If you have not yet created a pool, you need to create one before you can make a selection here. You can also create a server resource pool before you select one for a listener. For more information about creating a pool, see Create a Pool.</p> </td> </tr> </tbody> </table> <p><strong>Advanced configuration</strong></p> <table border="1" cellpadding="0" cellspacing="0" style="width:0px"> <tbody> <tr> <td style="background-color:#ededed; width:225px"> <p><strong>Configuration item</strong></p> </td> <td style="background-color:#ededed; vertical-align:top; width:556px"> <p><strong>Description</strong></p> </td> </tr> <tr> <td style="width:225px"> <p>Request header</p> </td> <td style="vertical-align:top; width:556px"> <p>By default, the client IP address is obtained through the X-Forwarded-For header field, and the ELB virtual service protocol is obtained through the X-Forwarded-Proto header field. Users do not need to do any operations.</p> </td> </tr> <tr> <td style="width:225px"> <p>Session persistence</p> </td> <td style="vertical-align:top; width:556px"> <p>You can choose to turn on or off the session persistence function. After you turn on the session persistence function, requests belonging to the same session will be forwarded to the same host for processing.</p> <p>If you choose to turn on the session persistence, you need to select COOKIE or SOURCE_ADDRESS as the session persistence method. If you select the COOKIE method, the user identity is determined by the session persistence value in the cookie carried by the HTTP/HTTPS request. If you select the SOURCE_ADDRESS method, the user identity is determined by the source address hash algorithm.</p> </td> </tr> <tr> <td style="width:225px"> <p>Access control</p> </td> <td style="vertical-align:top; width:556px"> <p>You can choose to turn on or off the access control function. After you turn on the access control function, you can control the access permission of the specified IP address to ELB.</p> <p>If you turn on the access control function, you need to select the created access control policy group or create a new access control policy group and select the access control mode. The access control policy group includes one or more IP addresses. The access control mode includes <strong>Whitelist</strong> and <strong>Blacklist</strong>. It decides whether to allow or deny the IP addresses in the policy group to access the ELB instance.</p> </td> </tr> <tr> <td style="width:225px"> <p>Gzip</p> </td> <td style="vertical-align:top; width:556px"> <p>You can choose to turn on or off Gzip data compression function. If you turn on the Gzip data compression, the access content above 1 K will be compressed, which will speed up the data transmission speed.</p> </td> </tr> <tr> <td style="width:225px"> <p>Connect idle timeout</p> </td> <td style="vertical-align:top; width:556px"> <p>Set the idle timeout connection. During this time, if the connection has been idle, ELB will interrupt the current connection until the next request to temporarily re-establish a new connection. It is 65 seconds by default. The value range is [1, 120] seconds.</p> </td> </tr> <tr> <td style="width:225px"> <p>Connection create timeout</p> </td> <td style="vertical-align:top; width:556px"> <p>Set the timeout period for establishing a connection. It means that how long the session will be disconnected if it is not established. It is 60 seconds by default. The value range is [10, 180] seconds.</p> </td> </tr> <tr> <td style="width:225px"> <p>Response interval timeout</p> </td> <td style="vertical-align:top; width:556px"> <p>Set the response interval timeout. During the timeout period between the two responses, if the back-end server has not sent the response content, the connection is disconnected. It is 60 seconds by default. The value range is [1, 180] seconds.</p> </td> </tr> <tr> <td style="width:225px"> <p>Request interval timeout</p> </td> <td style="vertical-align:top; width:556px"> <p>Set the request interval timeout. During the timeout period between the two requests, the back-end server has not received the request, the connection is disconnected. It is 60 seconds by default. The value range is [1, 180] seconds.</p> </td> </tr> </tbody> </table> <p>3.&nbsp;&nbsp;&nbsp;&nbsp; Click<strong> Next</strong> and configure the health check information of the listener as described in the following table:</p> <p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201607134306-11d7d73f9615.png" style="height:512px; width:830px" /></p> <p><strong>Health check</strong></p> <table border="1" cellpadding="0" cellspacing="0" style="width:0px"> <tbody> <tr> <td style="background-color:#ededed; width:217px"> <p><strong>Configuration item</strong></p> </td> <td style="background-color:#ededed; vertical-align:top; width:564px"> <p><strong>Description</strong></p> </td> </tr> <tr> <td style="width:217px"> <p>Health check</p> </td> <td style="vertical-align:top; width:564px"> <p>You can choose to turn on or off the health check function. If you turn on the health check function, the ELB service will check the health status of the hosts in the server resource pool. If the ELB service finds that there is a problem with a host, it will forward the request to other normal hosts. When the host returns to normal, the ELB service will resend the request to the host.</p> <p>After you turn on the health check function, you need to configure the following parameters.</p> </td> </tr> <tr> <td style="width:217px"> <p>Protocol</p> </td> <td style="vertical-align:top; width:564px"> <p>Select the protocol for health check. The check method available here includes HTTP and TCP.</p> </td> </tr> <tr> <td style="width:217px"> <p>Path</p> </td> <td style="vertical-align:top; width:564px"> <p>If the check method is HTTP, you need to enter the URL path for health check. Make sure that the path can be accessed normally.</p> </td> </tr> <tr> <td style="width:217px"> <p>Interval</p> </td> <td style="vertical-align:top; width:564px"> <p>Set the time interval between two health checks. The value range is [5, 300] seconds.</p> </td> </tr> <tr> <td style="width:217px"> <p>Timeout</p> </td> <td style="vertical-align:top; width:564px"> <p>Set the maximum timeout period for each health check response. The value range is [2, 60] seconds. During the health check, if the hosts in the server resource pool do not respond correctly within this period of time, the health check will fail.</p> </td> </tr> <tr> <td style="width:217px"> <p>Frequency threshold</p> </td> <td style="vertical-align:top; width:564px"> <p>Set the number of consecutive health checks to determine the health status of the host. The value range is [2, 10] times. If the frequency threshold is set to 3, and if the host is determined to be healthy after three times of successive successful the health check result is received three times in succession, the host is determined to be healthy, and the host is determined to be unhealthy If the health check result is received three times in succession, the host is determined after three times of successive failed health check.</p> </td> </tr> </tbody> </table> <p>4.&nbsp;&nbsp;&nbsp;&nbsp; Click <strong>Create</strong>, and you will see an <strong>Operation succeeded</strong> message at the bottom of the page.</p>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products