当前位置:网站首页>9. Routingmesh service communication between clusters
9. Routingmesh service communication between clusters
2020-11-07 16:43:00 【Taizhu-yj】
establish overlay gateway
docker network create -d overlay demo
docker network ls
NETWORK ID NAME DRIVER SCOPE
7a511becede2 bridge bridge local
im7c34k0bfxh demo overlay swarm
37856c9de79d docker_gwbridge bridge local
c438996bf1e8 host host local
idnr3c47eum5 ingress overlay swarm
a785589db128 lb-scale_default bridge local
14865f2115c6 none null local
e9bba04074f1 wordpress_my-bridge bridge local
establish Service Use network by overlay
As shown in the figure above , We have three applications , Two service One client. They may be deployed in the same worker node On , It may also be deployed separately . The three applications in the picture above , At the same time, it is deployed in 127.0.0.11 On this node .client Want to visit service application , Can pass ip+ The form of the port number , It can also be accessed by application name . How to do it ?docker engine There's one in it DNS service , It sorts out the names of all the applications with IP Address mapping , however Docker DNS Generated and stored in the service IP Address , Not the container where the application is located IP Address , Applications are deployed in 127.0.0.11 nodes , But we see that DNS Stored in ip The address is 10.0.3/4/5, This is virtual IP,VIP. Because the container address of the deployed application changes due to downtime or capacity expansion ,DNS Assign an application a virtual IP, This virtual IP It won't change . So the application is virtual IP Visit each other , Re pass LVS To achieve the .
nslookup www.baidu.com/service name
You can check the domain name corresponding to ip Address , If the domain name is deployed in a cluster , It 's load balanced , It will also show multiple ip Address .
1. When we deploy applications in containers , You need to specify network,network Must be overlay Network protocol , It looks like swarm Of DNS Will use vip To communicate with each other .
2. If the deployed application is bound to an interface , Even if it's deployed on a node , You can also visit swarm This port number of other nodes in the , To access the app .
版权声明
本文为[Taizhu-yj]所创,转载请带上原文链接,感谢
边栏推荐
- The memorandum model of behavior model
- #JVM 类加载机制
- gitlab 持续集成开发环境之CI/CD
- 如何创建交互式内核密度图表
- VARCHART XGantt如何在日历上表示工作日
- 20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
- win7如何快速打cmd并到达所要的目录
- Logo design company, Nanjing
- Unexpected element.. required element
- 2020-08-15: under what circumstances should data tasks be optimized?
猜你喜欢
Windows 10 蓝牙管理页面'添加蓝牙或其他设备'选项点击无响应的解决方案
August 14, 2020: what are the execution engines for data tasks?
win7 APPCRASH(解决方法)(转)
Insomnia all night
How to optimize the decoding performance of dynamsoft barcode reader
Application of UHF RFID medical blood management system
汽车维修app开发的好处与功能
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王旭
谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
VARCHART XGantt如何在日历上表示工作日
随机推荐
Git remote library rollback specified version
vue3 新特性
Getting started with varhart xgantt
confd
Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom
cubemx做stm32 USB开发
Gantt chart grouping activities tutorial
失眠一个整晚上
About Devops seven misunderstandings, 99% of people have been hit!
The method of local search port number occupation in Windows system
jenkins pipline stage 设置超时
How does varhart xgantt represent working days on a calendar
How to add modules to nginx image?
11.Service更新
python3操作Jenkins模块api
Common mathematical basic formulas of recursive and backtracking algorithms
9.集群之间服务通信 RoutingMesh
gitlab 持续集成开发环境之CI/CD
Python3 operating gitlab
python3操作gitlab