Skip to main content

High-performance FastAPI gateway for microservices

Project description

High-Performance FastAPI Gateway

Python 3.11+ FastAPI Redis License: MIT

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shivays_fastapi_gateway_v1-1.0.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shivays_fastapi_gateway_v1-1.0.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file shivays_fastapi_gateway_v1-1.0.0.tar.gz.

File metadata

File hashes

Hashes for shivays_fastapi_gateway_v1-1.0.0.tar.gz
Algorithm Hash digest
SHA256 23403523ef10fb0a3ccd2b0ba5fd5652a44ffe64c956f1f759177143b3d9a06e
MD5 cdd2c5f11266b8bd6a1b1fe33d9896bc
BLAKE2b-256 f3f8a30c880a42498bd10a8628ed1c24dc7338ff9c44b285d2c42775a6ab71cc

See more details on using hashes here.

File details

Details for the file shivays_fastapi_gateway_v1-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shivays_fastapi_gateway_v1-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dab7d1462e548bb0fb8fcfee3108f02dd9591a51fb12672c76eee5ee38ecf3c
MD5 335908bd622aabd042f8680ecbdb5515
BLAKE2b-256 1c9a01a2c79bfbe4a339207e948c2ca1c256919dcf578b8fbc84ffbaf62eb19e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page