Add delay on AMQP 0-9-1 basic.get_empty
response
#12255
Unanswered
LoisSotoLopez
asked this question in
Other
Replies: 1 comment
-
So we need to bastardize RabbitMQ one more time in order to avoid catastrophically bad application-level decisions we are not responsible for. How about a mechanism to disable |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
We would like to have a mechanism for delying the response of
basic.get_empty
messages.Developers o client applications may implement polling loops that just consume from a queue using
basic.get
AMQP message, process the response and execute the next iteration.When the consumed queue is empty, those loop iterations may execute too quickly, issuing an excessive number of requests and increasing the CPU usage on the server.
This is of course a bad practice, but still happens.
Describe the solution you'd like
Similarly to what is done to prevent DOS due to repeated failed logins from a client (PRs here and here) we wanted to suggest some similar mechanism to mitigate the effect of
basic.get
client tight loops.A configurable delay, defaulting to 0, could be added before responding with a
basic.get_empty
message.Describe alternatives you've considered
No response
Additional context
If limit-based events (#11207) get implemented we could use them to detect situations subject of causing a DOS, like the one described above.
Beta Was this translation helpful? Give feedback.
All reactions