Discussion:
:connection-timeout http request cancellation
bplatz
2016-03-23 19:09:44 UTC
Permalink
Hi,

I'm utilizing :connection-timeout on an http request, and when that request
times out, I'll try to reconnect up to n times.

I've noticed that when the service can connect, every request (all n) go
through.

If this is the intended behavior, is there a way to truly cancel the
requests that get timed out? While my requests are idempotent, I'm trying
to eliminate unnecessary load on the target.

Thanks!

-Brian
--
You received this message because you are subscribed to the Google Groups "Aleph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aleph-lib+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Zach Tellman
2016-03-28 17:24:00 UTC
Permalink
Hi Brian,

Aleph uses a connection pool, and will reuse successful connections where
possible. If you'd like to avoid this, you can define a pool with
{:connection-options {:keep-alive? false}}, and use it via :pool in each
request. The :connection-timeout is different than the :request-timeout,
though, maybe you meant to use that?

Zach
Post by bplatz
Hi,
I'm utilizing :connection-timeout on an http request, and when that
request times out, I'll try to reconnect up to n times.
I've noticed that when the service can connect, every request (all n) go
through.
If this is the intended behavior, is there a way to truly cancel the
requests that get timed out? While my requests are idempotent, I'm trying
to eliminate unnecessary load on the target.
Thanks!
-Brian
--
You received this message because you are subscribed to the Google Groups "Aleph" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Aleph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aleph-lib+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...