GraphQL: Query specific Endpoints and getting running worker amount
My goal is to adjust the amount of Active Workers for serverless endpoints dynamically.
1. Is there a way to query specific endpoints, instead of all?
https://docs.runpod.io/graphql/manage-endpoints
2. Is checking the
PodTelemetry.state
for all endpoint pods
the most reliable way to for counting how many pods are running?
https://graphql-spec.runpod.io/#definition-Endpoint
I found that a health check with https://api.runpod.ai/v2/<id>/health
seems to be more delayed.
Appreciate any insights and thanks for your time!Manage Endpoints | RunPod Documentation
Create a new Serverless endpoint, or modify/delete existing ones.
2 Replies
Use the /health API of your serverless worker to get the number of running , not
PodTelemetry.state
. Why do you say its delayed?Health check returned running even though the job was rendered as finished in the endpoint overview. Only a health check a few secs later showed that nothing was running anymore. Maybe due to the idle timeout.