Docker and Microservices: Architecture, Orchestration, Networking, Storage, Monitoring, and Scaling at Hujiang
The article details Hujiang's practical experience deploying microservices with Docker, evaluating orchestration tools, network and storage solutions, monitoring approaches, and automatic scaling, and demonstrates how Docker improves deployment density, QPS, and resource efficiency compared to traditional architectures.
Docker and microservices are often associated, but they are independent; Docker provides lightweight containerization while microservices focus on business decomposition.
Hujiang split its traditional services into microservices and deployed them using Docker, Mesos, and Marathon, illustrating the service granularity based on a two‑week rewrite principle.
The article discusses orchestration tool choices, comparing Mesos+Marathon, Kubernetes, and Docker Swarm, and explains why Mesos+Marathon was selected for its performance and stability.
Network solutions are evaluated, with Docker Network chosen over Flannel due to lower CPU usage and kernel‑level packet handling; recommendations include Linux kernel ≥ 4.4 and Docker ≥ 1.11.
Storage strategies combine Docker volume drivers and Kubernetes volumes, using both local and Ceph‑based distributed storage.
Monitoring relies on Mesos metrics, while log collection uses Logstash, Elasticsearch, and Kibana.
Automatic scaling is achieved with Mesos, Consul, Consul‑Template, and Marathon, enabling dynamic addition and removal of containers based on resource thresholds.
Performance comparisons show Docker deployment increasing QPS and reducing resource consumption compared to traditional applications.
Hujiang Technology
We focus on the real-world challenges developers face, delivering authentic, practical content and a direct platform for technical networking among developers.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.