Skip to content

Revisit backoff grace period computation #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks
Tracked by #9175
jlvoiseux opened this issue Apr 21, 2022 · 0 comments · Fixed by #240
Closed
3 tasks
Tracked by #9175

Revisit backoff grace period computation #188

jlvoiseux opened this issue Apr 21, 2022 · 0 comments · Fixed by #240
Assignees
Labels
aws-λ-extension AWS Lambda Extension
Milestone

Comments

@jlvoiseux
Copy link
Contributor

The current exponential backoff mechanism can lead to multiple Lambda environments being synchronously stuck, as they will all attempt to try to reconnect to a potentially unresponsive APM Server at the same time.

The following picture is a bar chart illustrating the duration of several invocations over 10 minutes, coupled with a slow APM Server. There is a very visible synchronous pattern of multiple Lambda environments stuck trying to query the APM Server at the same time, leading to the creation of new environments and increasing the cold start rate.

image

Immediate mitigation actions to be attempted are:

  • Increase the initial grace period, to avoid the creation of a lot of Lambda environments at the start
  • Increase the jitter to make the grace period duration more random, and assign a specific jitter value to each instance of the extension at cold start
  • Perform a high-throughput benchmark over a long period of time to monitor the environment scaling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-λ-extension AWS Lambda Extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants