Nike-Inc / hal

hal provides an AWS Lambda Custom Runtime environment for your Haskell applications.
BSD 3-Clause "New" or "Revised" License
241 stars 13 forks source link

Use an explicit manager to eliminate request timeouts #63

Closed IamfromSpace closed 4 years ago

IamfromSpace commented 4 years ago

HTTP Simple uses a global immutable manager with a 30s request timeout. This makes good sense for a simple interface with sensible defaults, but timeouts don't make sense in a lambda context (the container will be frozen indefinitely) and causes unneeded churn and errors.

We also add some other reasonable manager settings like no proxy to prevent incorrect behavior based on global config and limiting maximum connections to ensure re-use and a light footprint.