Git Product home page Git Product logo

Comments (7)

ktoso avatar ktoso commented on August 26, 2024 4

I marked it as pick next so we can discuss it in depth some more.

from akka-http.

akka-ci avatar akka-ci commented on August 26, 2024

Comment by ktoso
Tuesday Aug 02, 2016 at 15:08 GMT


Thanks a lot for the write-up!
Will dig deeper into it tomorrow.

from akka-http.

akka-ci avatar akka-ci commented on August 26, 2024

Comment by ktoso
Tuesday Aug 02, 2016 at 15:14 GMT


Now I see what you meant overt there on twitter. So:

4 requests run and then, due to the client failing to process response entities, the program hangs forever. This is a bug in this code -- the response entities must be processed. However, that's not what this ticket is about.

Is (just cross referencing for clarity): akka/akka#18716
So let's not talk about it, as you said.

The super pool API could be made much safer by supporting some form of (optional?) timeouts on requests. For example, if the fifth request hasn't been assigned a host connector within X seconds, fail the response with a timeout exception indicating the pool was too busy.

I see, interesting idea. Rather specialised but perhaps indeed somewhat safer hm.
We have a lot of different timeouts so let's think if adding another one really is the best thing here (though I totally see your point and benefit of this)

If anyone has opinions please chime in cc @jrudolph @2Beaucoup @drewhk

from akka-http.

akka-ci avatar akka-ci commented on August 26, 2024

Comment by drewhk
Wednesday Aug 03, 2016 at 09:45 GMT


Can this be achieved by existing combinators? Attaching a timeout stage to the entitiyBytes that are received?

from akka-http.

akka-ci avatar akka-ci commented on August 26, 2024

Comment by schmitch
Saturday Aug 06, 2016 at 09:42 GMT


From my understanding this is about a "request timeout" not specific to the entity that is given.
So wouldn't that mean that just attaching a timeout stage to the entityBytes would still mean that the request will hang when there is a network failure? actually I guess it will hang until akka timeout is provided but I guess the issue is all about configuring that timeout and apply it to the whole request?

Something like play-ws timeout:
https://www.playframework.com/documentation/2.5.x/ScalaWS#Request-with-timeout
with the only exception that akka-http can provide a timeout when the dns hangs.

So I guess there are 3 stages where a timeout could occur:

  • DNS
  • Connecting to the Server
  • Gathering the Data from the Server to the client

Most people wouldn't want that a request overall will take too much time, so they will fail the whole and maybe retry it or circuit break it.

For instance play-ws has 3 different timeout parameters (globally):

  • connectionTimeout: Duration = 2.minutes
  • idleTimeout: Duration = 2.minutes
  • requestTimeout: Duration = 2.minutes

plus the requestTimeout could be overwritten per request

from akka-http.

jrudolph avatar jrudolph commented on August 26, 2024

There's also another location where time is spent: in the queue. It would be nice if a global and per-request timeout can be set that would prune a request from the queue before it is even dispatched. This would also help reducing load on a pool when requests are already slow.

from akka-http.

ktoso avatar ktoso commented on August 26, 2024

Bumping by public demand.

from akka-http.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.