Skip to content

Commit b4fc4d1

Browse files
emmaling27Convex, Inc.
authored andcommitted
Improve funrun load balancing by making the client remember which funrun upstreams are saturated (#41681)
GitOrigin-RevId: ecb7580e911da4a51d353b1f53e0ab94445094b1
1 parent 4094c12 commit b4fc4d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/common/src/knobs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,11 @@ pub static FUNRUN_SCHEDULER_MAX_PERCENT_PER_CLIENT: LazyLock<usize> =
10161016
pub static FUNRUN_CLUSTER_NAME: LazyLock<String> =
10171017
LazyLock::new(|| env_config("FUNRUN_CLUSTER_NAME", String::from("funrun-default")));
10181018

1019+
/// The amount of time for clients to stop sending requests to a saturated
1020+
/// upstream for
1021+
pub static UPSTREAM_SATURATION_TTL: LazyLock<Duration> =
1022+
LazyLock::new(|| Duration::from_secs(env_config("UPSTREAM_SATURATION_TTL_SECS", 600)));
1023+
10191024
/// Name of the service to discover for when connecting to Searchlight. (e.g.
10201025
/// searchlight-default, searchlight-staging, etc.)
10211026
// cluster is created.

0 commit comments

Comments
 (0)