Skip to content

Commit 2976a5e

Browse files
committed
Update configuration documentation to describe the usage of STREAMING_DELAY_SECONDS
1 parent 908e57d commit 2976a5e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ For **Duration** settings, the value should be be an integer followed by `ms`, `
6565
| `logLevel` | `LOG_LEVEL` | String | `info` | Should be `debug`, `info`, `warn`, `error`, or `none`. To learn more, read [Logging](./logging.md). |
6666
| `bigSegmentsStaleAsDegraded` | `BIG_SEGMENTS_STALE_AS_DEGRADED` | Boolean | `false` | Indicates if environments should be considered degraded if Big Segments are not fully synchronized. |
6767
| `bigSegmentsStaleThreshold` | `BIG_SEGMENTS_STALE_THRESHOLD` | Duration | `5m` | Indicates how long until Big Segments should be considered stale. |
68+
| n/a | `STREAMING_DELAY_SECONDS` | Number | `0` | The minimum number of seconds before responding to a new client connection. Used only in proxy mode for streaming clients. Useful for reducing memory when under heavy load, as many clients can share a single data fetch. Maximum value is 60. |
6869

6970
_(1)_ The default values for `streamUri`, `baseUri`, and `clientSideBaseUri` are `https://stream.launchdarkly.com`, `https://sdk.launchdarkly.com`, and `https://clientsdk.launchdarkly.com`, respectively. You should never need to change these URIs unless you are either using a special instance of the LaunchDarkly service, in which case Support will tell you how to set them, or you are accessing LaunchDarkly using a reverse proxy or some other mechanism that rewrites URLs.
7071

internal/streams/stream_provider_server_side.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ func (r *serverSideEnvStreamRepository) getReplayEvent() (eventsource.Event, err
134134
event := MakeServerSidePutEvent(allData)
135135
// So we sleep for a bit to allow a bunch of concurrent calls to
136136
// all make use of this same flightGroup.
137-
delayS := os.Getenv("LD_STREAMING_DELAY_SECONDS")
137+
delayS := os.Getenv("STREAMING_DELAY_SECONDS")
138138
if delay, err := strconv.Atoi(delayS); err == nil {
139139
if delay > 0 && delay <= 60 {
140140
time.Sleep(time.Duration(delay)*time.Second - time.Since(start))
141141
} else {
142-
r.loggers.Warnf("Ignoring invalid value for LD_STREAMING_DELAY_SECONDS: %s", delayS)
142+
r.loggers.Warnf("Ignoring invalid value for STREAMING_DELAY_SECONDS: %s", delayS)
143143
}
144144
}
145145

0 commit comments

Comments
 (0)