What to scrape
Both TGI and vLLM expose Prometheus metrics on a configurable port. The key series:
tgi_request_count/vllm_requests_total— throughput.tgi_request_inference_duration— per-request latency histogram.tgi_queue_size/vllm_num_requests_waiting— backlog. Alert when sustained > 0.tgi_batch_current_size— live batch fullness.- GPU memory: scrape from
nvidia-smi-exporteror DCGM exporter.
Health checks
GET /health on both. Returns 200 once weights are loaded. Use as the readiness probe in k8s; use GET /info to verify the running model id matches what your config thinks is live.
Restart strategy
Inference servers do leak memory occasionally on long-tailed workloads. Pin --restart=unless-stopped in Docker. In k8s use restartPolicy: Always and a liveness probe with a generous initial delay (model load can be minutes). Plan for cold-start: pre-load weights into the image or a persistent volume; never first-pull on a production node.