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

Simple HTTP based healthcheck implementation for cloud environments that support rolling restarts like Openshift or Google Cloud Engine #9284

Merged
merged 1 commit into from
Nov 28, 2016

Conversation

noctarius
Copy link
Contributor

This PR adds a very basic health check to the Hazelcast HTTP subsystem that provides information about the current health status (ongoing migrations, cluster size, ...). That way monitoring solutions or ready / health checks can be implemented on the cloud environment side.

The information provided are minimal to not interfere too much with the cluster load. Requests to http://xxx.xxx.xxx.xxx:5701/hazelcast/health are accepted whenever the property hazelcast.http.healthcheck.enabled is set to true. In this case a GET request provides a result like the following:

Hazelcast::NodeState=ACTIVE
Hazelcast::ClusterState=ACTIVE
Hazelcast::ClusterSafe=TRUE
Hazelcast::MigrationQueueSize=0
Hazelcast::ClusterSize=1

Based on this result the check can make assumptions like "the cluster is not yet safe, I cannot go on with rolling restarts".

@noctarius noctarius added this to the 3.8 milestone Nov 21, 2016
@devOpsHazelcast
Copy link
Collaborator

@noctarius
Copy link
Contributor Author

run-lab-run

@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@pveentjer
Copy link
Contributor

Looks good. Can you add some tests?

@noctarius
Copy link
Contributor Author

How can I test that? I mean it's disabled in mocks, so I would have to create a real cluster node which is bad for parallel testing. Any idea?

@pveentjer
Copy link
Contributor

You can also make it a nightly test and have it run in isolation.

@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@noctarius
Copy link
Contributor Author

Can we get this merged? :)

@pveentjer
Copy link
Contributor

👍

@devOpsHazelcast
Copy link
Collaborator

@noctarius
Copy link
Contributor Author

run-lab-run

@devOpsHazelcast
Copy link
Collaborator

Test PASSed.

@mesutcelik mesutcelik merged commit 8ebfb52 into hazelcast:master Nov 28, 2016
@mesutcelik
Copy link

Thanks @noctarius !

Can we update documentation with that API addition? cc: @Serdaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants