Skip to content

Deployment and Operations Architecture ​

Architecture Goals ​

The deployment architecture focuses on quick delivery, clear dependencies, persistent data, and diagnosable issues. The common commercial edition delivery method is Docker Compose orchestration, including Nginx, Java backend, Redis, MySQL, EMQX, ZLMediaKit, TDengine, and related components. For higher availability and larger scale, combine this with Cluster Edition Docs.

Container Topology ​

Deployment Modes ​

ModeScenarioDescription
Docker quick deploymentDemo, testing, low-cost evaluationStart complete dependencies quickly through Compose
Source-code development deploymentSecondary development and integrationStart backend, frontend, databases, and middleware separately
Commercial production deploymentFormal deliveryConfigure license, domain, SSL, backup, monitoring, and security policies
Cluster deploymentHigh concurrency, high availability, multi-nodePlan server clusters, Web clusters, and load balancing using the cluster docs

Service Responsibilities ​

ServiceResponsibilityOperations Focus
NginxStatic resources, HTTPS, API reverse proxy, WebSocket proxyCertificates, paths, timeouts, logs
Java backendPlatform APIs, device access, rules, notifications, video callbacksJVM, logs, upload directory, license file
RedisCache, sessions, distributed locksPassword, memory, persistence, internal-network access
MySQLBusiness master dataInitialization, backup, slow SQL, character set
EMQX/NettyMQTT access and message routingAuthentication callback, ACL, connections, ports
ZLMediaKitStream pulling, forwarding, recordingHook URL, port ranges, recording directory
TDengineTime-series data storageData directory, log directory, disk space

Port Planning ​

ComponentCommon Ports
Nginx80, 443
Java backend8080, 8081, 5683, 8888, 8889, 5061
EMQX1883, 8083, 8084, 18083
Redis6379
MySQL3306
ZLMediaKit554, 1935, 8000, 9000, 10000, 30000-30100
TDengine6030, 6041, 6043-6049

Only expose necessary ports in production. Databases, Redis, time-series stores, and internal management ports should be restricted to internal networks or security groups.

Persistence and Backup ​

  • Redis, MySQL, TDengine, Nginx logs, upload directories, and video recording directories should be mounted to the host or persistent storage.
  • Initialization SQL, upgrade SQL, license files, certificates, and configuration files must be included in the delivery checklist.
  • Database backups should be restored regularly in drills to avoid unusable backups.
  • Video recordings and time-series data grow quickly, so retention periods and disk-capacity alerts are required.

Launch Checklist ​

  1. Domain, SSL certificate, Nginx reverse proxy, and static asset paths have been verified.
  2. Backend services can access MySQL, Redis, EMQX/Netty, TDengine, and ZLMediaKit.
  3. Device MQTT/HTTP/CoAP access paths and authentication flows have been verified.
  4. Rule engine, alarm notifications, video callbacks, and file upload directories are available.
  5. Log directories, database backup, monitoring indicators, and alarm notifications are configured.
  6. Commercial license configuration is complete and delivery records are retained.

Troubleshooting Order ​

  • Page unavailable: check Nginx access logs, error logs, and static asset paths first.
  • API error: check Java application logs, database connection, and Redis status.
  • Device offline: check MQTT Broker, authentication callback, ACL, topics, and firewall.
  • Video unavailable: check ZLMediaKit hooks, port mapping, stream URL, and recording directory permissions.
  • Startup failure: check mounted directory permissions, port conflicts, container logs, and configuration-file format.

FastBee | fastbee.cn