当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 2020-08-20: the difference between go and python?
- Two dimensional code location and alarm system of Expressway
- Yum [errno 256] no more mirrors to try solution
- A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
- New features of vue3
- A kind of super parameter optimization technology hyperopt
- Configuration of AP hotspot on xunwei-imx6ull development board
- Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
- And how to solve the conflict between pop-up menu and pop-up menu
- Three steps to understand Kerberos Protocol easily
猜你喜欢

August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.

2020-09-04: do you understand the function call convention?

Logo design company, Nanjing

小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?

August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)

How to add modules to nginx image?

Idea activation to 2089 failure
![[doodling the footprints of Internet of things] Introduction to Internet of things](/img/3b/00bc81122d330c9d59909994e61027.jpg)
[doodling the footprints of Internet of things] Introduction to Internet of things

Jenkins installation and deployment process

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?
随机推荐
Js字符串-String字符串对象方法
Benefits and functions of auto maintenance app development
How does LeadTools detect, read and write barcodes
JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
Bluetooth broadcast chip for Shanghai giant micro
Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
cubemx做stm32 USB开发
Getting started with varhart xgantt
vue3 新特性
yum [Errno 256] No more mirrors to try 解决方法
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
.NETCore3.1+ Vue.js Low code workflow engine
2020-08-17: how to solve data skew in detail?
Git submission specification
Empty test suite appears in JUnit test
Jenkins installation and deployment process
K-vim installation and the ycmd server shut down (restart with ': ycmrestartserver')
应用层软件开发教父教你如何重构,资深程序员必备专业技能
Win7 how to quickly type CMD and get to the required directory
Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification