Sentinel-Ledger is a resilient backend infrastructure designed to solve the "thundering herd" problem in payment gateways. It implements a dual-layer protection system: a Token Bucket Rate Limiter to control system load and an Atomic Ledger to ensure 100% data integrity during transactional bursts.
- Token Bucket Algorithm: Implemented in
app/core/limiter.pyto prevent resource exhaustion. - ACID-Compliant Transactions: Utilizes MySQL InnoDB row-level locking to guarantee zero data variance.
- Resource Profiling: Integrated Bash scripts for empirical performance tuning.
- Application Factory Pattern: Built for scalability and modular testing.
- /app: Core logic and API delivery.
- /scripts: Load testing and system monitoring tools.
- /sql: Database schema and transaction locking logic.
pip install -r requirements.txt- Configure
.envbased on.env.example. - Initialize database using
/sql/schema.sql. - Run
python run.py.