06
System Design
PythonFastAPIPydanticREST APILoad testing
Overview
Basket recommendation model served as a production-grade REST API. Architecture designed in Excalidraw before implementation. Model loaded from a joblib artifact via a feature store, with one handler file per endpoint.
Endpoints
- arrow_forward
GET /status: health check - arrow_forward
POST /predict: returns basket recommendations for a givenuser_id - arrow_forward
GET /metrics: Prometheus-compatible metrics in plain text format
Architecture
- arrow_forwardFull routers / services / utils / models / exceptions layer separation
- arrow_forwardPydantic schemas for request and response validation
- arrow_forwardPostman collection with JSON tests for endpoint validation
- arrow_forwardLoad tested with
attack.sh
Diagram
