Hi Manuel,

how did you determine that the problem is related to Akka? What did the 
profiling say and where's the bottleneck now?

Answering your questions:

On Friday, April 28, 2017 at 12:10:50 AM UTC+2, Manuel wrote:

I guess that non-blocking code using Futures and work stealing by the 
> fork/join framework are here not sufficient to avoid this kind of problems. 
> I've also tried bigger instances, or a larger cluster, but I always end up 
> with the same starvation problems...


Sounds unlikely. 

>
>    - Can you confirm this situation is possible even with a fully 
>    non-blocking app ? I want to be sure I have done everything that needs to 
>    be done.
>
>
It's unclear what "this situation" is exactly. You can still have 
bottlenecks with a non-blocking app. A bottleneck may just be much less 
visible because all threads might be idle while waiting for an external 
system to deliver data. Every kind of limited shared resource your program 
uses can be become the bottleneck not just the dispatcher:

 * CPU
 * threads
 * connection pools
 * slow external systems

etc.

With blocking code it's often obvious from looking at stack traces what 
might be the problem. In a non-blocking app you will need 1) introspection 
into the shared resources (like DB connection pools) and 2) monitoring / 
tracing to see where requests spends time (Lightbend offers commercial 
features in that direction).

Another thing to keep in mind with asynchronous systems is that work tends 
to queue up in front of the shared resources so you need to think about how 
to deflect requests when there are little resources (queues full, max 
connections reached, etc.).
 

>
>    - Would another type of dispatcher, like "thread-pool-executor", be 
>    preferable here to handle this kind of problem ?
>
> Depends on what the problem is ;)
 

>
>    - What about the parameters *idle-timeout *or *backlog *? Maybe, 
>    without fixing the problems, they would at least make the situation more 
>    acceptable, with limiting the disaster, make it shorter and make the app 
>    recoverable ?
>
>
It's a pretty hard problem how to deal with traffic when overloaded. One 
solution is to benchmark your performance limit and then enforce rate 
limits e.g. using a loadbalancer.

Johannes

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to