Akhil Jain
03/18/2024, 6:52 AMChris Guidry
03/18/2024, 1:52 PM/api/health
and it's used by the Prefect client to detect whether the Prefect server is up and running. You can also use this as a K8s (or other container runtime) readiness or liveness probe.
The /ready
endpoint is a little different, and it tests that the configured database is available. You can use this in your own healthchecks as well, if you choose.Akhil Jain
03/19/2024, 5:11 AMChris Guidry
03/20/2024, 12:49 PM/api/health
is very shallow and just returns `true` in JSON with a 200 status code, which can be a health/readiness probe for container runtimes and load balancers
/api/ready
makes a database connection, but doesn't actually execute a query
/api/hello
is similar in spirit to /api/health
, just with a little more mirth:
@router.get("/hello")
async def hello():
"""Say hello!"""
return "👋"
It can also work as a health/readiness probe for container runtimes and load balancersChris Guidry
03/20/2024, 12:54 PMEND_TIME_DESC
and setting limit
to 1
Akhil Jain
03/21/2024, 4:39 AMChris Guidry
03/22/2024, 2:37 PM