A high-performance, scalable API built with FastAPI for managing user data. Features include PostgreSQL for persistence, Redis for caching, rate limiting, and optimized performance for high-load scenarios.
- FastAPI: Modern, fast (high-performance) web framework for building APIs with Python 3.8+.
- PostgreSQL: Robust relational database for persistent user storage.
- Redis: In-memory caching to speed up frequent read operations.
- Rate Limiting: Protects endpoints using
SlowAPI
. - Async Operations: Non-blocking database queries using
asyncpg
. - Gzip Compression: Reduces response size via FastAPI middleware and Nginx.
- Fast JSON Serialization: Uses
orjson
for ultra-fast JSON handling. - Load Testing: Integrated with Locust for performance benchmarking.
- Dockerized: Fully containerized for easy setup and deployment.
Ensure you have Docker and Docker Compose installed.
docker-compose up -d