2

I have 2 kinds of requests to access my server: one is slow (30s) and the other is fast (3s). However, the faster one often works too slowly as the result of httpc reusing a connection created by the slower one (HTTP1.1 Keep-Alive). I tried setting the options of httpc as below:

httpc:set_options([{max_sessions, 100}, {max_keep_alive_length, 1}])

But it doesn't work perfectly, as the rate of the requests is still too low. Any ideas how I might get around this problem?

Steve Vinoski
  • 19,847
  • 3
  • 31
  • 46
CenAlpha
  • 21
  • 1
  • I've not been able to reproduce this problem. Are you sure your server can handle concurrent requests for your application? If the server is busy carrying out the 30 second task and won't handle any new requests in the meantime, there's nothing the client can do. Maybe there's more information about your client setup, server, and Erlang/OTP version you can provide? – Steve Vinoski Jun 16 '20 at 12:06

0 Answers0