Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delay on AMQP 0-9-1 basic.get_empty response #12249

Closed
LoisSotoLopez opened this issue Sep 9, 2024 · 1 comment
Closed

Add delay on AMQP 0-9-1 basic.get_empty response #12249

LoisSotoLopez opened this issue Sep 9, 2024 · 1 comment

Comments

@LoisSotoLopez
Copy link
Contributor

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.

@michaelklishin
Copy link
Member

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 basic.get entirely instead? This would be the right thing to do if you ask me.

@michaelklishin michaelklishin changed the title Add delay on AMQP basic.get_empty response Add delay on AMQP 0-9-1 basic.get_empty response Sep 9, 2024
@rabbitmq rabbitmq locked and limited conversation to collaborators Sep 9, 2024
@michaelklishin michaelklishin converted this issue into discussion #12255 Sep 9, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants