Skip to content
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

Avoid starvation of NSQ event processing #66

Merged
merged 5 commits into from
Aug 22, 2024
Merged

Conversation

mwindower
Copy link
Contributor

Avoid starvation of NSQ event processing by configuring max. number of retries of an event (backoff is exponential in nsq by default) and increase concurrency by processing at most two events at a time.

mwindower added 4 commits July 9, 2024 14:36
…ackoff is exponential in nsq by default) and increase concurrency by processing at most two events at a time
@mwindower mwindower marked this pull request as ready for review July 9, 2024 15:23
@mwindower mwindower requested a review from a team as a code owner July 9, 2024 15:23
Copy link
Contributor

@majst01 majst01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me, still do not understand how this situation can occur. This type of error wasn't seen in any of our production environments up til now.

Downside is that the message will be dropped and not send again because metal-api does not reconcile the desired state.

internal/bmc/nsq.go Outdated Show resolved Hide resolved
@Gerrit91 Gerrit91 mentioned this pull request Jul 25, 2024
@Gerrit91
Copy link
Contributor

Gerrit91 commented Aug 22, 2024

Tried this out now and simulated broken IPMI connection by shutting the mgmtspine connection on one mgmt-server. Concurrency definitely works now. It's still not very fast because the timeouts for the IPMI commands are fairly high, but I think it does the job now and should be pretty good.

@Gerrit91 Gerrit91 self-requested a review August 22, 2024 10:27
@Gerrit91 Gerrit91 merged commit 51532a0 into master Aug 22, 2024
1 check passed
@Gerrit91 Gerrit91 deleted the avoid-starvation branch August 22, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants