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

fix(healthcheck) start a single timer for all workers #65

Closed
wants to merge 1 commit into from

Conversation

locao
Copy link
Contributor

@locao locao commented Feb 1, 2021

Before creating a new timer, check if this Nginx instance is already running an active health check in any worker.

Fixes: Kong/kong#6788

@kikito
Copy link
Member

kikito commented Feb 2, 2021

This change seems ok to me, but some tests are red.

@Tieske
Copy link
Member

Tieske commented Feb 4, 2021

I do not think this is correct. We need to bring back the get_periodic_lock function that dissapeared from the code (haven't checked when and where). But each HC needs one for healthy and one for unhealthy. Please check history.

The lock is an SHM key created with TTL == interval time, every worker tries to get /set that key, on success, they run the HC, on failure (already exists) another worker is already running the HC, and this worker should skip.

@locao
Copy link
Contributor Author

locao commented Feb 9, 2021

Supersededby #67

@locao locao closed this Feb 9, 2021
@locao locao deleted the fix/single_timer branch February 9, 2021 16:38
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