Skip to content
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

Sleep duration as a config parameter #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dkaminski
Copy link

When a batch read on a list returns no results,
sleep for the specified number of seconds.

@jordansissel
Copy link
Contributor

Thanks for helping improve Logstash!

I am not sure I understand the intended effect of this change. Why would a
user change this value? What is the expected benefit?

On Tue, Nov 22, 2016 at 3:13 PM Dave Kaminski [email protected]
wrote:

When a batch read on a list returns no results,

sleep for the specified number of seconds.

You can view, comment on, or merge this pull request online at:

#53
Commit Summary

  • Sleep duration as a config parameter

File Changes

Patch Links:

https://github.com/logstash-plugins/logstash-input-redis/pull/53.patch


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#53, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIC6i9bZJ3LW0c0SuNT_lm5vYsq1zwvks5rA3cJgaJpZM4K6DkO
.

@dkaminski
Copy link
Author

The intent is to throttle the polling loop when a Redis list is empty and infrequently populated. I have a Logstash installation that reads a Redis list, but I do not control the service that writes to the list (so I cannot switch to pub-sub). The writes have become infrequent and I would like to have the ability to poll less often.

Also, I could work on rewriting the failing timing test if you feel that this has a chance of being accepted.

@jordansissel
Copy link
Contributor

I would prefer if users didn't need to configure this kind of thing. Configuring the delay seems like a workaround for a bug.

In terms of implementation, if we still need this kind of thing, my preference would be to add a mechanism within the plugin to automatically switch to BLPOP if the data rate is slow enough. This would have the same benefit (if any?) of increasing the polling interval while avoiding adding a new configuration setting.

That is, instead of sleeping, we call BLPOP and queue that single event?

@dkaminski
Copy link
Author

That's a good point about a dynamic switch to BLPOP. For the time being though I am going to work on switching my current setup to pub-sub. That is the proper way to handle infrequent or irregular data, correct? That's my intuition but i'm no expert.

Thanks for the thoughts and prompt responses on this. Feel free to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants