| Crates.io | feox-server |
| lib.rs | feox-server |
| version | 0.6.1 |
| created_at | 2025-09-01 18:03:30.212917+00 |
| updated_at | 2025-09-21 13:16:25.929519+00 |
| description | High-performance Redis-compatible server for Feox DB |
| homepage | |
| repository | https://github.com/mehrantsi/feox-server |
| max_upload_size | |
| id | 1819995 |
| size | 261,771 |
Ultra-fast Redis-compatible server powered by Feox DB.
Testing with memtier_benchmark on macOS (16 cores, 50 clients, 100K requests, pipeline 16):
| Workload | FeOx (ops/sec) | Redis (ops/sec) | Speedup | FeOx p50 | Redis p50 |
|---|---|---|---|---|---|
| Cache Simulation (50% SET, 50% GET) | 2,980,228 | 1,492,622 | 2.0x | 1.09ms | 2.08ms |
| Session Store (25% SET, 75% GET) | 3,002,196 | 1,601,475 | 1.9x | 1.06ms | 1.91ms |
| Content Cache (10% SET, 90% GET) | 2,785,080 | 1,370,185 | 2.0x | 1.13ms | 2.27ms |
| Pub/Sub (PUBLISH only) | 138,000 | 142,857 | 0.97x | 0.047ms | 0.039ms |
Testing with redis-benchmark (1M random keys, 50 clients, pipeline 64):
| Command | FeOx (ops/sec) | Redis (ops/sec) | Speedup |
|---|---|---|---|
| SET | 3,952,569 | 1,538,461 | 2.6x |
| GET | 5,025,125 | 2,004,008 | 2.5x |
# Install from crates.io
cargo install feox-server
# Or build from source
git clone https://github.com/mehrantoosi/feox-server
cd feox-server
cargo build --release
# Start server on default port (6379)
feox-server
# Or if built from source
./target/release/feox-server
# Custom configuration
feox-server \
--port 6380 \
--bind 0.0.0.0 \
--threads 8 \
--data-path /var/lib/feox/data.db
# Connect with redis-cli
redis-cli -p 6379
# Basic operations
SET key value
GET key
INCR counter
EXPIRE key 60
GET key - Get value by keySET key value [EX seconds] - Set key with optional expiryDEL key [key ...] - Delete one or more keysEXISTS key [key ...] - Check if keys existLPUSH key value [value ...] - Push values to the head of listRPUSH key value [value ...] - Push values to the tail of listLPOP key [count] - Pop values from the head of listRPOP key [count] - Pop values from the tail of listLLEN key - Get the length of a listLRANGE key start stop - Get a range of elements from a listLINDEX key index - Get an element from a list by indexHSET key field value [field value ...] - Set hash field(s)HGET key field - Get value of a hash fieldHMGET key field [field ...] - Get values of multiple hash fieldsHDEL key field [field ...] - Delete one or more hash fieldsHEXISTS key field - Check if a hash field existsHGETALL key - Get all fields and values in a hashHLEN key - Get the number of fields in a hashHKEYS key - Get all field names in a hashHVALS key - Get all values in a hashHINCRBY key field increment - Increment the integer value of a hash fieldINCR key - Increment integer valueINCRBY key delta - Increment by specific amountDECR key - Decrement integer valueDECRBY key delta - Decrement by specific amountEXPIRE key seconds - Set expiration in secondsTTL key - Get remaining TTL in secondsPERSIST key - Remove expirationMGET key [key ...] - Get multiple valuesMSET key value [key value ...] - Set multiple key-value pairsMULTI - Mark the start of a transaction blockEXEC - Execute all commands issued after MULTIDISCARD - Discard all commands issued after MULTIWATCH key [key ...] - Watch keys to determine execution of MULTI/EXEC blockUNWATCH - Forget about all watched keysSUBSCRIBE channel [channel ...] - Subscribe to channelsUNSUBSCRIBE [channel ...] - Unsubscribe from channelsPSUBSCRIBE pattern [pattern ...] - Subscribe to channel patternsPUNSUBSCRIBE [pattern ...] - Unsubscribe from patternsPUBLISH channel message - Publish message to channelPUBSUB CHANNELS [pattern] - List active channelsPUBSUB NUMSUB [channel ...] - Get subscriber count for channelsPUBSUB NUMPAT - Get pattern subscriber countAUTH password - Authenticate connectionPING [message] - Test connectionINFO [section] - Server informationCONFIG GET/SET - Configuration managementKEYS pattern - Find keys by patternSCAN cursor [MATCH pattern] [COUNT count] - Incremental key iterationCLIENT ID - Returns the current connection IDCLIENT LIST - Lists all connected clients with detailed informationCLIENT INFO - Returns information about the current connectionCLIENT SETNAME name - Sets a name for the current connectionCLIENT GETNAME - Returns the name of the current connectionCLIENT KILL [ID id] [ADDR addr] [TYPE type] - Terminates client connectionsCLIENT PAUSE timeout - Suspends command processing for all clientsCLIENT UNPAUSE - Resumes command processing for all clientsJSONPATCH key patch - Apply JSON Patch (RFC 6902)CAS key expected new_value - Compare-and-swap operation| Option | Default | Description |
|---|---|---|
--port |
6379 | Port to listen on |
--bind |
127.0.0.1 | Bind address |
--threads |
CPU count | Number of worker threads |
--data-path |
None | Path to persistent storage (memory-only if not set) |
--log-level |
info | Logging level (trace/debug/info/warn/error) |
--requirepass |
None | Password for AUTH command |
FeOx-server supports Redis-compatible AUTH command for basic access control.
# Via command line
./feox-server --requirepass yourpassword
# Via environment variable
FEOX_AUTH_PASSWORD=yourpassword ./feox-server
# Via config file (config.toml)
requirepass = "yourpassword"
# Authenticate with redis-cli
redis-cli -p 6379
> AUTH yourpassword
OK
# Or use -a flag
redis-cli -p 6379 -a yourpassword
AUTH credentials are sent in PLAINTEXT over the network, exactly like Redis.
For production use:
--bind 127.0.0.1)# Using redis-benchmark
redis-benchmark -n 1000000 -r 1000000 -c 50 -P 64 -t SET,GET
When multiple clients rapidly update the same key simultaneously, you may encounter "Timestamp is older than existing record" errors. This is by design - FeOx uses timestamp-based optimistic concurrency control for consistency.
Impact:
For benchmarking, use the -r flag with redis-benchmark to test with random keys
This is a limitation of the said OS on system time resolution in user space.
Apache License 2.0 - See LICENSE for details.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
For security issues, please see SECURITY.md.