mailmug/zentropy
A high-performance, lightweight key-value store server written in Zig
A high-performance, lightweight key-value store server written in Zig, supporting both TCP and Unix socket interfaces.
Dual Interface: Simultaneous TCP and Unix socket support
High Performance: Built with Zig for maximum efficiency
Simple Protocol: Easy-to-use text-based protocol
Thread-Safe: Concurrent client handling
Memory Safe: No garbage collector, manual memory management
Zig Build version: 0.15.1+
| Operation | Redis | Zentropy | Performance Delta |
|---|---|---|---|
| Write | 0.0075s | 0.0046s | 🟢 Zentropy 1.61x faster |
| Read | 0.0000s | 0.0000s | 🟢 Same Result |
| Key-Value | 0.0078s | 0.0021s | 🟢 Zentropy 3.79x faster |
| Operation | Redis | Zentropy | Performance Delta |
|---|---|---|---|
| Write | 0.0285s | 0.0148s | 🟢 Zentropy 1.92x faster |
| Read | 0.0000s | 0.0000s | 🟢 Zentropy 1.23x faster |
| Key-Value | 0.0033s | 0.0023s | 🟢 Zentropy 1.46x faster |
| Operation | Redis | Zentropy | Performance Delta |
|---|---|---|---|
| Write | 0.0808s | 0.0731s | 🟢 Zentropy 1.10x faster |
| Read | 0.0000s | 0.0000s | 🟢 Zentropy 2.73x faster |
| Key-Value | 0.0032s | 0.0022s | 🟢 Zentropy 1.49x faster |
| Operation | Redis | Zentropy | Performance Delta |
|---|---|---|---|
| Write | 0.3173s | 0.2894s | 🟢 Zentropy 1.10x faster |
| Read | 0.0001s | 0.0000s | 🟢 Zentropy 8.76x faster |
| Key-Value | 0.0098s | 0.0020s | 🟢 Zentropy 4.82x faster |
Using Homebrew
brew tap mailmug/zentropy
brew install mailmug/zentropy/[email protected]
Start service
brew services start [email protected]
Step 1: Download the release binary
Step 2: Extract the ZIP file.
Step 3: Copy the zentropy.conf file, edit the password, and place it in the same directory as the zentropy binary:
bind_address 127.0.0.1
port 6383
password pass@123
Step 4: Run the binary based on your CPU architecture:
./zentropy --config path/to/zentropy.conf
✅ Tip: Once the server is running, you can test it using the Python Client:
from zentropy import Client
client = Client(password="pass@123")
print(client.ping()) # Should print: True
nc 127.0.0.1 6383
PING
# -> +PONG
SET apple red
# -> +OK
GET apple
# -> $3
# -> red
DELETE apple
# -> :1
echo "PING" | nc -U /tmp/zentropy.sock
# -> +PONG
Zentropy is open-source! Contributions, suggestions, and bug reports are welcome.
Feel free to fork the repo, submit PRs, or open issues.