Comments (7)
I marked it as pick next so we can discuss it in depth some more.
from akka-http.
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.
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.
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.
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.
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.
Bumping by public demand.
from akka-http.
Related Issues (20)
- Cannot Unmarshall Seq[String] Outside HOT 1
- Release 10.6.0-M1
- Release 10.6.0-M2
- CVE-2023-44487 HOT 3
- Release 10.5.3
- Release 10.6.0
- Failed: Http2ClientSpec should send RST_STREAM if entity stream is canceled HOT 2
- Failed: Http2ServerSpec send RST_STREAM if entity stream is canceled
- Remove dependency on `sbt-dependency-graph` HOT 1
- Release 10.6.1
- Failed: Native image tests HOT 1
- SSE (and maybe more) marshalling/unmarshalling require classic system HOT 1
- fail: CI is failing to publish docs HOT 2
- The akka.http.cors package is not exist HOT 1
- Release 10.6.2
- failed: JwtDirectivesSpec HOT 4
- Failed: OutOfMemoryError HOT 1
- Release 10.6.3 HOT 1
- Explicit typed actor system to Http.apply does not compile on Scala 3
- `Content-Disposition` header parsing for `form-data` doesn't follow RFC7578 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akka-http.