System Requirements
Go Version
Go 1.22 or later is required to build ValKeyper
Operating System
Linux, macOS, or Windows (with WSL recommended)
Memory
Minimum 512 MB RAM (more for production workloads)
Network
Port 6379 (default) or custom port availability
Building from Source
Install Go
If you don’t have Go installed, download it from golang.org:
Install dependencies
ValKeyper uses minimal dependencies. Download them using:Dependencies:
github.com/libp2p/go-reuseport- Socket reuse for better performance- Standard Go libraries
Build the binary
Build ValKeyper with:For optimized production builds:This reduces the binary size by stripping debug information.
Installation Methods
- Local Development
- System-wide Installation
- Custom Location
For local development, simply build and run from the project directory:
Configuration Options
ValKeyper supports command-line flags for configuration:Port Configuration
Run ValKeyper on a specific port:6379 (standard Redis port)
Persistence Configuration
Configure RDB persistence for loading data from disk:Directory where RDB files are stored
Name of the RDB file to load on startup
ValKeyper currently supports loading RDB files but does not automatically create snapshots. This feature is planned for future releases.
Replication Configuration
Configure ValKeyper as a replica (slave) node:Master server address in format
"IP PORT"Configuration File
ValKeyper includes a basicredis.conf configuration file:
Complete Configuration Example
Here’s a complete example with all options:Runtime Information
Query server configuration and status using theCONFIG and INFO commands:
Troubleshooting
Port already in use
Port already in use
If port 6379 is already in use:
Build errors
Build errors
Ensure you have Go 1.22 or later:Clean the build cache and rebuild:
RDB file not loading
RDB file not loading
Verify the file path and permissions:Check the server output for RDB parsing errors.
Replication not working
Replication not working
Ensure the master is reachable:Verify the master is running:
Building for Production
For production deployments, build with optimizations:Consider using a process manager like
systemd or supervisord to manage the ValKeyper process in production.Source Code Architecture
ValKeyper is organized into several key modules:- store.go - In-memory storage, command processing, replication, transactions
- parser.go - Redis RESP protocol encoding/decoding
- rdb.go - RDB persistence format parsing
- server.go - TCP server and connection handling
Next Steps
Quickstart
Start using ValKeyper with basic commands
Replication Setup
Configure master-slave replication
Persistence
Learn about RDB file format and data persistence
API Reference
Explore all supported commands