feat: add health check endpoints and metrics to MCP server
This commit is contained in:
43
README.md
43
README.md
@@ -231,3 +231,46 @@ The free-api-live-football-data RapidAPI pricing:
|
||||
| Mega | $49.99/mo | 500,000 |
|
||||
|
||||
Nike uses a 5-minute in-memory TTL cache to minimize API calls during conversations.
|
||||
|
||||
|
||||
|
||||
## File Management Philosophy
|
||||
|
||||
Following red panda-approved practices:
|
||||
|
||||
- **Under 500 lines:** ✅ Perfect! Red pandas are happy
|
||||
- **500-1000 lines:** ⚠️ Acceptable, but watch carefully
|
||||
- **Over 1000 lines:** 🚨 Time to refactor! Split into multiple files
|
||||
|
||||
Large files burn through LLM context and produce poor results. Keep files focused and modular.
|
||||
|
||||
## Monitoring & Health Check Endpoints
|
||||
Follow standard Kubernetes health check endpoints for container orchestration:
|
||||
|
||||
### /ready/ - Readiness probe checks if the application is ready to serve traffic
|
||||
Validates database connectivity
|
||||
Validates cache connectivity
|
||||
Returns 200 if ready, 503 if dependencies are unavailable
|
||||
Used by load balancers to determine if pod should receive traffic
|
||||
|
||||
### /live/ - Liveness probe checks if the application process is alive
|
||||
Simple health check with minimal logic
|
||||
Returns 200 if Django is responding to requests
|
||||
Used by Kubernetes to determine if pod should be restarted
|
||||
|
||||
### /metrics
|
||||
Detailed metrics, use Prometheus and Alloy integration for logs rather than custom health endpoints.
|
||||
|
||||
## Documentation
|
||||
Place documentation in the docs directory of the repository
|
||||
|
||||
/docs/
|
||||
|
||||
HTML documents must follow docs/documentation_style_guide.html
|
||||
|
||||
### Diagrams
|
||||
When creating or updating diagrams in HTML files, use MERMAID
|
||||
|
||||
---
|
||||
|
||||
*Remember: Red pandas are tough critics, but they reward quality with their approval. Strive for MCP servers that would make a red panda proud!* 🐾
|
||||
Reference in New Issue
Block a user