Configuration and registry center implemented in Rust, referencing the design of Nacos, simple and easy to use, using Raft to ensure data consistency across cluster nodes.
If you are building distributed or microservices applications using Rust, Conreg might be a good choice.
Supported OS:
- Ubuntu
- CentOS
- Other common Linux distributions (we compile with
musl, theoretically supporting all major Linux distributions)
Supported architectures:
- x86_64
- arm64
Configuration Center:
- Namespace isolation
- Configuration CRUD operations
- Consistency synchronization (Raft)
- Configuration history records
- Configuration recovery
- Configuration import/export
Registry Center:
- Namespace isolation
- Service registration
- Heartbeat detection
- Instance metadata
Security:
- Login verification
- OpenAPI authentication
- Configuration content encryption
Client SDK(conreg-client):
- Configuration retrieval
- Service registration
- Service discovery
- Load balancing
Cluster Management Tool:
- Cluster initialization
- Cluster scaling out
- Cluster scaling in
- Raft status monitoring
- Cluster upgrade
- Cluster backup
Web UI:
- Basic UI
- Embedding and Integration
# Download package
curl -L https://github.com/xgpxg/conreg/releases/latest/download/conreg-server-x86_64.tar.gz | tar -zxvf - -C .
# Start server
conreg-server -p 8000Open with browser: http://127.0.0.1:8000
Default username and password: conreg/conreg
In production environments, cluster deployment is generally recommended. The following example uses a 3-node cluster:
# Download package
curl -L https://github.com/xgpxg/conreg/releases/latest/download/conreg-server-x86_64.tar.gz
# Unzip package
tar -zxvf conreg-server.tar.gz -C ./conreg1
tar -zxvf conreg-server.tar.gz -C ./conreg2
tar -zxvf conreg-server.tar.gz -C ./conreg3
# Start server
conreg1/conreg-server -p 8001 -d ./conreg1/data1 -m cluster -n 1
conreg2/conreg-server -p 8002 -d ./conreg2/data2 -m cluster -n 2
conreg3/conreg-server -p 8003 -d ./conreg3/data3 -m cluster -n 3
# Initialize cluster
curl -X POST http://127.0.0.1:8001/api/cluster/init -d [[1,"127.0.0.1:8001"],[2,"127.0.0.1:8002"],[3,"127.0.0.1:8003"]]You can use proxy components, such as Nginx, to proxy cluster nodes so that you can view the backend pages through a browser, or you can directly access any node in the cluster.
For cluster management (such as initialization, scaling out, scaling in, monitoring, etc.), we provide a CLI tool for cluster management: conreg-cmt, which can be used conveniently
Usage: conreg-cmt --server <SERVER> <COMMAND>
Commands:
init Initialize the cluster
add-learner Add a learner node to the cluster
promote Promote some learner node to a full member, must call "add-learner" first
remove-node Remove a node from the cluster
status Get cluster status
monitor Monitor cluster status
help Print this message or the help of the given subcommand(s)
Options:
-s, --server <SERVER> Address of any node in the cluster [default: 127.0.0.1:8000]
-h, --help Print help
-V, --version Print versionconreg-client is a client SDK for Conreg, used for integration into your Rust applications.
For example, you can easily get the configuration content using AppConfig::get('key') without restarting the
application.
You can view the detailed documentation from conreg-client
Look here: conreg-ui
Test machine (Windows WSL): Intel i7-8750H, 6 cores 12 threads, 16G memory.
Tested with 1 million requests and use standalone mode.
| Operation | Performance | Notes |
|---|---|---|
| Configuration write | 1.3k/s | - |
| Configuration read | 11k/s | Without cache enabled |
| Configuration read | 52k/s | With cache enabled |
| Service instance registration | 1.1k/s | - |
| Service instance query | 55k/s | - |
| Service instance heartbeat | 1.4k/s | - |
Memory stable usage at 55.7M