Tuning Orleans table liveness for maximum availability
Looking at this: http://dotnet.github.io/orleans/Documentation/Runtime-Implementation-Details/Cluster-Management.html#configuration
It looks like the defaults for some liveness configurations are really high, Like:
ProbeTimeout - The number of seconds to probe other silos for their liveness or for the silo to send "I am alive" heartbeat messages about itself. Default is 10 seconds.
We have a realtime system where 10 seconds of not knowing a silo is dead and getting errors is not something we can live with.
How would you recommend configuring liveness for MAXIMUM availability? Would appreciate specific suggestions for values, adding the keys here for convenience:
-
ProbeTimeout - The number of seconds to probe other silos for their liveness or for the silo to send "I am alive" heartbeat messages about itself. Default is 10 seconds.
-
TableRefreshTimeout - The number of seconds to fetch updates from the membership table. Default is 60 seconds.
-
DeathVoteExpirationTimeout - Expiration time in seconds for death vote in the membership table. Default is 120 seconds
-
NumMissedProbesLimit - The number of missed "I am alive" heartbeat messages from a silo or number of un-replied probes that lead to suspecting this silo as dead. Default is 3.
-
NumProbedSilos - The number of silos each silo probes for liveness. Default is 3.
-
NumVotesForDeathDeclaration - The number of non-expired votes that are needed to declare some silo as dead (should be at most NumMissedProbesLimit). Default is 2.
-
UseLivenessGossip - Whether to use the gossip optimization to speed up spreading liveness information. Default is true.
-
IAmAliveTablePublishTimeout - The number of seconds to periodically write in the membership table that this silo is alive. Used only for diagnostics. Default is 5 minutes.
-
NumMissedTableIAmAliveLimit - The number of missed "I am alive" updates in the table from a silo that causes warning to be logged. Does not impact the liveness protocol. Default is 2.
-
MaxJoinAttemptTime - The number of seconds to attempt to join a cluster of silos before giving up. Default is 5 minutes.
-
ExpectedClusterSize - The expected size of a cluster. Need not be very accurate, can be an overestimate. Used to tune the exponential backoff algorithm of retries to write to Azure table. Default is 20.
I would advise decrease ProbeTimeout and TableRefreshTimeout to an extend that your service can live with. Can you explain more on what availability is your service can live with.
Basically when a silo is dead and Orleans doesn't know about it a lot of things time out, I set them both on 1 second and it seems to do the trick. Thanks.