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

http: Change free sockets behavior to LIFO from FIFO. #31526

Closed

Commits on Feb 17, 2020

  1. http: Change free sockets behavior to LIFO from FIFO.

    Sockets are added to the free list with .push() but they were
    being removed with .shift().  This meant the sockets where being
    removed in FIFO order, but this changes it to LIFO.  Since older
    sockets may be closed based due to inactivity on the server it is
    more likely that a socket that is recently used will be able to
    successfully process the next request.
    
    Rather than destroying the last used socket destroy
    the oldest socket in the free list in push() on the
    last recently used socket.
    rustyconover committed Feb 17, 2020
    Configuration menu
    Copy the full SHA
    5af8b39 View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2020

  1. test: Add test http agent keepalive LIFO behavior

    Add a test that ensures the HTTP agent reuses sockets
    in a LIFO fashion rather than FIFO.
    rustyconover committed Mar 1, 2020
    Configuration menu
    Copy the full SHA
    b43479f View commit details
    Browse the repository at this point in the history