This article is a mirror article of machine translation, please click here to jump to the original article.

View: 4050|Reply: 0

Alibaba Cloud SLB Load Balancing 503 Error Resolution

[Copy link]
Posted on 1/7/2023 10:41:06 PM | | | |
Recently, when I used a browser to access this site, I tried to refresh it a few more times, and it would get a 503 error, as shown in the figure below:




503 Service Temporarily Unavailable
Meanwhile, the response header is as follows:

content-length: 608
content-type: text/html
date: Sat, 07 Jan 2023 13:50:32 GMT
via: HTTP/2.0 SLB.205
503 Service Temporarily Unavailable error


503 is an HTTP status code due to temporaryServer maintenance oroverload, the server is currently unable to process the request. This condition is temporary and will be restored after some time.

Generally speaking, the 503 error is mostly due toHigh website traffic, resulting in an error caused by excessive traffic or a large number of concurrent resources.


via response header

We see it in the 503 responsevia: HTTP/2.0 SLB.205The response header information, regarding the via response header, is explained as follows:

Via

Lists which proxy servers the response from the client to OCS or vice versa, and what protocol (and version) they sent the request with.

When the next proxy server receives the request from the first proxy server, it will copy the Via header of the previous proxy server's request in its own request, and add its relevant information to the back, and so on, when OCS receives the request from the last proxy server, it checks the Via header to know the route through which the request passes. For example: Via:1.0 236-81.D07071953.sina.com.cn:80 (squid/2.6.STABLE13)
Based on the description, we can roughly guess that it isThe SLB (load balancing) service returned a 503 error directlyThat is, the request did not reach the real server on our backend, and the request was directly responded to by Alibaba Cloud SLB (Load Balancing) to the user.

At this time, I suddenly thought that Alibaba Cloud's SLB (load balancing) service has different specifications, and different specifications also have different concurrency limits, taking the simple type I (slb.s1.small) as an example.The maximum number of connections supported by this specification is 5000, new connections (CPS): 3000, and queries per second (QPS): 1000。 As shown below:



Solution:Upgrading SLB configurations!! Upgrading SLB configurations!! Upgrading SLB configurations!!

Regarding looking at SLB (load balancing) monitoring, it can be seen that it has exceeded the specification limit.

SLB configuration SSL will enable http/2.0 by default, because http2.0 will reuse TCP connections, and after a TCP connection is established, it will only be loaded on one node of SLB

The configuration of the performance-guaranteed slb.s1.small is as follows: Number of connections: 5000, CPS: 3000, QPS: 1000

The QPS of this specification is 1000, but the QPS of a single node of SLB is 1000/(8-1), the seventh layer is 8 nodes, and the QPS of a single node is around 142. http/2.0 is placed on the backend to configure

You can refer to ithttps://help.aliyun.com/knowledge_detail/55193.htmlexplanation of why each connection does not reach bandwidth peaks; The two are the same reason
Resources:


The hyperlink login is visible.
The hyperlink login is visible.





Previous:.NET/C# uses Redis to implement the Bloom algorithm based on BitMap
Next:【Practical Action】Use Docker to build a Gitlab private repository
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com