Skip to content

AryanRacha/distributed-caching-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Caching System

Python Docker

A fault-tolerant, distributed key-value cache built with Python and Docker to demonstrate core distributed systems concepts.


Core Features 🚀

  • High Availability: Data is replicated across multiple nodes. If a primary node fails, a replica is automatically promoted to take its place.
  • Scalability: Consistent hashing is used to intelligently distribute data, minimizing reshuffling when nodes are added or removed.
  • Resilience: The master node monitors heartbeats from all worker nodes and automatically removes any that fail.
  • Performance: Data is stored in-memory for fast access, with an LRU (Least Recently Used) eviction policy to manage capacity.

Quick Start 🚀

Prerequisites: Docker Desktop must be running.

  1. Build & Run Services: From the project's root directory, run:

    docker-compose up --build -d
  2. Access the Web UI: Open your browser and navigate to: http://localhost:5000

  3. Stop & Clean Up: To stop all services and remove the database volume, run:

    docker-compose down -v

Demonstration 🧪

  1. Set a key-value pair using the web interface.
  2. Get the key once to see a database (MISS) 🟡. The system fetches from the database and populates the cache.
  3. Get it again to see a cache (HIT) 🟢. The data is now served instantly from memory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors