| Crates.io | ignix |
| lib.rs | ignix |
| version | 0.3.2 |
| created_at | 2025-09-23 17:11:28.721711+00 |
| updated_at | 2025-12-03 22:35:46.89135+00 |
| description | High-performance Redis-compatible key-value store built with Rust |
| homepage | https://github.com/CycleChain/ignix |
| repository | https://github.com/CycleChain/ignix |
| max_upload_size | |
| id | 1851777 |
| size | 294,675 |
High-Performance Redis-Compatible Key-Value Store
Ignix (from "Ignite" + "Index") is a blazing-fast, Redis-protocol compatible key-value store designed for modern multi-core systems. Built with Rust for maximum performance and safety.
mio::Waker response pathDashMap (sharded locking) in hot pathIgnix v0.3.2 architecture:
SO_REUSEPORT to spawn N independent worker threads (one per CPU core).mio (epoll/kqueue) and io_uring (Linux only) backends.DashMap<Bytes, Value> (sharded locking) for high-concurrency data access.git clone https://github.com/CycleChain/ignix.git
cd ignix
cargo build --release
cargo run --release
# Or enable io_uring backend (Linux only)
cargo run --release -- --backend=uring
The server will start on 0.0.0.0:7379 by default.
# In another terminal
cargo run --example client
Expected output:
+OK
$5
world
Ignix supports the following Redis commands:
| Command | Description | Example |
|---|---|---|
PING |
Test connectivity | PING β +PONG |
SET |
Set key-value pair | SET key value β +OK |
GET |
Get value by key | GET key β $5\r\nvalue |
DEL |
Delete key | DEL key β :1 |
EXISTS |
Check if key exists | EXISTS key β :1 |
INCR |
Increment integer value | INCR counter β :1 |
RENAME |
Rename a key | RENAME old new β +OK |
MGET |
Get multiple values | MGET key1 key2 β *2\r\n... |
MSET |
Set multiple key-value pairs | MSET k1 v1 k2 v2 β +OK |
RUST_LOG: Set logging level (e.g., debug, info, warn, error)Ignix automatically creates an ignix.aof file for persistence. Data is written to AOF and flushed every second for durability.
cargo test
# Execute benchmark
cargo bench --bench exec
# RESP parsing benchmark
cargo bench --bench resp
See the Performance section and benchmark_results/benchmark_results.json.
redis-cli -h 127.0.0.1 -p 7379
127.0.0.1:7379> PING
PONG
127.0.0.1:7379> SET hello world
OK
127.0.0.1:7379> GET hello
"world"
Ignix is compatible with any Redis client library. Here's a Python example:
import redis
# Connect to Ignix
r = redis.Redis(host='localhost', port=7379, decode_responses=True)
# Use like Redis
r.set('hello', 'world')
print(r.get('hello')) # Output: world
Benchmarks reflect Ignix v0.3.1. Full raw results are in benchmarks/results/.
| Data | Conns | Redis | Ignix | Ratio (Ignix/Redis) |
|---|---|---|---|---|
| 64B | 1 | 9,249 | 9,116 | 0.99x |
| 64B | 10 | 17,628 | 22,360 | 1.27x |
| 64B | 50 | 18,236 | 23,993 | 1.32x |
| 256B | 1 | 14,615 | 4,738 | 0.32x |
| 256B | 10 | 17,880 | 16,273 | 0.91x |
| 256B | 50 | 16,898 | 16,959 | 1.00x |
| 1KB | 1 | 16,300 | 6,451 | 0.40x |
| 1KB | 10 | 16,936 | 24,323 | 1.44x |
| 1KB | 50 | 3,313 | 7,314 | 2.21x |
| 4KB | 1 | 11,286 | 8,581 | 0.76x |
| 4KB | 10 | 17,232 | 27,933 | 1.62x |
| 4KB | 50 | 16,343 | 20,675 | 1.27x |
| Data | Conns | Redis | Ignix | Ratio (Ignix/Redis) |
|---|---|---|---|---|
| 64B | 50 | 35,235 | 42,495 | 1.21x |
| 1KB | 50 | 33,701 | 39,466 | 1.17x |
| 32KB | 20 | 15,912 | 21,445 | 1.35x |
| 256KB | 20 | 18,497 | 17,408 | 0.94x |
| 2MB | 10 | 1,054 | 2,062 | 1.96x |
Note: v0.3.1 introduced Zero-Copy Response Generation, significantly boosting GET performance. Ignix now consistently outperforms or matches Redis across most payload sizes.
| Metric | Redis | Ignix | Ratio (Ignix/Redis) |
|---|---|---|---|
| Throughput | 3,201 ops/sec | 3,996 ops/sec | 1.25x |
| Avg Latency | 13.56 ms | 10.38 ms | 0.76x |
Notes:
benchmark_results/benchmark_results.json.Run comprehensive benchmarks with our included tools:
# Quick comparison
python3 quick_benchmark.py
# Detailed analysis with charts
python3 benchmark_redis_vs_ignix.py
# Custom test scenarios
python3 benchmark_redis_vs_ignix.py --data-sizes 64 256 1024 --connections 1 10 25
Architecture Benefits:
src/
βββ bin/ignix.rs # Server binary
βββ lib.rs # Library exports
βββ protocol.rs # RESP protocol parser/encoder
βββ storage.rs # In-memory storage (Dict)
βββ shard.rs # Command execution logic
βββ net.rs # Networking and event loop
βββ aof.rs # AOF persistence
examples/
βββ client.rs # Example client
tests/
βββ basic.rs # Basic functionality tests
βββ resp.rs # Protocol parsing tests
benches/
βββ exec.rs # Command execution benchmarks
βββ resp.rs # Protocol parsing benchmarks
git checkout -b feature/amazing-feature)cargo test)cargo bench)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)cargo fmt)cargo clippy)Enable debug logging: RUST_LOG=debug cargo run --release
Monitor AOF: tail -f ignix.aof
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ and π¦ by the CycleChain.io team