当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Points to be considered when deleting mapping field of index in ES
- How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
- Python3 operating gitlab
- STlink下载出现st-link usb communication error解决方法
- [doodling the footprints of Internet of things] Introduction to Internet of things
- LEADTOOLS如何检测,读取和写入条形码
- 大佬们如何在nginx镜像里面增加模块?
- 2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
- Plug in bilibilibili new version 0.5.5
- How to optimize the decoding performance of dynamsoft barcode reader
猜你喜欢

Unexpected element.. required element

September 3, 2020: naked writing algorithm: loop matrix traversal.

The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud

win7如何快速打cmd并到达所要的目录

K-vim installation and the ycmd server shut down (restart with ': ycmrestartserver')

k-vim安装及The ycmd server SHUT DOWN (restart with ':YcmRestartServer')这种错误的解决方法

Cloudquery v1.2.0 release

Do you really know how to use search engines?

vue3 新特性

pc端与移动端适配解决方案之rem
随机推荐
August 14, 2020: what are the execution engines for data tasks?
The method of local search port number occupation in Windows system
confd
Stm32f030k6t6 compatible replacement smart mm32f031k6t6
Logo design company, Nanjing
Git remote library rollback specified version
C# 枚举权限 |和||,&和&&的区别
The use of Xunwei imx6 development board device tree kernel menuconfig
如何才能快速正确的部署甘特图
Idea activation to 2089 failure
Jenkins installation and deployment process
Nanjing logo design and production, guide VI system design
2018中国云厂商TOP5:阿里云、腾讯云、AWS、电信、联通 ...
移动端像素适配方案
Nonvolatile MRAM memory used in all levels of cache
#JVM 类加载机制
Git submission specification
A good thing for working people -- to temper the will of iron and steel requires such an efficient computer
Git SSH bad permissions
小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?