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

Backend connection queue #4030

Merged
merged 13 commits into from
Jul 15, 2024

Commits on Jul 9, 2024

  1. backend: queue tasks when no connections available

    This patch allows a task to be queued when a backend reaches its
    max_connections.  The task will queue on the backend and wait for a
    connection to become availble, rather than immediately failing.
    
    This initial commit just adds the basic functionality.  It temporarily
    uses the connect_timeout as the queue wait time, until new parameters
    are added in followup effort.
    drodden authored and walid-git committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    2aba785 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. backend: add backend wait queue parameters

    The following parameters have been added:
        the amount of time a task will wait.
        the maximum number of tasks that can wait.
    
        - global parameters:
            backend_wait_timeout  (default 0.0)
            backend_wait_limit    (default 0)
    
        - those parameters can be overridden in the backend:
            backend foo {
                .host = "bar.com";
                .wait_timeout = 3s;
                .wait_limit = 10;
            }
    
    The backend wait queue capability is off by default and must be
    enabled by setting both of the new parameters defined above.
    
    Note that this makes an ABI breaking change.
    drodden authored and walid-git committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    6e2d644 View commit details
    Browse the repository at this point in the history
  2. backend: add main counters for backend queue

    These counters were added to main:
    backend_wait - count of tasks that waited in queue for a connection.
    backend_wait_fail - count of tasks that waited in queue but did not
        get a connection (timed out).
    drodden authored and walid-git committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    9613fc9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5416dd3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8c88643 View commit details
    Browse the repository at this point in the history
  5. Add changelog

    drodden authored and walid-git committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    9027054 View commit details
    Browse the repository at this point in the history
  6. backend: Move cw_list and cw_cond to stack

    As suggested by Nils
    walid-git committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    1eb443c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5f89a11 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fbfb9f1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2240e8c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b80d21b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1397b45 View commit details
    Browse the repository at this point in the history
  12. cache_backend: Re-check that BE is still busy after wakeup

    This makes sure that we won't abort a backend connection
    attempt if the backend can take it. It covers for any
    potential missing connwait_signal call.
    walid-git committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    171b6b7 View commit details
    Browse the repository at this point in the history