8000 Update HA guide about non-blocking probes by ahus1 · Pull Request #26783 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Update HA guide about non-blocking probes - #26783

Merged
mhajas merged 1 commit into
keycloak:mainfrom
ahus1:is-26781-update-nonblocking-probes
Feb 7, 2024
Merged

mhajas merged 1 commit into
keycloak:mainfrom
ahus1:is-26781-update-nonblocking-probes

Conversation

@ahus1
@ahus1 ahus1 commented Feb 5, 2024
Copy link
Copy Markdown
Member

Closes #26781

@ahus1 ahus1 self-assigned this Feb 5, 2024
@ahus1
ahus1 commented Feb 5, 2024
8000 Copy link
Copy Markdown
Member Author

@mhajas - please review this PR when you have the time.

When updating the docs I found that it was really hard to describe the behaviour. I was wondering if we could instead of making this probe always non-blocking a rely on a background task of the Agroal connection pool to check connections in the background. Still, that's a future issue if you agree that this would be good to have.

Thanks!

@ahus1
ahus1 marked this pull request as ready for review February 5, 2024 13:40
@ahus1
ahus1 requested a review from a team as a code owner February 5, 2024 13:40
@mhajas mhajas left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this PR @ahus1

Should we also update the first sentence in this section? https://github.com/keycloak/keycloak/blob/main/docs/guides/high-availability/concepts-threads.adoc#quarkus-executor-pool

If I understand correctly probes no longer run in the worker pool but directly in the event loop. Do I understand it correctly?

Also, about the suggestion for the truly non-blocking DB probe. I like the idea. Although, I am not sure whether it is critical. I am not sure what are all possible situations when the health check turn blocking but I beleive it will be only when current JDBC connections are all broken and new can't be established (is it correct?). In that case I think it is ok to block event-loop which will eventually kill the liveness probe.

Closes keycloak#26781

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
@ahus1
ahus1 force-pushed the is-26781-update-nonblocking-probes branch from da7642b to 404faa6 Compare February 7, 2024 14:49
@ahus1
ahus1 commented Feb 7, 2024
Copy link
Copy Markdown
Member Author

@mhajas - thank you for the review. I updated the first sentence of that paragraph to talk about "blocking probes".

All blocking parts of the probes will be run on the executor pool, never on the event loop (which would be really bad as it would prevent any other parallel request to be processed). As it runs on the executor pool, it won't affect any liveness probe.

I don't consider the blocking parts readiness probe critical. Still it introduces a complex behavior that is difficult to explain ("sometimes blocking, sometimes not") and reason about. It would need to be done in a separate issue, and IMHO won't make it into KC24.

Ready for another round of review.

@ahus1
ahus1 requested a review from mhajas February 7, 2024 14:53
@mhajas mhajas left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh, ok I missed that. I see it now. Thanks for the explanation @ahus1!

I agree with the follow-up not making it into 24. I am approving and merging now.

@mhajas
mhajas merged commit 786023f into keycloak:main Feb 7, 2024
cavuugroup pushed a commit to cavuugroup/keycloak that referenced this pull request Feb 8, 2024
Closes keycloak#26781

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
Signed-off-by: Krzysztof Walczewski <kwalczewski@gmail.com>
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.

Update HA guide about non-blocking probes

2 participants

0