-
Notifications
You must be signed in to change notification settings - Fork 33
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
ReadinessCheck Support #175
Comments
Currently marathon-consul does not support readinnes checks. Solution will be to copy readinnes check as a consul health check. Task will be registered when it's alive but marked as healthy when readinnes check passes. We need to tweak initial passing state when registering new service. |
Thanks for the response @janisz As I mentioned above, we wanted to the readiness check endpoint to be checked only during the initial deployment and after that we have light weight healthcheck endpoint which will be checked at regular intervals by Marathon and Consul. If i add the readiness check endpoint as a Consul check, it will hit the endpoint which does comprehensive check every 10s. Sometimes it takes longer than the timeout interval 10s and task gets killed. Below is the example I may have misunderstood your suggestion. Please correct me if thats the case. |
I don't know your code. How about lazy evaluation of readinnes endpoint. You can wrap endpoint with cache layer. If task was ready before then endpoint will immediately return 200 OK. In other case it will do regular expensive check and return its result. |
Hi,
We have been using Marathon-consul for a while to render Haproxy config using Consul template. Recently we made change in our application to have endpoint for healthcheck to do a regular fast check < 1s to be used in Marathon. We have another endpoint which does a comprensive test which takes ~15S. Till this time, application is not ready to take the requests. So I read about Marathon readiness check and decided to go that route thinking that this will help us in terms of Consul registration based on the readiness check for the new instance. However with my testing it does not look it since my Marathon healthcheck passes <1s, it registers with Consul immediately and haproxy started getting the request.
Do we have a way to control this in Marathon-Consol to register the service only after the readinesscheck passes for the newly spin up instance?
The text was updated successfully, but these errors were encountered: