pwrdrvr/lambda-dispatch

Extension - Use connection pool for HTTP2 router connections

huntharo opened this issue · 0 comments

Motivations

  • Pertains to:
    • Cases where there is a single or few routers
    • Cases where there are very fast requests
  • Saves 2-4 ms on very short requests by re-using an existing connection to the router when the next Lambda invoke asks to connect back to the same router

Acceptance Criteria

  • Accomplish all of the below using the Hyper Client with connection pool
    • Keep info about which Router IP the connection is to
    • Keep info on when the connection was last used
    • Do not try to reuse the connection if 60 seconds or more have passed
    • If the initial request on the reused connection fails, establish a new connection instead
  • Ensure that no delay remains enabled
  • Ensure that TLS with invalid certs and non-TLS remain supported
  • Add some TLS tests for router channels
  • Review FIXME comments related to exiting a channel on a single error