[erlang-questions] Erlang HTTP client libraries- pros/cons

Loïc Hoguin essen@REDACTED
Thu Aug 31 11:41:42 CEST 2017


On 08/30/2017 10:30 PM, Derek Brown wrote:
> Looking for thoughts on the various Erlang HTTP client libraries, for a 
> use case involving, say, 3000-5000 calls per second (from my server, as 
> a client, to HTTP servers). I'm thinking of httpc, Gun, Hackney, any 
> others... Performance, reliability, other pros/cons. Involves both GET 
> and POST requests, with a hard roundtrip timeout of ~100 ms. Thanks for 
> any thoughts.

Gun is not a general purpose client, it is made exclusively for long 
running connections (for example, connect when the node starts, and stay 
connected forever). It requires a lot more setup efforts than others 
because of this (pooling, circuit breakers and other are for you to do). 
Sameroom.io is an example service using it.

Regardless of clients, I would recommend using HTTP/2 as much as 
possible if performance is a concern and you're doing more than one 
request per connection. The gains are really significant.

-- 
Loïc Hoguin
https://ninenines.eu



More information about the erlang-questions mailing list