当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 关于DevOps的七大误解,99%的人都曾中过招!
- 频收罚单的浦发银行:增收不增利,曾遭骗贷数亿元,内控缺位?
- Jenkins installation and deployment process
- JS string - string string object method
- Two dimensional code location and alarm system of Expressway
- Stm32f030f4p6 compatible with smart micro mm32f031f4p6
- Idea activation to 2089 failure
- 20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
- 移动端像素适配方案
- Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
猜你喜欢
20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
Developing STM32 USB with cubemx
2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?
嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:王旭
Benefits and functions of auto maintenance app development
垃圾分类知识竞赛
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题
The method of local search port number occupation in Windows system
Jenkins入门(二)声明式流水线Jenkins Pipeline
大佬们如何在nginx镜像里面增加模块?
随机推荐
confd
JS string - string string object method
2020年新规,微信封号怎么快速解除?
k-vim安装及The ycmd server SHUT DOWN (restart with ':YcmRestartServer')这种错误的解决方法
[graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
如何解决谷歌Chrome浏览器空白页的问题
8. Swarm creates maintenance and horizontal extension service
FreeSWITCH视频会议“标准”解决方案
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
September 3, 2020: naked writing algorithm: loop matrix traversal.
Two dimensional code location and alarm system of Expressway
Jenkins pipline stage setting timeout
垃圾分类知识竞赛
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
python3操作gitlab
Unexpected element.. required element
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
2020-08-20: the difference between go and python?