You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR introduces a major architectural overhaul to DynaRust, transforming it from a simple distributed key-value store into a
high-performance, causally consistent datastore capable of handling massive concurrency and cluster scales.
Copy file name to clipboardExpand all lines: README.md
+33-17Lines changed: 33 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,23 @@
1
1
# 🦀 DynaRust: Distributed Key-Value Store
2
2
3
-
DynaRust is a distributed key–JSON‑value built in Rust. It's designed to be reliable and easy to manage, allowing you to add or remove nodes (servers) dynamically without interrupting service 🔄.
3
+
DynaRust is a high-performance, distributed key–JSON‑value store built in Rust. It's designed for massive concurrency, reliable consistency, and seamless scalability 🔄.
4
4
5
-
It combines in‑memory caching, on‑disk persistence, automatic cross‑node replication and background synchronization for eventual consistency, delivering a fault‑tolerant, horizontally scalable datastore.
5
+
It combines **lock-free concurrent storage**, **binary internal replication**, **causal consistency via Vector Clocks**, and a **SWIM-inspired gossip protocol** to deliver a fault‑tolerant, horizontally scalable datastore.
6
6
7
-
With its advanced real‑time update capabilities, DynaRust pushes live changes with latencies below 5 ms 🚀. In fact, on a typical VPS (1 GB RAM, 100 Mbps bandwidth), a single node can comfortably sustain peak traffic of up to **5000 live connections** 🔥—and you can increase capacity even further simply by adding more nodes to your cluster!
7
+
With its advanced real‑time update capabilities, DynaRust pushes live changes with latencies below 5 ms 🚀. Optimized for modern hardware, a single node can comfortably sustain peak traffic of up to **10,000+ live connections** 🔥—and you can increase capacity linearly by adding more nodes to your cluster.
| SSE Capacity | 10,000+ concurrent connections per node |
19
21
20
22
### While inserting ~300 rows/sec we had a SSE client open on a key flawlessly getting live updates in <5 ms (Cheapest AWS EC2)
21
23
---
@@ -27,16 +29,30 @@ With its advanced real‑time update capabilities, DynaRust pushes live changes
27
29
28
30
## ✨ Key Features
29
31
30
-
***🔥 HOT RELOAD & REAL‑TIME UPDATES:**
31
-
Enjoy lightning‑fast, real‑time updates using Server‑Sent Events (SSE). Subscribe to a key with:
32
+
***⚡️ MASSIVE CONCURRENCY (DashMap):**
33
+
The storage engine uses granular, shard-based locking instead of global `RwLock`s. This allows simultaneous writes across different keys and tables without bottlenecking the entire system.
34
+
35
+
***🚀 BINARY REPLICATION (Bincode):**
36
+
Node-to-node communication is now powered by Bincode. This binary format is significantly faster and more compact than JSON, reducing CPU usage and network saturation during high-load replication.
37
+
38
+
***🕙 CAUSAL CONSISTENCY (Vector Clocks):**
39
+
Version tracking has graduated from simple integers to full **Vector Clocks**. DynaRust can now accurately track causality across distributed nodes, automatically resolving concurrent updates and ensuring data integrity.
40
+
41
+
***🎯 CONSISTENT HASHING:**
42
+
Data is distributed using a consistent hashing ring with virtual nodes. This minimizes data movement when nodes join or leave, ensuring only a small fraction of keys are remapped.
43
+
44
+
***🛡️ RELIABILITY (Read Repair & Retries):**
45
+
-**Read Repair:** Every `GET` request automatically checks all replicas. If a stale version is detected, a background task immediately "repairs" the outdated nodes with the latest value.
46
+
-**Retries:** Outgoing replication now uses exponential backoff. Temporary network glitches no longer lead to data divergence.
47
+
48
+
***🛰️ SCALABLE MEMBERSHIP (SWIM Gossip):**
49
+
The cluster uses a SWIM-inspired gossip protocol. Network overhead for health checks stays constant ($O(1)$ per node) regardless of cluster size. Indirect probing ensures highly accurate failure detection.
50
+
51
+
***🔥 REAL‑TIME UPDATES (SSE):**
52
+
Instant updates using Server‑Sent Events (SSE). Subscribe to a key and receive changes in < 5 ms.
32
53
```bash
33
-
# Example: Subscribe to 'statusKey' in the 'notifications' table
Changes are pushed instantly (< 5 ms latency). On a standard VPS (1GB RAM, 100Mbps), a single node handles up to **5000 simultaneous live connections** 💪. Need more capacity? Just add more nodes!
38
-
39
-
***Use Case Example:** Imagine a web UI needing push notifications. Store device IDs as keys in a `devices` table. Use a separate `status` key in the same table. The frontend listens to `devices/subscribe/status`. The backend iterates through device keys, performs actions, and updates the `status` key, instantly notifying all listening frontends. Simple and blazing fast! ⚡️
0 commit comments