Limiting the rate of calls made to API services can make operations more reliable and reduce the incidence of orphaned objects during high load.
If a client exceeds the rate limit, it receives an HTTP 429 Too Many Requests response. The Retry-After
header in the response indicates how long the client must wait before making further calls.
You can enable rate limiting by service. For example, you might want to throttle Nova API service calls more tightly than Neutron API service calls.
Procedure
Example: Limiting Calls to the Neutron Public API
The following configuration limits calls to the Neutron public API. If a single source IP address sends more than 50 requests to the Neutron public API in a 10 second period, the load balancers will return HTTP 429 errors to all subsequent requests from that source address for a period of 60 seconds. After 60 seconds have passed, the source address can resume sending requests to the Neutron public API.
haproxy_throttle_period: 60 haproxy_neutron_max_requests: 50 haproxy_neutron_request_period: 10