Internal dispatcher to protect against starvation (#26816)
* Allow for dispatcher aliases and define a internal dispatcher * Test checking dispatcher name * MiMa for Dispatchers * Migration guide entry * No need to have custom dispatcher lookup logic in streams anymore * Default dispatcher size and migration note about that * Test checking exact config values... * Typed receptionist on internal dispatcher * All internal usages of system.dispatcher gone through
This commit is contained in:
parent
e34a711adf
commit
81b1e2ef9b
57 changed files with 524 additions and 329 deletions
|
|
@ -877,37 +877,10 @@ akka.cluster.log-info-verbose = on
|
|||
<a id="cluster-dispatcher"></a>
|
||||
### Cluster Dispatcher
|
||||
|
||||
Under the hood the cluster extension is implemented with actors and it can be necessary
|
||||
to create a bulkhead for those actors to avoid disturbance from other actors. Especially
|
||||
the heartbeating actors that is used for failure detection can generate false positives
|
||||
if they are not given a chance to run at regular intervals.
|
||||
For this purpose you can define a separate dispatcher to be used for the cluster actors:
|
||||
|
||||
```
|
||||
akka.cluster.use-dispatcher = cluster-dispatcher
|
||||
|
||||
cluster-dispatcher {
|
||||
type = "Dispatcher"
|
||||
executor = "fork-join-executor"
|
||||
fork-join-executor {
|
||||
parallelism-min = 2
|
||||
parallelism-max = 4
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@@ note
|
||||
|
||||
Normally it should not be necessary to configure a separate dispatcher for the Cluster.
|
||||
The default-dispatcher should be sufficient for performing the Cluster tasks, i.e. `akka.cluster.use-dispatcher`
|
||||
should not be changed. If you have Cluster related problems when using the default-dispatcher that is typically an
|
||||
indication that you are running blocking or CPU intensive actors/tasks on the default-dispatcher.
|
||||
Use dedicated dispatchers for such actors/tasks instead of running them on the default-dispatcher,
|
||||
because that may starve system internal tasks.
|
||||
Related config properties: `akka.cluster.use-dispatcher = akka.cluster.cluster-dispatcher`.
|
||||
Corresponding default values: `akka.cluster.use-dispatcher =`.
|
||||
|
||||
@@@
|
||||
Under the hood the cluster extension is implemented with actors. To protect them against
|
||||
disturbance from user actors they are by default run on the internal dispatcher configured
|
||||
under `akka.actor.internal-dispatcher`. The cluster actors can potentially be isolated even
|
||||
further onto their own dispatcher using the setting `akka.cluster.use-dispatcher`.
|
||||
|
||||
### Configuration Compatibility Check
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue