Skip to content

Commit 0234fb0

Browse files
committed
docs: add mention about setting the LBP directly on statement
1 parent 306ecea commit 0234fb0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/source/load-balancing/load-balancing.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ awareness enabled and latency-awareness disabled.
3636

3737
## Configuration
3838

39-
Load balancing policies can be configured via execution profiles. In the code
40-
sample provided, a new execution profile is created using
39+
Load balancing policies can be configured in three different ways (sorted by descending precedence):
40+
1. directly on the `Statement`, `PreparedStatement` or `Batch` (`Statement::set_load_balancing_policy()`)
41+
2. execution profile set on the statement (`Statement::set_execution_profile_handle()`)
42+
3. default execution profile set on the session (`SessionBuilder::default_execution_profile_handle()`)
43+
44+
In the code sample provided, a new execution profile is created using
4145
`ExecutionProfile::builder()`, and the load balancing policy is set to the
4246
`DefaultPolicy` using `.load_balancing_policy(policy)`.
4347

0 commit comments

Comments
 (0)