You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We set wait_for_initialization to 120s as a conservative estimate of how long to wait for the client to connect. In production we've observed init taking as long as 25s, so this seemed like a reasonable time. We're now getting warnings from the client.
Two minor requests:
(a) It would have been nice for this to be documented in the API
(b) Can you expand on why we shouldn't wait for longer? For us LD is on the critical path and if we cannot initialize we need to fallback to an offline mode which we would rather avoid.
For completeness, repro is:
let initialized = client.wait_for_initialization(std::time::Duration::from_secs(120)).await;
The text was updated successfully, but these errors were encountered:
(a) It would have been nice for this to be documented in the API
I can raise this issue and work to get some clarification in the documentation. Can you tell me where you think it would be best for us to document this behavior? Would you expect something in the rust docs, the changelog, or on https://docs.launchdarkly.com?
(b) Can you expand on why we shouldn't wait for longer? For us LD is on the critical path and if we cannot initialize we need to fallback to an offline mode which we would rather avoid.
LaunchDarkly SDKs are designed to return evaluation results even if a connection cannot be established with the upstream APIs. During that time, the SDK will return the default_value parameter provided at the variation callsites. Meanwhile, the SDK will continue attempting to connect with LaunchDarkly to finish receiving the payload.
This is why we don't recommend completely blocking your application's ability to serve requests just because we can't connected upstream. You can still serve requests and use the default value.
But you certainly CAN wait longer than the prescribed 60 seconds, as this is just a recommendation from us.
Small nit/documentation question.
We set
wait_for_initialization
to 120s as a conservative estimate of how long to wait for the client to connect. In production we've observed init taking as long as 25s, so this seemed like a reasonable time. We're now getting warnings from the client.Two minor requests:
(a) It would have been nice for this to be documented in the API
(b) Can you expand on why we shouldn't wait for longer? For us LD is on the critical path and if we cannot initialize we need to fallback to an offline mode which we would rather avoid.
For completeness, repro is:
The text was updated successfully, but these errors were encountered: