I think a better approach, rather than reacting to the server not responding, is to implement request limits. It's better to proactively reject requests before you become overloaded than to let yourself become overloaded and let every request be impacted. Currently we don't support this. There are two limits we could implement, one is a connection limit, when the number of connections exceeds a certain limit, we can stop accepting them. This is actually really quite straight forward, we're already using reactive streams to accept connections, instead of doing a foreach to accept them, we could do a mapAsyncUnordered with the parallelism set to the connection limit, and return a future that is redeemed when the connection is closed.
The second limit would be an outstanding request limit. This can be implemented with a shared AtomicLong in the Netty request handler that gets incremented and decremented for each request, and once the limit is exceeded, start returning 503 errors.
--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think a better approach, rather than reacting to the server not responding, is to implement request limits.
one is a connection limit, when the number of connections exceeds a certain limit, we can stop accepting them
second limit would be an outstanding request limit
It's better to proactively reject requests before you become overloaded than to let yourself become overloaded and let every request be impacted.
hmm.. your change introduces mutability to a previously immutable class, which is probably not going to be accepted.
TCP is a stateful protocol. And I wish to access that state. Fits the problem domain.
HTTP communication usually takes place over TCP/IP connections. The default port is TCP 80 [19], but other ports can be used. This does not preclude HTTP from being implemented on top of any other protocol on the Internet, or on other networks.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.