Stock Gate
Redis
The stock decision must happen fast and atomically before valid checkout work enters the asynchronous path.
The thesis architecture separates the fast stock decision from the durable write path. Redis protects stock atomically, RabbitMQ buffers valid checkout work, workers persist final state into PostgreSQL, and centralized observability keeps the asynchronous system explainable.
Frontend checkout intent enters the backend API before the protected stock-safe path begins.
Redis validates and decrements stock before RabbitMQ accepts valid checkout work.
Workers write final state to PostgreSQL while LGTP exposes logs, metrics, traces, and health signals.
The architecture is organized by responsibility: request entry, stock gate, pressure buffer, controlled persistence, and an observability layer that wraps the whole route.
Checkout intent
Buyer starts checkout from the storefront or flash sale campaign.
Request entry
The API receives the checkout intent before the stock-safe path begins.
Stock validation and decrement happen atomically before queueing valid work.
Async processor
Workers consume queue messages and move checkout work toward final persistence.
Source of truth
Final transaction and order state are written durably after the protected flow.
Valid checkout work is queued so PostgreSQL is not hit by every concurrent request at once.
Metrics, logs, traces, and dashboards expose bottlenecks, failures, and recovery signals. Prometheus records metrics, Loki stores logs, Tempo captures traces, and Grafana visualizes system health.
Redis
The stock decision must happen fast and atomically before valid checkout work enters the asynchronous path.
RabbitMQ
Valid checkout messages are queued so PostgreSQL is not forced to absorb every concurrent request directly.
Worker + PostgreSQL
Workers consume queued checkout work and write final transaction state into PostgreSQL as the durable source of truth.
Prometheus + Loki + Tempo + Grafana
Metrics, logs, traces, and dashboards expose bottlenecks, failures, recovery signals, and system health.
Frontend + API
The buyer starts checkout in the frontend; the backend API receives the intent and passes it into the protected flow.
The page should help reviewers explain why the system uses Redis, RabbitMQ, PostgreSQL, and centralized observability together.
Stock correctness
Redis is responsible for the fast stock decision before valid checkout work continues.
Write stability
RabbitMQ separates checkout acceptance from final PostgreSQL writes.
Operational visibility
LGTP makes the asynchronous flow explainable during a demo or incident review.
Load-test evidence
The thesis story is completed by throughput, latency, and stock-correctness evidence.