Skip to content

Adding timeout support to Proxy connection #83

@mooyoul

Description

@mooyoul

Hello @szmarczak, First of all. I want to say "THANK YOU" - got helped me A LOT and it is fantastic. I really love it. got has a way better timeouts than axios (their timeout handling is broken - PR / Issue), and it has built-in retry support.

Anyway, I've configured H2 over HTTP proxy and just noticed some requests took super long time to fail, or stuck forever.

After some investigation, I noticed that proxy connection can be stuck (or stuck forever) in following cases:

  • ClientRequest of CONNECT method never emit connect event
  • ClientRequest of CONNECT method emitted connect event, but session never created or took long time (~20sec)

this might be edge case because:

  • Long RTT: Origin server is located in Seoul, South Korea and Proxy Peer is located in US
  • Residential Proxy: It is a residential proxy, not a Datacenter Proxy. Some proxy peers has poor network quality.
  • Time-limited, stateless environment: Application is running in AWS Lambda

So, It would be nice if we can handle these situations by supporting timeout to proxy connection.
There might be another way to setting timeouts (or accessing to connection), If so, please let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions