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 consuming receive buffers when blocked by queue #211

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

Commits on Feb 25, 2023

  1. avoid consuming receive buffers when blocked by queue

    By disabling auto-read and triggering reads when a channel becomes active
    or when the previous read on a channel has completed, we avoid pulling bytes
    out of our TCP receive buffer prematurely, which allows the normal mechanisms
    of TCP back-pressure to work as expected.
    
    When auto-read enabled, an input experiencing back-pressure from the
    pipeline's queue would effectively avoid propagating that back-pressure
    by continuing to transfer bytes from the receive buffer into effectively
    unlimited direct memory buffers until it reached netty's memory allocation
    limit or an OOM was reached by allocating more memory than was available.
    
    It is likely that disabling auto-read will have some negative effect on
    throughput with the default-size receive buffers, and that we will also
    need to tune these or provide a way to make them user-tunable.
    yaauie committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    176611a View commit details
    Browse the repository at this point in the history