-
Notifications
You must be signed in to change notification settings - Fork 525
[SPIRE Agent] Add size based backoff strategy for fetchSVIDs #4279
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
Conversation
Signed-off-by: Prasad Borole <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments,
I think you will need to update documentation, at least the one related with sync interval,
because if some user set it to a big number this backoff can result confusing
pkg/agent/manager/sync.go
Outdated
@@ -136,8 +136,10 @@ func (m *manager) updateSVIDs(ctx context.Context, log logrus.FieldLogger, c SVI | |||
|
|||
update, err := m.fetchSVIDs(ctx, csrs) | |||
if err != nil { | |||
m.csrSizeLimitedBackoff.Failure() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may we add a defer, and validate if no error returned, and based on that play with backoff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved it closer to server call
Signed-off-by: Prasad Borole <[email protected]>
Signed-off-by: Prasad Borole <[email protected]>
@MarcosDY Can you please point to docs which needs update or where to add new backoff details? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments are addressed. Looks like just some a couple open things from @MarcosDY needing changes still.
Thanks for this!
looks like agent sync interval was never documented https://github.com/spiffe/spire/blob/main/doc/spire_agent.md#agent-configuration-file |
Signed-off-by: Prasad Borole <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, just a couple small comments
Signed-off-by: Prasad Borole <[email protected]>
…4279) * [SPIRE Agent] Add size based backoff strategy for fetchSVIDs Signed-off-by: Prasad Borole <[email protected]> Signed-off-by: Neniel <[email protected]>
…4279) * [SPIRE Agent] Add size based backoff strategy for fetchSVIDs Signed-off-by: Prasad Borole <[email protected]> Signed-off-by: Neniel <[email protected]>
…4279) * [SPIRE Agent] Add size based backoff strategy for fetchSVIDs Signed-off-by: Prasad Borole <[email protected]> Signed-off-by: Neniel <[email protected]>
Size based backoff will recover in 8 steps (40 secs for 5 sec of sync interval) for current limit of 500.
fixes #4264