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
DynaRust is a distributed key‑value store 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 distributed key‑value store 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 🔄.
4
4
5
-
Think of it as a shared dictionary spread across multiple computers 💻↔️💻. You can store data (key‑value pairs), retrieve it, and delete it using a simple web API 🔌. DynaRust automatically copies your data across available nodes for high availability and synchronizes changes over time (eventual consistency). It stores data in memory for speed ⚡️ and persists it to disk (`storage.db`) so your data remains safe even if a node restarts.
5
+
Think of it as a shared dictionary 📚 spread across multiple computers 💻↔️💻. You can store data (key‑value pairs), retrieve it, and delete it using a simple web API 🔌. DynaRust automatically copies your data across available nodes for high availability ✅ and synchronizes changes over time (eventual consistency). It stores data in memory for speed ⚡️ and persists it to disk (`storage.db`) 💾 so your data remains safe even if a node restarts.
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 🚀. 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!
8
8
9
9
---
10
10
## Performance
@@ -38,6 +38,10 @@ With its advanced real‑time update capabilities, DynaRust pushes live changes
38
38
39
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! ⚡️
40
40
41
+
***🔒 Security:**
42
+
Certainly! Here’s a more polished and highlighted version of the **Security** section, emphasizing clarity and best practices:
43
+
44
+
---
41
45
42
46
### 🔒 **Security**
43
47
@@ -50,10 +54,10 @@ With its advanced real‑time update capabilities, DynaRust pushes live changes
50
54
- Each node must present a **secret token** (set via the `CLUSTER_SECRET` environment variable) to join the cluster, ensuring only trusted nodes participate.
51
55
52
56
- **Transport Security (HTTPS):**
53
-
- All communication is secured with HTTPS (if enabled).
57
+
- All communication is secured with HTTPS by default.
54
58
- **Easy Certificate Generation:**
55
59
- Run `bash cert.sh`, provide a password, and a `.p12` certificate will be generated under the `cert/` directory.
56
-
- **How to enable HTTPS Mode:**
60
+
- **Testing Mode:**
57
61
- Set `DYNA_MODE=https` to enable HTTPS
58
62
59
63
---
@@ -62,6 +66,11 @@ With its advanced real‑time update capabilities, DynaRust pushes live changes
62
66
***🌐 Distributed Storage:**
63
67
Data is automatically partitioned and spread across all nodes in the cluster.
64
68
69
+
***🗄️ Automatic Snapshots:**
70
+
Every 60 minutes DynaRust writes a JSON snapshot of the entire in‑memory store to `./snapshots/snapshot_<ts>.json`.
71
+
By default only the last 100 snapshots are kept; older files are pruned automatically.
72
+
You can override the retention limit with the `SNAP_LIMIT` environment variable (e.g. `SNAP_LIMIT=200`).
73
+
65
74
***✅ High Availability:**
66
75
If one node fails, the remaining nodes continue to serve requests for the available data.
67
76
@@ -176,12 +185,12 @@ All operations except **GET** require a valid JWT in the `Authorization: Bearer
176
185
- `404 Not Found`if table missing
177
186
178
187
6. **🔑 List or Batch‑Fetch Keys**
179
-
6.1 **GET**`/{table}/keys`
188
+
6.1 **GET**`/default/keys`
180
189
• `200 OK` →
181
190
```json
182
191
["key1","key2",…]
183
192
```
184
-
6.2 **POST**`/{table}/keys`
193
+
6.2 **POST**`/default/keys`
185
194
- Body:
186
195
```json
187
196
["key1","key2","key3"]
@@ -197,7 +206,7 @@ All operations except **GET** require a valid JWT in the `Authorization: Bearer
0 commit comments