- The DevOps 2.1 Toolkit:Docker Swarm
- Viktor Farcic
- 470字
- 2021-07-09 21:03:38
Docker Swarm Networking and Reverse Proxy
–Steve Jobs
Software-Defined Network (SDN) is a cornerstone of efficient cluster management. Without it, services distributed across the cluster would not be able to find each other.
Having proxies based on static configuration does not fit the world of highly dynamic scheduling. Services are created, updated, moved around the cluster, scaled and de-scaled, and so on. In such a setting, information changes all the time.
One approach we can take is to use a proxy as a central communication point and make all the services speak with each other through it. Such a setting would require us to monitor changes in the cluster continuously and update the proxy accordingly. To make our lives easier, a monitoring process would probably use one of the service registries to store the information and a templating solution that would update proxy configuration whenever a change in the registry is detected. As you can imagine, building such a system is anything but trivial.
Fortunately, Swarm comes with a brand new networking capability. In a nutshell, we can create networks and attach them to services. All services that belong to the same network can speak with each other using only the name of the service. It goes even further. If we scale a service, Swarm networking will perform round-robin load balancing and distribute the requests across all the instances. When even that is not enough, we have a new network called ingress with routing mesh that has all those and a few additional features.
Efficient usage of Swarm networking is not sufficient by itself. We still need a reverse proxy that will be a bridge between the external world and our services. Unless there are special requirements, the proxy does not need to perform load balancing (Swarm networking does that for us). However, it does need to evaluate request paths and forward requests to a destination service. Even in that case, Swarm networking helps a lot. Configuring reverse proxy becomes a relatively easy thing to do as long as we understand how networking works and can harness its full potential.
Let’s see the networking in practice.
- Word 2003、Excel 2003、PowerPoint 2003上機指導與練習
- 嵌入式系統應用
- Introduction to DevOps with Kubernetes
- 21天學通PHP
- Machine Learning for Cybersecurity Cookbook
- 計算機應用基礎·基礎模塊
- Dreamweaver 8中文版商業案例精粹
- HBase Design Patterns
- 統計策略搜索強化學習方法及應用
- 信息物理系統(CPS)測試與評價技術
- 具比例時滯遞歸神經網絡的穩定性及其仿真與應用
- 悟透AutoCAD 2009案例自學手冊
- Dreamweaver CS6中文版多功能教材
- MATLAB-Simulink系統仿真超級學習手冊
- 嵌入式Linux系統實用開發