Affected: All SDKs (client-side and server-side) attempting to connect to the Relay Proxy
Symptoms
When attempting to establish a connection between the SDK and the Relay Proxy, you might encounter the following symptoms:
-
Delayed Initialization: The SDK takes an unusually long time to initialize.
-
Unexpected Flag Values: The application utilizes unexpected default values instead of the ones defined in LaunchDarkly.
-
Initialization Errors: Errors associated with connection, environment, or authentication pop up during SDK initialization.
-
Delayed Feature Flag Updates: Changes to feature flags in the LaunchDarkly UI don't reflect in the application in real-time.
-
Connection Timeout Errors: SDK throws errors related to connection timeouts or unreachable endpoints.
Cause
An understanding of what might be causing the issue can be pivotal for troubleshooting. Here are some potential reasons:
-
SDK Configuration: Incorrect setup of the SDK to interface with the Relay Proxy.
-
Relay Proxy Issues: The Relay Proxy itself may be facing connectivity issues with LaunchDarkly.
-
Network Disruptions: Temporary network instabilities between the SDK and the Relay Proxy.
-
Invalid SDK Keys: The use of outdated, revoked, or incorrect SDK keys.
-
Version Mismatches: Outdated versions of the SDK or Relay Proxy that aren't compatible with each other.
Solution
To address these causes, follow these detailed steps:
-
SDK Configuration:
-
Confirm that the SDK is properly configured to connect to the Relay Proxy's address and port.
-
Cross-check environment-specific variables and endpoints.
-
If using a client-side SDK, ensure the Relay Proxy is set to support client-side SDKs.
-
-
Test Connection:
-
Verify the SDK's connection to the Relay Proxy, by execute a feature flag evaluation:
curl -X REPORT localhost:8030/sdk/evalx/context \ -H "Authorization: sdk-key-123abc" \ -H "Content-Type: application/json" \ -d '{"key": "context-key-123abc", "email":"sandy@example.com"}'
- An unsuccessful evaluation or timeout may indicate connection issues.
-
-
Network Stability:
-
Ensure a stable network connection between the SDK and the Relay Proxy.
-
Utilize network diagnostic tools to check for dropped packets or high latency.
-
Investigate potential network firewalls, proxies, or blocks hindering the connection.
-
-
SDK Key Validation:
-
Double-check the SDK key. Ensure it's the correct key for the environment you're connecting to.
-
Make sure the key hasn't been revoked or replaced in LaunchDarkly.
-
-
Version Check:
-
Confirm you're using supported versions of both the SDK and the Relay Proxy.
-
Consider updating to the latest versions if not already on them.
-
-
Relay Proxy Monitoring:
-
Monitor the health and performance of the Relay Proxy.
-
If it's overwhelmed with requests, consider optimizing its configuration or scaling the setup.
-
Examine Relay Proxy logs for any evident issues or errors.
-