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

Readiness and Liveliness Probes #37

Closed
DefinitelyNotAGoat opened this issue Mar 3, 2021 · 1 comment
Closed

Readiness and Liveliness Probes #37

DefinitelyNotAGoat opened this issue Mar 3, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@DefinitelyNotAGoat
Copy link

My team and I really love this indexer and appreciate the hard work of the Baking Bad team. One thing that I think might be mutually beneficial to everyone is to add readiness and liveliness probes in the synchronizer/API so that users can create custom alerting and handling Kubernetes logic in the case of error.

@Groxan Groxan added the enhancement New feature or request label Mar 3, 2021
Groxan added a commit that referenced this issue Jul 23, 2021
@Groxan Groxan closed this as completed in c82864a Aug 2, 2021
@Groxan
Copy link
Member

Groxan commented Aug 2, 2021

Hey, we've finally implemented health checks in v1.6.0 that can be used for liveness probes.

The Tzkt.Api implements health checks via API endpoint. Settings:

"HealthChecks": {
  "Enabled": true,
  "Endpoint": "/health"
}

After this you can use /health (or whatever you specified in the settings) endpoint. If it returns HTTP 200, then everything's ok.

The Tzkt.Sync implements health checks by creating and touching the file on the disc. Settings:

"HealthChecks": {
  "Enabled": true,
  "Delay": 10,
  "Period": 15,
  "FilePath": "/tmp/sync.health"
}

After Delay seconds you can check if the file at the specified path was modified within the last Period seconds. If yes, then everything's ok. For k8s it should look like this:

livenessProbe:
  exec:
    command:
    - find
    - /tmp/sync.health
    - -mmin
    - '-15'
  initialDelaySeconds: 10
  periodSeconds: 15

ajinkyaraj-23 pushed a commit to ajinkyaraj-23/tzkt that referenced this issue Oct 7, 2024
* [fix] DAL api

* [migration] merge all migration related to dal support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants