Batata is a high-performance service discovery, configuration management and service management platform written in Rust. It is a drop-in replacement for Nacos (V2/V3), with additional compatibility for Consul and Apollo.
- Rust-native — starts in ~1-2s and runs in ~50-100MB, versus 30-60s and 1-2GB for Java Nacos
- Drop-in compatible — Nacos V2/V3 APIs, plus Consul and Apollo compatibility layers
- Zero-dependency start — embedded RocksDB mode needs no external database
- Production ready — implements ~98% of Nacos features; Raft-based clustering, RBAC, rate limiting
Core
- Configuration management with real-time updates, history/rollback, gray release
- Service discovery with registration, health checks, subscribe/push
- Namespace isolation for multi-tenancy
- Cluster mode with Raft consensus (CP) and distro protocol (AP)
Protocol compatibility
- Nacos — full V2 and V3 API compatibility (V1 intentionally unsupported)
- Consul — Agent, Health, Catalog, KV, ACL APIs
- Apollo — Config Service (
/configs,/configfiles,/notifications/v2,/releaseMessage), Admin Service and OpenAPI; existing Apollo SDKs work unchanged, and writes are Raft-replicated in cluster mode. Seedocs/compat/apollo/ - gRPC — bidirectional streaming for SDK clients
Operations
- JWT authentication with RBAC, LDAP and OAuth2/OIDC
- Rate limiting, circuit breaker, audit logs, distributed locking
- Config import/export (Nacos ZIP, Consul JSON)
- Service mesh xDS (EDS/CDS/LDS/RDS/ADS), multi-datacenter replication, DNS discovery
- Prometheus metrics and OpenTelemetry tracing
Full comparison: docs/compat/nacos/feature-comparison.md
The web console is a separate frontend project: easynet-cn/batata-ui
- Build the UI and place its output in
console-ui/; the console server serves it (controlled bybatata.console.ui.enabled, enabled by default) - Console UI is available in
merged(default) andconsoledeployment modes - Access it at
http://localhost:8081/after startup
Ports are separated by role — the console port serves the UI only and does not expose the Nacos-compatible data APIs:
| Port | Role | Serves |
|---|---|---|
8081 |
Console | Web console UI + console APIs |
8848 |
SDK HTTP | Nacos-compatible REST API |
9848 |
SDK gRPC | Client SDK communication |
9849 |
Cluster gRPC | Inter-node / Raft communication |
Embedded RocksDB mode — no database required:
git clone https://github.com/easynet-cn/batata.git
cd batata
cargo build --release -p batata-server
./target/release/batata-server --batata.sql.init.platform=embedded
# Or use the convenience script
./scripts/start-embedded.shInitialize the admin user on first startup:
curl -X POST http://localhost:8848/nacos/v3/auth/user/admin \
-d "username=nacos&password=nacos"Then open the console at http://localhost:8081/.
MySQL / PostgreSQL setups: docs/database.md
| Port | Service | Description |
|---|---|---|
| 8848 | Main HTTP API | Nacos-compatible API |
| 8081 | Console HTTP API | Web management console |
| 8080 | Apollo HTTP API | Apollo Config/Admin/OpenAPI (use per-node ports in cluster) |
| 9848 | SDK gRPC | Client SDK communication |
| 9849 | Cluster gRPC | Inter-node communication |
| 15010 | xDS gRPC | Service mesh xDS/ADS protocol |
| Protocol | Support | Details |
|---|---|---|
| Nacos V2 / V3 | Full | V1 intentionally unsupported |
| Nacos gRPC | Full | Bidirectional streaming |
| Consul | Full | Agent, Health, Catalog, KV, ACL |
| Apollo | ~81% | Config/Admin/OpenAPI ported — docs/compat/apollo/ |
Client SDK examples: docs/api.md
Main file: conf/application.yml (fully commented — single source of truth).
Keys use the flat batata.* prefix and can be overridden by
BATATA_* environment variables or --batata.<key>=<value> CLI flags.
Most-used keys:
| Key | Default | Description |
|---|---|---|
batata.server.main.port |
8848 |
SDK HTTP port |
batata.console.port |
8081 |
Console port |
batata.deployment.type |
merged |
merged / server / console / serverWithMcp |
batata.sql.init.platform |
(empty) | mysql, postgresql, or empty (= embedded) |
batata.core.auth.enabled |
true |
Enable authentication |
Complete reference: docs/configuration.md
| Mode | Flag | Description |
|---|---|---|
merged (default) |
-d merged |
Console (8081) + Main Server (8848) in one process |
server |
-d server |
Main Server only, no console |
console |
-d console |
Console only, connects to a remote server |
serverWithMcp |
-d serverWithMcp |
Main Server + MCP Registry (9080) |
Container, Compose and Kubernetes instructions: docs/deployment.md
| Topic | Location |
|---|---|
| Architecture & crates | docs/architecture.md |
| Configuration | docs/configuration.md |
| API reference | docs/api.md |
| Deployment | docs/deployment.md |
| Database & migration | docs/database.md |
| Client SDKs | docs/api.md |
| Monitoring (metrics) | docs/configuration.md |
| Development & release | docs/development.md |
| Nacos feature comparison | docs/compat/nacos/feature-comparison.md |
| Protocol compatibility | docs/compat/ |
| Roadmap | docs/roadmap.md |
Please do not open public issues for security vulnerabilities.
Reporting instructions and response timelines are in SECURITY.md.
See CONTRIBUTING.md.
Licensed under the Apache-2.0 License — see LICENSE.