High-performance FastAPI gateway for microservices
Project description
High-Performance FastAPI Gateway
A production-grade API Gateway built with FastAPI, designed for high throughput, low latency, and ease of extensibility.
🚀 Features
- High Performance: Built on Starlette and Pydantic for maximum speed.
- Rate Limiting: Redis-backed distributed rate limiting (Token Bucket).
- Caching: Smart response caching with Redis.
- Async Architecture: Fully asynchronous capability for IO-bound operations.
- Middleware: Request tracking, unique IDs, structured logging.
- Scalable: Dockerized and ready for Kubernetes orchestration.
📁 Project Structure
backend-fastapi-high-performance-gateway/
├── app/
│ ├── api/ # API Route Controllers
│ ├── core/ # Config, Security, Events
│ ├── middleware/ # Custom Middleware (Rate Limit, Logging)
│ ├── schemas/ # Pydantic Models
│ ├── services/ # Business Logic & External Calls
│ └── main.py # Application Entrypoint
├── tests/ # Pytest Suite
├── Dockerfile # Production Docker Image
├── docker-compose.yml# Local Dev Environment
└── pyproject.toml # Dependency Management
🛠️ Quick Start
# Clone the repository
git clone https://github.com/Shivay00001/backend-fastapi-high-performance-gateway.git
# Run with Docker Compose (includes Redis)
docker-compose up --build
# Access Documentation
# Swagger UI: http://localhost:8000/docs
# ReDoc: http://localhost:8000/redoc
⚡ Benchmarks
Designed to handle 10k+ req/sec on modest hardware with proper tuning.
📄 License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shivays_fastapi_gateway_v1-1.0.0.tar.gz.
File metadata
- Download URL: shivays_fastapi_gateway_v1-1.0.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23403523ef10fb0a3ccd2b0ba5fd5652a44ffe64c956f1f759177143b3d9a06e
|
|
| MD5 |
cdd2c5f11266b8bd6a1b1fe33d9896bc
|
|
| BLAKE2b-256 |
f3f8a30c880a42498bd10a8628ed1c24dc7338ff9c44b285d2c42775a6ab71cc
|
File details
Details for the file shivays_fastapi_gateway_v1-1.0.0-py3-none-any.whl.
File metadata
- Download URL: shivays_fastapi_gateway_v1-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dab7d1462e548bb0fb8fcfee3108f02dd9591a51fb12672c76eee5ee38ecf3c
|
|
| MD5 |
335908bd622aabd042f8680ecbdb5515
|
|
| BLAKE2b-256 |
1c9a01a2c79bfbe4a339207e948c2ca1c256919dcf578b8fbc84ffbaf62eb19e
|