当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Application of UHF RFID medical blood management system
- 失眠一个整晚上
- .NETCore3.1+ Vue.js Low code workflow engine
- win7如何快速打cmd并到达所要的目录
- idea 激活到 2089 失效
- Composition of MRAM cache
- 频收罚单的浦发银行:增收不增利,曾遭骗贷数亿元,内控缺位?
- 2020-11-06: go, let's talk about the scheduler.
- Application layer software development Godfather teaches you how to refactor, senior programmers must professional skills
- Test the necessary skill points of siege lion! This article takes you to interpret the testing technology under Devops
猜你喜欢
September 3, 2020: naked writing algorithm: loop matrix traversal.
win7如何快速打cmd并到达所要的目录
Utility class functions (continuous update)
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
条形码识别性能低,如何优化Dynamsoft Barcode Reader解码性能
python3操作gitlab
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
Design of NAND flash interface control
How to deploy Gantt chart quickly and correctly
小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
随机推荐
Application layer software development Godfather teaches you how to refactor, senior programmers must professional skills
Introduction to Jenkins (2) declarative pipeline
How to add modules to nginx image?
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题
如何解决谷歌Chrome浏览器空白页的问题
RECH8.0版本学习 days 12 rh134部分
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
“非洲用户的付费意愿并不低”——专访四达时代研发总监张亮
K-vim installation and the ycmd server shut down (restart with ': ycmrestartserver')
The advantages and functions of psychological counseling app
高速公路二维码定位报警系统
条形码识别器Dynamsoft Barcode Reader v7.5全新上线!
Yum [errno 256] no more mirrors to try solution
ImageMagick - add watermark
REM: the solution of PC and mobile
Shanghai Pudong Development Bank, which frequently receives penalty tickets, has been cheated by hundreds of millions of yuan in loans, and lacks of internal control?
Experiment one
7.Swarm搭建集群
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大