当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Design of NAND flash interface control
- How to solve the problem of blank page in Google Chrome browser
- Git SSH bad permissions
- Detailed software engineering -- the necessary graphs in each stage
- Stm32f030c6t6 compatible to replace mm32spin05pf
- VARCHART XGantt入门教程
- Bluetooth broadcast chip for Shanghai giant micro
- 失眠一个整晚上
- 大佬们如何在nginx镜像里面增加模块?
- 20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
猜你喜欢
应用层软件开发教父教你如何重构,资深程序员必备专业技能
Count the number of project code lines
2020-08-20: the difference between go and python?
Git SSH bad permissions
Es create a new index database and copy the old index library, practice pro test effective!
vue3 新特性
Git submission specification
New features of vue3
In 2020, how can wechat seal numbers be quickly lifted?
JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
随机推荐
confd
Composition of MRAM cache
PHP backdoor hiding skills
Windows 10 蓝牙管理页面'添加蓝牙或其他设备'选项点击无响应的解决方案
Empty test suite appears in JUnit test
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
How to optimize the decoding performance of dynamsoft barcode reader
September 3, 2020: naked writing algorithm: loop matrix traversal.
Yum [errno 256] no more mirrors to try solution
应用层软件开发教父教你如何重构,资深程序员必备专业技能
STlink下载出现st-link usb communication error解决方法
Insomnia all night
Google browser realizes video playback acceleration function
RFID fixed assets management system for fire equipment
Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
移动端像素适配方案
Application layer software development Godfather teaches you how to refactor, senior programmers must professional skills
The use of Xunwei imx6 development board device tree kernel menuconfig
Js字符串-String字符串对象方法
插件Bilibili新版0.5.5