Cluster architecture overview
A TDengine cluster includes the following core components:
| Component | Function | Description |
|---|---|---|
| taosd | Database engine | Core storage and query engine |
| taosAdapter | Adapter | Provides RESTful and WebSocket interfaces |
| taosKeeper | Monitoring exporter | Collects and exports monitoring metrics |
| taosExplorer | Visual management UI | Graphical management interface |
Four deployment methods
Manual deployment
Manual deployment is best when teams need fine-grained control over configuration and operations. It offers the most direct control over resource allocation, network settings, and production maintenance procedures.
Use cases include core business systems in large organizations and workloads with strict performance or operations requirements.
Docker deployment
Docker deployment enables fast setup for development and testing. A sample docker-compose file:
version: '3'
services:
taosd:
image: tdengine/tdengine:latest
container_name: tdengine
ports:
- "6030:6030"
- "6041:6041"
volumes:
- tdengine-data:/var/lib/taos
environment:
- TAOS_FQDN=localhost
Kubernetes deployment with Helm
helm install tdengine tdengine/tdengine \
--set cluster.enabled=true \
--set replicaCount=3
This approach fits Kubernetes-based operations and supports automated recovery and elastic scaling.
Kubernetes manual deployment
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: tdengine
spec:
serviceName: tdengine
replicas: 3
selector:
matchLabels:
app: tdengine
Cluster configuration essentials
Node configuration
CREATE DNODE "dnode1.tdengine.com";
CREATE DNODE "dnode2.tdengine.com";
CREATE DNODE "dnode3.tdengine.com";
SHOW DNODES;
Replica strategy
CREATE DATABASE demo REPLICA 3 VGROUPS 3;
SELECT * FROM information_schema.ins_vnodes;
FQDN configuration
# /etc/hosts
192.168.1.101 tdnode1 tdengine1
192.168.1.102 tdnode2 tdengine2
192.168.1.103 tdnode3 tdengine3
High availability configuration
Load balancing with Nginx
upstream tdengine {
server 192.168.1.101:6041;
server 192.168.1.102:6041;
server 192.168.1.103:6041;
}
server {
listen 6041;
proxy_pass tdengine;
}
Health check with Kubernetes liveness probe
livenessProbe:
exec:
command: ["taos", "-c", "show dnodes"]
initialDelaySeconds: 30
periodSeconds: 10
Common issues and solutions
| Issue | Solution |
|---|---|
| Nodes cannot communicate with each other | Check firewall rules and FQDN configuration |
| Data not synchronized across replicas | Verify the replica count is configured correctly |
| Write performance degradation | Increase the vgroup count |
| High memory usage | Adjust buffer and cache size settings |
Summary
- Plan capacity before deployment.
- Configure an appropriate replica count to ensure high availability.
- Deploy a monitoring system to track cluster status in real time.
- Back up data regularly to prevent unexpected data loss.


