ConstantSpeculativeExecutionPolicy retries a query after a fixed delay, up to a configured number of reattempts. The driver returns whichever request finishes first, reducing the impact of a slow request. section 10.5.3
Configure the policy by choosing:
- A retry interval: the time Scylla waits before starting another request. section 10.5.3
- A maximum number of reattempts: the limit on speculative requests. section 10.5.3
- An execution profile: the policy is attached there alongside load-balancing configuration. section 10.5.3
Reviews application configuration
A small reviews application uses a 0.1-second interval and two maximum speculative attempts. It applies the policy to idempotent queries such as retrieving authors and articles. Aggressive settings can create unnecessary duplicate work, so the retry interval should be chosen from query performance data; the 99.9th-percentile latency is suggested as a starting point. section 10.5.3
