Database Sharding & Caching Lab
Interactive evaluation of horizontal range-key sharding and Cache-Aside vs Write-Through strategies.
Horizontal Database Partitioning
Database Sharding & Range-Key Routing Engine
Test User Shard Key Routing (e.g. Email):
Shard #1Users A - H
Shard 1 (DB Cluster US-East)
Existing Records:
alice@corp.io
charlie@dev.net
bob@test.com
Shard #2Users I - P
Shard 2 (DB Cluster US-West)
Existing Records:
jack@scale.com
lisa@cloud.org
mike@ops.io
Shard #3Users Q - Z
Shard 3 (DB Cluster EU-Central)
Existing Records:
rachel@arch.net
sam@db.io
zack@data.ai
Distributed Cache Strategy
Cache-Aside vs Write-Through vs Write-Behind
Execution Flow Diagram:
1. Client Application
2. Redis / Memcached
3. PostgreSQL Database