[erlang-questions] httpc: connection per request
Matwey V. Kornilov
matwey.kornilov@REDACTED
Sun Jul 31 20:55:49 CEST 2016
Hello,
I use httpc in streaming mode to obtain the data from the remote hosts.
This data are processed in the special manner.
The processing of some stream pairs are depend on each other, i.e. the
processing process simultaneously reads both HTTP responses (there is
huge amount of data in each response, so I use streaming mode).
When the pair is located at the same server I would like to have one
connection per request, because I will easily run into dead lock
otherwise as the following.
The processor read some data from the first response stream and want to
read data from the second in order to make some decision and process
further. But the second request is awaiting until first response
finished inside httpc. But the first response will never be finished
because it is stop to read by processor which want second request
running in parallel.
I would like to have one TCP connection per HTTP request in order not to
deadlock. Is {max_keep_alive_length, 1} sufficient to achieve this?
More information about the erlang-questions
mailing list