Hit or Miss is a simple distributed key-value store implemented in Rust. This project consists of two servers: a master server and a partition server. The master server is responsible for managing connections and forwarding requests to the appropriate partition server. The partition servers store the data and process the commands sent by the master.
- Simple and efficient command parsing
- LRU Cache for key-value storage on partition servers
- Consistent hashing to distribute data across multiple partition servers
- Support for
GET
,SET
, andDELETE
operations - Automatic partition server registration and load balancing!
To run Hit or Miss, you need to have Rust and Cargo installed. Visit the official Rust website for installation instructions.
-
Clone the repository:
git clone https://github.com/stano45/hit-or-miss.git cd hit-or-miss
-
Start the master server:
cargo run --bin master
The master server will start listening on the default address `127.0.0.1:6969`.
-
Start one or more partition servers in separate terminal windows or tabs:
cargo run --bin partition
The partition servers will automatically connect to the master server and register themselves.
-
Use a client (e.g., telnet, netcat, or a custom client) to connect to the master server and send commands.
For example:
echo "SET key value" | nc 127.0.0.1 6969
This project is licensed under the MIT License. See the LICENSE file for details.