A high-performance, Redis-compatible database written in modern C++23.
AstraDB is designed to surpass DragonflyDB in every aspect while maintaining full Redis compatibility.
Our goal: 2x DragonflyDB performance, 50% less memory usage, and superior scalability.
- Redis Protocol Compatible: Full support for RESP2 and RESP3 protocols
- High Performance: C++23 implementation with Asio coroutines and multi-threading
- NO SHARING Architecture: Each Worker is completely independent with private resources
- MPSC Communication: Lock-free cross-worker communication via concurrent queues
- SIMD Optimizations: AVX2, SSE4.2, and NEON support for vectorized operations
- Zero-Copy Serialization: FlatBuffers-based efficient serialization
- Flexible Threading: Support for both single-threaded and multi-threaded modes
- Dual Backend: epoll (stable) and io_uring (high performance) support
- Vector Search: In-memory ANN search with hnswlib (cosine/L2/IP)
- JSON Documents: Native JSON.SET/GET/DEL/TYPE with nlohmann_json
- Rich Commands: Support for 270+ Redis commands across all data types
- Persistence: AOF (Append Only File), RDB snapshots, and ROCKSDB integration
- Cluster Support: Gossip-based cluster management with libgossip
- Security: Access Control List (ACL) support
- Monitoring: Prometheus metrics integration
- Logging: High-performance structured logging with spdlog
- String: Basic key-value operations
- Hash: Field-value pairs
- List: Linked list with push/pop operations
- Set: Unique string collections
- Sorted Set: Ordered sets with scores (B+ tree implementation)
- Stream: Redis Streams for message queues
- Bitmap: Bit manipulation operations
- HyperLogLog: Probabilistic cardinality estimation
- Geospatial: Geospatial indexing and queries
- JSON: Document storage with JSON Pointer path support
- Transactions: MULTI/EXEC with optimistic locking
- Pub/Sub: Publish/Subscribe messaging
- Lua Scripting: Server-side scripting with Lua 5.4
- ACL: User-based access control
- TTL: Time-to-live for automatic key expiration
- Replication: Master-slave replication (partial)
- Cluster: Distributed cluster with gossip protocol
- Real Blocking: Full blocking command implementation (BLPOP, BRPOP, etc.)
- Raft Consensus: Distributed consensus for cluster management
- TLS Encryption: Secure connections with OpenSSL
- Scatter-Gather VSEARCH: Parallel multi-worker vector search
- Redis Modules compatibility: Support for Redis Modules API
Test setup:
- AstraDB binary:
build-linux-release-debuginfo-noasan/bin/astradb - AstraDB config:
/tmp/astradb-mgetmset-test.toml(thread_count=2,num_shards=2, persistence disabled) - Redis baseline:
redis-server 8.0.2(--save '' --appendonly no) - Client:
redis-benchmark - Run shape:
-n 300000 -c 80 -P 1(non-pipeline)
| Command | AstraDB QPS | Redis QPS | AstraDB vs Redis |
|---|---|---|---|
SET |
220,102.70 | 219,780.22 | +0.15% |
GET |
223,380.48 | 221,402.20 | +0.89% |
MSET k1..k4 |
187,617.27 | 211,118.94 | -11.13% |
MGET k1..k4 |
182,815.36 | 205,761.33 | -11.15% |
Conclusion: non-pipeline SET/GET is roughly at Redis level on this setup; MSET/MGET still needs major optimization.
Peak values from the same run shape (-n 300000 -c 80 -P 1):
SET: 223,498GET: 228,116MSET k1..k4: 190,056MGET k1..k4: 184,532
Benchmark note: run commands sequentially (not in parallel) when collecting baseline numbers.
All numbers below are from one mixed benchmark mode (-t set,get) to avoid split-test bias.
Pipeline (-P) |
SET QPS | GET QPS |
|---|---|---|
| 1 | 209,424.08 | 209,117.52 |
| 16 | 1,381,215.50 | 1,805,054.12 |
| 64 | 1,612,903.25 | 2,145,922.75 |
For historical investigation notes and older experiments, see PERFORMANCE.md.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AstraDB Core β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Server Core (Asio + Thread Pool) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Server | Shard Manager | Command Handler β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β Network Layer (Asio) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Connection Management | RESP2 Parser | Command Registry β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β Command Layer (100+ Redis Commands) β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β String | Hash | List | Set | ZSet | Stream | Transaction β β
β β PubSub | Script | Admin | ACL | Bitmap | HyperLogLog β β
β β Geospatial | Client | Cluster | Replication | TTL β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β Data Structures Layer β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β DashMap | B+ Tree ZSet | String Pool | Linked List β β
β β Stream Data | HNSW Vector Index | FlatBuffers Serialize β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β Storage Layer β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Key Metadata | AOF Writer | RDB Writer | ROCKSDB Adapter β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Cluster & Security:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Gossip Manager (libgossip) | ACL Manager | Replication Manager β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Blocking Manager β
β Wait Queue | Timeout Management | Async Notification β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Raft Consensus β
β Leader Election | Log Replication | Consensus Protocol β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Component | Library | Version | Purpose |
|---|---|---|---|
| Networking | Asio | 1.30.2 | Async networking and coroutines |
| Serialization | FlatBuffers | 24.3.25 | Zero-copy serialization |
| Logging | spdlog | 1.17.0 | High-performance logging |
| Memory | mimalloc | 2.1.7 | Fast memory allocator |
| Container | Abseil | 20240116.1 | High-performance containers |
| Thread Pool | Intel TBB | 2021.12.0 | Work-stealing scheduler |
| Concurrent Queue | concurrentqueue | 1.0.4 | Lock-free queue |
| Cluster | libgossip | 1.2.0 | Gossip protocol |
| Vector Search | hnswlib | 0.8.0 | HNSW approximate nearest neighbor |
| Storage | ROCKSDB | Latest | Key-value store |
| Metrics | Prometheus Client | 1.2.4 | Metrics collection |
| Compression | zstd | 1.5.6 | Fast compression |
| JSON | nlohmann_json | 3.11.2 | JSON parsing |
| Lua | Lua | 5.4.7 | Scripting support |
| Config | tomlplusplus | 3.4.0 | TOML configuration |
| CLI | cxxopts | 3.2.1 | Command-line parsing |
| Testing | GoogleTest | 1.14.0 | Unit testing |
| Benchmarking | Google Benchmark | 1.8.5 | Performance benchmarking |
- CMake: 3.20+
- C++ Standard: C++23
- Compiler: GCC 13+ / Clang 16+
- Build Tool: Ninja (recommended) or Make
- Package Manager: CPM (C++ Package Manager)
AstraDB/
βββ src/
β βββ astra/
β β βββ base/ # Core utilities and logging
β β βββ commands/ # Redis command implementations
β β βββ container/ # Data structures (DashMap, ZSet, List, Stream)
β β βββ core/ # Core functionality (memory, metrics)
β β βββ network/ # Networking layer (RESP protocol)
β β βββ server/ # Server core (Server, Shard)
β β βββ persistence/ # Persistence layer (AOF, RDB, ROCKSDB)
β β βββ cluster/ # Cluster management (Gossip)
β β βββ security/ # Security layer (ACL)
β β βββ replication/ # Replication manager
β β βββ storage/ # Storage utilities
β βββ main.cpp # Application entry point
βββ tests/
β βββ unit/ # Unit tests
β βββ benchmark/ # Performance benchmarks
β βββ integration/ # Integration tests
βββ cmake/ # CMake configuration
βββ third_party/ # Third-party dependencies
βββ AstraDB_DESIGN.md # Design documentation
βββ README.md # This file
βββ LICENSE # Apache 2.0 License
βββ CMakeLists.txt # Root CMake file
- CMake 3.20+
- C++23 compatible compiler (GCC 13+, Clang 16+)
- Ninja build system (recommended)
# Clone the repository
git clone https://github.com/caomengxuan666/AstraDB.git
cd AstraDB
# Configure and build (Release mode)
cmake -B build-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release
ninja -C build-release
# Run the server
./build-release/bin/astradb --port 6379# Debug mode
cmake -B build-debug -G "Ninja" -DCMAKE_BUILD_TYPE=Debug
ninja -C build-debug
# Release mode with debug information (recommended for development)
cmake --preset linux-release-debuginfo-clang
ninja -C build-linux-release-debuginfo-clang
# Enable LTO (Link-Time Optimization)
cmake -B build-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DASTRADB_ENABLE_LTO=ON
ninja -C build-release
# Enable SIMD optimizations (default: ON)
cmake -B build-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DASTRADB_ENABLE_SIMD=ON
ninja -C build-release
# Build without examples (for package builds)
cmake -B build-release -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DASTRADB_BUILD_EXAMPLES=OFF
ninja -C build-release
# Use io_uring backend (Linux 5.1+, high performance)
cmake --preset linux-package-clang-iouring
# Use epoll backend (stable, compatible with all Linux versions)
cmake --preset linux-package-clangYou can configure AstraDB using command-line options or a configuration file:
# Command-line options
./build-release/bin/astradb \
--port 6379 \
--threads 20 \
--shards 16 \
--databases 16 \
--max-connections 10000
# Single-threaded mode (for testing or low-load scenarios)
./build-release/bin/astradb \
--port 6379 \
--threads 1 \
--shards 1
# Using configuration file
./build-release/bin/astradb --config astradb.tomlExample astradb.toml:
[server]
host = "0.0.0.0"
port = 6379
max_connections = 10000
thread_count = 20
shard_count = 16
database_count = 16
[logging]
level = "info"
async = true
queue_size = 8192
# Storage mode configuration
[storage]
mode = "redis" # Options: "redis" (default) or "rocksdb"
# Redis mode persistence (when mode = "redis")
[persistence]
aof_enabled = true
rdb_enabled = true
snapshot_interval = 300 # seconds
# RocksDB configuration (when mode = "rocksdb")
[rocksdb]
data_dir = "./data/rocksdb_allin"
# All data is persisted to RocksDB in all-in mode
# This is different from Redis mode where RocksDB is only used for cold dataAstraDB supports two storage modes for different use cases:
- Memory-first: Data primarily stored in memory
- Persistence: AOF and RDB for durability
- Cold Data Storage: RocksDB for evicted data (optional)
- Use Case: High-performance scenarios with low latency requirements
[storage]
mode = "redis"
[persistence]
aof_enabled = true
rdb_enabled = true
rocksdb_cold_data = true # Optional: enable RocksDB for cold data- Disk-first: All data persisted to RocksDB
- Memory Cache: Hot data cached in memory with automatic eviction
- Persistence: FlatBuffer serialization for type-safe storage
- Use Case: Large datasets, memory-constrained environments
[storage]
mode = "rocksdb"
[rocksdb]
data_dir = "./data/rocksdb_allin"Key Differences:
- Redis Mode: Best for performance, lower latency, requires more memory
- RocksDB All-in Mode: Best for memory efficiency, handles large datasets, slightly higher latency
Both modes support all Redis data types and commands with automatic persistence.
# Run unit tests
./build-release/bin/astradb_tests
# Run specific test suite
./build-release/bin/astradb_tests --gtest_filter=StringCommandsTest.*
# Run benchmarks
./build-release/bin/astradb_benchmarks
# Run specific benchmark
./build-release/bin/astradb_benchmarks --benchmark_filter=SetPerformance# Using redis-cli (from Redis)
redis-cli -p 6379 PING
# Test basic operations
redis-cli -p 6379 SET mykey "Hello, AstraDB!"
redis-cli -p 6379 GET mykey
# Test list operations
redis-cli -p 6379 LPUSH mylist item1 item2 item3
redis-cli -p 6379 LRANGE mylist 0 -1
# Test sorted set operations
redis-cli -p 6379 ZADD myzset 1 "one" 2 "two" 3 "three"
redis-cli -p 6379 ZRANGE myzset 0 -1 WITHSCORES# Start AstraDB
./build-release/bin/astradb --port 6379
# Use the bundled Python benchmark script
python3 scripts/vector_bench.py --dim 512 --count 5000 --search-qps-duration 10
# Or test manually with raw RESP commands:
# Create a 512-dim cosine index
printf '*4\r\n$7\r\nVCREATE\r\n$2\r\ndb\r\n$3\r\n512\r\n$6\r\ncosine\r\n' | nc 127.0.0.1 6379
# Search with a query vector (requires raw float32 bytes)# Python example using raw sockets
import socket, struct, random
def resp_cmd(sock, *args):
parts = [f'*{len(args)}\r\n'.encode()]
for a in args:
b = a if isinstance(a, bytes) else a.encode()
parts.append(f'${len(b)}\r\n'.encode() + b + b'\r\n')
sock.sendall(b''.join(parts))
return sock.recv(1024)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', 6379))
# Create index
resp_cmd(sock, 'VCREATE', 'docs', '768', 'cosine')
# Insert a vector (768-dimensional random)
vec = struct.pack('768f', *[random.gauss(0, 1) for _ in range(768)])
resp_cmd(sock, 'VSET', 'docs', 'doc:1', vec)
# Search top-10
query = struct.pack('768f', *[random.gauss(0, 1) for _ in range(768)])
result = resp_cmd(sock, 'VSEARCH', 'docs', query, '10')
print(result)# Canonical mixed read/write benchmark (recommended)
redis-benchmark -h 127.0.0.1 -p 6379 -t set,get -n 1000000 -c 256 -P 1 -q
redis-benchmark -h 127.0.0.1 -p 6379 -t set,get -n 1000000 -c 256 -P 16 -q
redis-benchmark -h 127.0.0.1 -p 6379 -t set,get -n 1000000 -c 256 -P 64 -q
# Optional: command-specific stress
redis-benchmark -h 127.0.0.1 -p 6379 -t lpush,lpop,rpush,rpop -n 1000000 -c 256 -P 16 -q- Project Wiki (DeepWiki): https://deepwiki.com/caomengxuan666/AstraDB - Browse architecture, modules, and indexed project docs online
- Design Document: AstraDB_DESIGN.md - Comprehensive design and architecture documentation
- Performance Document: PERFORMANCE.md - Performance benchmarks and optimizations
- Eviction Strategy Document: DOCS/eviction-strategy-optimization.md - Dragonfly-style 2Q eviction algorithm
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Use C++23 features where appropriate
- Add unit tests for new features
- Update documentation as needed
- Run
clang-formatandclang-tidybefore submitting
- Use clear, descriptive commit messages
- Follow conventional commit format:
feat: add new featurefix: fix bugdocs: update documentationtest: add testsrefactor: refactor codeperf: performance improvement
- Core server infrastructure
- 250+ Redis commands (96%+ Redis 7.4.1 compatibility)
- All data types (String, Hash, List, Set, ZSet, Stream)
- Persistence (AOF, RDB, ROCKSDB)
- Cluster support (Gossip)
- ACL support
- Lua scripting
- Transactions
- Pub/Sub
- RESP2 protocol support
- RESP3 protocol support (HELLO command)
- Bitmap commands
- HyperLogLog commands
- Geospatial commands
- TTL commands
- Real blocking commands (simplified implementation)
- Raft consensus
- Full Redis compatibility (100%)
- Comprehensive documentation
- Vector search (in-memory, hnswlib, cosine/L2/IP)
- TLS encryption
- Full RESP3 protocol
- Scatter-gather multi-worker VSEARCH
- Redis Modules compatibility
- Web UI for monitoring
AstraDB has implemented 270+ Redis commands, covering all major data types and features. We aim to achieve 100% Redis 7.4.1 compatibility., covering all major data types and features. We aim to achieve 100% Redis 7.4.1 compatibility.
GET,SET,DEL,EXISTS,MGET,MSET,MSETNXINCR,DECR,INCRBY,DECRBY,INCRBYFLOATAPPEND,STRLEN,GETRANGE,SETRANGE,SUBSTRSETEX,PSETEX,SETNX,GETSET,GETDEL,GETEXSTRALGO,LCS,COPY,DUMP,RESTORE,UNLINKTYPE,ECHO,RANDOMKEY,RENAME,RENAMENX,MOVE,TOUCH
HSET,HGET,HGETALL,HKEYS,HVALS,HLENHMGET,HMSET,HEXISTS,HDELHINCRBY,HINCRBYFLOAT,HSTRLEN,HRANDFIELDHSCAN,HSETNX,HTTL,HEXPIRE,HEXPIREATHEXPIRETIME,HPERSIST,HPEXPIRE,HPEXPIREAT,HPEXPIRETIME,HPTTL
LPUSH,RPUSH,LPOP,RPOP,LPUSHX,RPUSHXLLEN,LRANGE,LINDEX,LINSERT,LSET,LTRIM,LREM,LPOSRPOPLPUSH,LMOVE,LMPOPBLPOP,BRPOP,BRPOPLPUSH,BLMOVE,BLMPOP
SADD,SREM,SISMEMBER,SCARD,SMEMBERSSRANDMEMBER,SPOP,SMOVE,SMISMEMBERSDIFF,SINTER,SUNION,SINTERCARDSDIFFSTORE,SINTERSTORE,SUNIONSTORESSCAN,SORT,SORT_ROSPUBLISH,SSUBSCRIBE,SUNSUBSCRIBE
ZADD,ZREM,ZCARD,ZSCORE,ZINCRBY,ZCOUNT,ZMSCORE,ZRANDMEMBERZRANGE,ZREVRANGE,ZRANGEBYSCORE,ZREVRANGEBYSCORE,ZRANGESTOREZRANK,ZREVRANK,ZPOPMIN,ZPOPMAXZRANGEBYLEX,ZREVRANGEBYLEX,ZLEXCOUNT,ZREMRANGEBYLEXZREMRANGEBYRANK,ZREMRANGEBYSCOREZUNION,ZINTER,ZUNIONSTORE,ZINTERSTORE,ZDIFF,ZDIFFSTORE,ZINTERCARDZMPOP,BZPOPMIN,BZPOPMAX,BZMPOPZSCAN
XADD,XREAD,XRANGE,XREVRANGE,XREADGROUPXLEN,XDEL,XTRIM,XSETIDXGROUP,XACK,XPENDING,XINFO,XCLAIM,XAUTOCLAIM
MULTI,EXEC,DISCARD,WATCH,UNWATCH
SUBSCRIBE,UNSUBSCRIBE,PSUBSCRIBE,PUNSUBSCRIBE,PUBLISH
EVAL,EVALSHA,SCRIPT,SCRIPT EXISTS,SCRIPT FLUSH
INFO,CONFIG,DBSIZE,KEYS,FLUSHDB,FLUSHALL,SELECTPING,ECHO,QUIT,SAVE,BGSAVE,LASTSAVE,BGREWRITEAOFCOMMAND,DEBUG,CLUSTER,MIGRATE,MODULE,SCAN,MEMORY,ASKINGTYPE,RANDOMKEY,RENAME,RENAMENX,MOVE,OBJECT,TOUCHTIME,SHUTDOWN,SWAPDB,WAIT,WAITAOF,READONLY,READWRITE,RESETFAILOVER,LATENCY,MONITOR,SLOWLOG,LOLWUT,AUTH,ACL,HELLO,SLAVEOF,REPLICAOF
ACL SETUSER,ACL GETUSER,ACL DELUSER,ACL LIST,ACL USERS
SETBIT,GETBIT,BITCOUNT,BITPOS,BITOP
PFADD,PFCOUNT,PFMERGE,PFDEBUG,PFSELFTEST
GEOADD,GEODIST,GEOHASH,GEOPOS,GEORADIUS,GEORADIUSBYMEMBER
CLIENT,CLIENT LIST,CLIENT KILL,CLIENT SETNAME,CLIENT GETNAME
CLUSTER,CLUSTER INFO,CLUSTER NODES,CLUSTER MEET,CLUSTER SLOTS
SYNC,PSYNC,REPLCONF,SLAVEOF,REPLICAOF,ROLE
VCREATEβ Create a vector index with dimension and distance metricVDROPβ Drop a vector indexVLISTβ List all vector indexesVSETβ Insert/update a vector with optional metadataMVSETβ Batch insert multiple vectorsVGETβ Retrieve a vector entryVDELβ Delete a vector entryVSEARCHβ KNN search by vector similarityVINFOβ Get vector index statisticsVCOMPACTβ Compact vector index (remove deleted entries)
TTL,PTTL,EXPIRE,PEXPIRE,EXPIREAT,PEXPIREATEXPIRETIME,PEXPIRETIME,PERSIST
JSON.SETβ Set JSON document at keyJSON.GETβ Get JSON document or sub-pathJSON.DELβ Delete key or sub-pathJSON.TYPEβ Get type of value at pathJSON.ARRAPPENDβ Append values to arrayJSON.ARRLENβ Get array lengthJSON.OBJLENβ Get object key countJSON.NUMINCRBYβ Increment number at pathJSON.STRAPPENDβ Append to string at pathJSON.ARRINDEXβ Find value index in array
| Category | Commands | Status |
|---|---|---|
| String | 30+ | β Complete |
| Hash | 20+ | β Complete |
| List | 20+ | β Complete |
| Set | 20+ | β Complete |
| Sorted Set | 30+ | β Complete |
| Stream | 15+ | β Complete |
| Transaction | 5 | β Complete |
| Pub/Sub | 6 | β Complete |
| Script | 9 | β Complete |
| Admin | 40+ | β Complete |
| ACL | 5+ | β Complete |
| Bitmap | 6 | β Complete |
| HyperLogLog | 5 | β Complete |
| Geospatial | 10+ | β Complete |
| Client | 4 | β Complete |
| Cluster | 5+ | β Complete |
| Replication | 6 | β Complete |
| TTL | 9 | β Complete |
| JSON | 10 | β New |
| Vector Search | 10 | β New |
| Total | 270+ | 96%+ |
- Full Implementation: Commands with complete Redis 7.4.1 compatibility
- Simplified Implementation: Commands with basic functionality, marked for future enhancement
- Experimental: Commands with partial support or in development
All 250+ commands are registered and functional. We aim for 100% Redis 7.4.1 compatibility by v1.0.0.
| Metric | Current | Target | Status |
|---|---|---|---|
| MGET(4) QPS (Non-Pipeline) | 182,815.36 (Peak 184,532) | >= Redis | |
| MSET(4) QPS (Non-Pipeline) | 187,617.27 (Peak 190,056) | >= Redis | |
| Pipeline QPS | ~several million | 10M+ | β³ Testing planned |
| Command Coverage | 250+ (96%+) | 250+ (100%) | 96% |
| Memory Overhead | TBD | 0 bytes | TBD |
| Scalability (1β8 threads) | TBD | 8x | TBD |
| Startup Time | TBD | 0.5s | TBD |
Note: on this machine, non-pipeline single-key throughput is NIC-limited at around 220k QPS (similar to Redis/Dragonfly), so optimization focus is on multi-key and pipeline paths.
| Feature | Redis | DragonflyDB | AstraDB |
|---|---|---|---|
| Single-threaded | β | β | β |
| Multi-threaded | β | β | β |
| Sharding | Manual | Automatic | Automatic |
| Persistence | RDB/AOF | Snapshot | AOF/RDB/ROCKSDB |
| Clustering | Redis Cluster | Built-in | Built-in |
| ACL | β | β | β |
| Lua Scripting | β | β | β |
| Transactions | β | β | β |
| Pub/Sub | β | β | β |
| Streams | β | β | β |
| HyperLogLog | β | β | β |
| Geospatial | β | β | β |
| Bitmaps | β | β | β |
| SIMD | β | β | β |
| MPSC Queues | β | β | β |
| Zero-Copy I/O | β | β | β |
| C++23 | β | β | β |
| Vector Search | β (RediSearch) | β | β (hnswlib) |
AstraDB supports Redis-compatible ACL for user-based access control:
# Create a new user
ACL SETUSER myuser on >mypassword ~* +@all
# Get user information
ACL GETUSER myuser
# List all users
ACL LIST
# Delete a user
ACL DELUSER myuserTLS encryption support is planned for v1.1.0:
# Enable TLS in configuration
[server]
tls_enabled = true
tls_cert_file = "/path/to/cert.pem"
tls_key_file = "/path/to/key.pem"- GitHub Issues: https://github.com/caomengxuan666/AstraDB/issues
- Discussions: https://github.com/caomengxuan666/AstraDB/discussions
- Documentation: AstraDB_DESIGN.md
Licensed under the Apache License, Version 2.0. See the LICENSE file for details.
- Redis: The inspiration and protocol reference
- DragonflyDB: Performance optimization ideas
- Asio: Excellent async networking library
- FlatBuffers: Zero-copy serialization
- ROCKSDB: Lightweight key-value store
- libgossip: Gossip protocol implementation
- spdlog: High-performance logging
- mimalloc: Fast memory allocator
- All contributors: Thank you for your contributions!
Let's build the fastest Redis-compatible database! π