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

Avoid polling in worker #4094

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Avoid polling in worker #4094

wants to merge 2 commits into from

Commits on Jun 26, 2024

  1. Avoid polling in worker

    The polling architecture with 200 ms sleep in ProcessEventMessages()
    has two drawbacks:
    
    - it imposes a rate limit of 5 events per second for any input source
    - it imposes an average latency of 100 ms per event
    
    The polling loop can be avoided using a goroutine per worker that
    posts incoming events to the `messageStream` channel, and pending on
    that channel in ProcessEventMessages().
    
    A short `messageStream` queue guarantees fairness: no worker's latest
    event will be postponed for more than the length of the channel.
    
    Signed-off-by: Jeff Learman <jjlearman@gmail.com>
    jlearman committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    d6fedda View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2024

  1. Configuration menu
    Copy the full SHA
    7757467 View commit details
    Browse the repository at this point in the history