HTTP client

We started by using the built-in :httpc module which was a good choice.

Some performance improvements can be made by using HTTP/2 so we switched to the Finch library.

Sidenote (HTTP/2)

Both HTTP/1.1 and HTTP/2 should take into consideration the concurrency setting.

#HTTP/1.1
pool_count * pool_size > concurrency

HTTP/2 multiplexes up to 100 requests in a single connection - therefore the minimum pool_count is:

#HTTP/2
min_pool_count = concurrency / 100

The following formula is a good starting point for experimentation.

pool_count = 3 * (concurrency / 100) |> round()