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

View: 1|Reply: 0

Consul error report: TooManyRequests: Your IP is issuing too many concurrent...

[Copy link]
Posted on11 seconds ago | | | |
Requirements: When building microservices architecture projects, consul acts as middleware for service registration and discovery. In cases of high concurrency, services first obtain each other's IP addresses and ports through consul, but consul middleware throws too many request exceptions.

Unexpected response, status code TooManyRequests: Your IP is issuing too many concurrent connections, please rate limit your calls

HTTPMaxConnsPerClient

The default value is 200, this parameter is used to limit the number of concurrent TCP connections that a single client IP address can open simultaneously to the Consul Agent's HTTP(S) server.

You can view it via the API interface:http://127.0.0.1:8500/v1/agent/self, as shown in the figure below:



Try to shrink HTTPMaxConnsPerClient to reproduce concurrency issues, with the following startup parameters:

Test code using C#:
As shown below:



In a Linux environment, use nohup to start consul and set up the parameters. The command is as follows:


(End)




Previous:Troubleshooting the NGINX 502 upstream sent too big header
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