Request timeouts in Akka HTTP 1.0

513 views
Skip to first unread message

Richard Bradley

unread,
Apr 30, 2015, 4:23:09 AM4/30/15
to akka...@googlegroups.com
Akka HTTP 1.0-RC1 doesn’t have any client or server request timeout functionality built in.
Is this deliberate, or is it a pending feature?

Spray 1.3 had separate settings for server timeouts (i.e. fail the request if the Route didn't provide a timely response) and client timeouts (i.e. fail the future if the remote host doesn't begin answering after a set time). These were controlled by the  “spray.server.request-timeout” and “spray.client.request-timeout” settings, respectively.

Both settings were removed from the code in commit 9d432d64d5.


"Akka HTTP server is scoped with a clear focus on the essential functionality of an HTTP/1.1 server:
  • Connection management
  • Parsing messages and headers
  • Timeout management (for requests and connections)"

... so is this planned for a future release? I couldn't find an issue which tracks it that I could watch.

If the plan is for both server and client timeouts to be the user's responsibility, it might be a good idea to note that in the docs and add some example code on how to implement this?

Thanks very much,


Rich

Mathias Doenitz

unread,
Apr 30, 2015, 5:02:01 AM4/30/15
to akka...@googlegroups.com
Rich,

there is https://github.com/akka/akka/issues/16819 for the server-side request timeout.

For the client-side, we currently don’t have such a ticket.
IIRC we deemed timeouts on 1-on-1 “responses" expected from a stream for a particular data element to be something quite general,
that probably applies to many more use cases than just HTTP requests. As such it should be implemented as a general purpose streaming element in akka-stream
rather than something special-purpose in akka-http.

But since client-side HTTP requests are probably an important first use case I guess we should open a ticket for this timeout streaming stage.

Cheers,
Mathias

---
mat...@spray.io
http://spray.io
> --
> You received this message because you are subscribed to the Google Groups "Akka Developer List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Roland Kuhn

unread,
Apr 30, 2015, 5:50:50 AM4/30/15
to akka-dev

> 30 apr 2015 kl. 11:02 skrev Mathias Doenitz <mat...@spray.io>:
>
> Rich,
>
> there is https://github.com/akka/akka/issues/16819 for the server-side request timeout.
>
> For the client-side, we currently don’t have such a ticket.
> IIRC we deemed timeouts on 1-on-1 “responses" expected from a stream for a particular data element to be something quite general,
> that probably applies to many more use cases than just HTTP requests. As such it should be implemented as a general purpose streaming element in akka-stream
> rather than something special-purpose in akka-http.
>
> But since client-side HTTP requests are probably an important first use case I guess we should open a ticket for this timeout streaming stage.

Yes, that makes a lot of sense to me. Would you please do the honors?

Thanks for raising this,

Roland
Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


Mathias Doenitz

unread,
Apr 30, 2015, 6:06:43 AM4/30/15
to akka...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages