Learn how to implement and deploy a load balancing worker with FastAPI.
app.py
:
/ping
/generate
/stats
Dockerfile
to package our application:
requirements.txt
file:
https://ENDPOINT_ID.api.runpod.ai/ping
https://ENDPOINT_ID.api.runpod.ai/generate
https://ENDPOINT_ID.api.runpod.ai/stats
ENDPOINT_ID
and RUNPOD_API_KEY
with your actual endpoint ID and API key:
{"error":"no workers available"}%
, this means means your workers did not initialize in time to process the request. Running the request again will usually fix this issue.{"error":"not allowed for QB API"}
, verify that your endpoint type is set to “Load Balancer”.PORT
matches what your application is using, and that the PORT_HEALTH
variable is set to a different port.