POS & Inventory System
A POS must keep checkout and stock writes correct while product browsing, reports and side effects scale independently. This case study shows how Laravel app servers, database servers, Redis and workers evolve from one user to a very large store network.
1 user — transactional monolith
1 APP SERVERLaravel server job
Validates cart data, checks user permissions, calculates sale totals and runs the stock/sale transaction.
Database job
Sale creation and stock deduction happen atomically so a failed checkout cannot leave inventory half-updated.
Why simple?
One cashier does not need a load balancer, Redis cluster or database replicas.
~100 users — multi-terminal / multi-store growth
1–2 APP SERVERSWhy Redis?
Product/catalog reads and shared session data can come from memory, while authoritative inventory writes remain in MySQL.
Concurrency
Row locks or optimistic version checks protect the final stock units when two cashiers sell at the same time.
Workers
Reports, emails and large exports run in background workers rather than blocking cashier requests.
~1 million users — scale operational reads and writes differently
6–15 APP SERVERS*Checkout path
Sales and inventory writes still go to the transactional primary. Product browsing and safe reads can use cache/replicas.
Store identity
Every stock record needs store/location keys. Idempotency keys stop duplicate sale creation when terminals retry requests.
Reporting isolation
Operational checkout queries should not compete with large historical reports; replicas or a reporting store handle analytical reads.
~10 million users — large retail network
25–70+ APP SERVERS*Regional isolation
Large store networks can keep operational traffic close to a region and reduce the blast radius of a single infrastructure failure.
Offline stores
Where WAN connectivity is unreliable, local queued sales and controlled synchronization need explicit conflict/idempotency rules.
Events
Completed sales can publish events to analytics, loyalty, notifications and integrations without coupling those systems directly to checkout.
*App-server ranges are examples, not guarantees
A POS serving millions of customer accounts may still have far fewer concurrent cashiers. Size Laravel servers from peak checkouts per second, catalog traffic, PHP-FPM utilization and database transaction latency—not registered user count alone.