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
Copy file name to clipboardExpand all lines: README.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -945,7 +945,38 @@ On cold starts (when a new execution environment is initialized), there can be a
945
945
946
946
In typical production APIs, regular traffic keeps functions warm, so the likelihood of requests slipping through this initial window is small.
947
947
948
-
In isolated tests or very low-traffic scenarios, the execution environment may be recycled and the cache cleared, recreating the short window until configuration is reloaded. When testing, please send few normal request to keep the system warm first.
948
+
In isolated tests or very low-traffic scenarios, the execution environment may be recycled and the cache cleared, recreating the short window until configuration is reloaded. When testing, please send few normal request to keep the system warm first.
949
+
950
+
### Cold Start Governance
951
+
952
+
You can enforce that initial requests during a Lambda cold start wait until Moesif Config and Governance Rules are loaded.
953
+
954
+
-`waitForGovernanceOnColdStart` (Boolean): When `true`, the middleware blocks the first invocations until governance rules are fetched and the app config is available. Default: `false`.
955
+
-`governanceLoadTimeoutMs` (Number): Maximum time in milliseconds to wait for config before proceeding even if it hasn’t loaded, to avoid indefinite blocking. Default: `5000`.
- Requests during cold start may take longer but ensure governance is applied when rules exist.
979
+
- If the timeout elapses without config, the request proceeds to avoid indefinite delays.
949
980
950
981
## How to Get Help
951
982
If you face any issues using this middleware, try the [troubheshooting guidelines](#troubleshoot). For further assistance, reach out to our [support team](mailto:support@moesif.com).
0 commit comments