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

Add TCP_KEEPALIVE option to http provider #24967

Merged
merged 1 commit into from
Jul 12, 2022

Commits on Jul 12, 2022

  1. Add TCP_KEEPALIVE option to http provider

    Enabling TCP_KEEPALIVE allows to keep the idle connections opened
    when there are firewalls in-betweeen that close such connections.
    
    TCP_KEEPALIVE sends a "no-data" packet regularly (and expects
    ACK from the server). This should not be mistaken with Python
    requests "keep alive" feature - which reuses opened HTTP connections
    if you perform several requests to the same server (both are named
    keep alive but they both mean two completely different things and
    are implemented at differen layers of the OSI network stack. The
    Requests Keep Alive is Layer 7 (application) and TCP Keep Alive
    is at Layer 4 (transport).
    
    The "Requests" keep alive is enabled by default in the requests
    library while the TCP Keep Alive requires a TCPKeepAliveAdapter
    to be used (from requests_toolbelt library).
    
    Fixes: apache#21365
    potiuk committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    f0af3d4 View commit details
    Browse the repository at this point in the history