日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

consul 自动发现与自动注册

發(fā)布時(shí)間:2024/9/3 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 consul 自动发现与自动注册 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

文章目錄

  • 一: Consul 概述
    • 1.1 什么是服務(wù)發(fā)現(xiàn)與注冊(cè)
    • 1.2 什么是consul
  • 二: consul 的部署
    • 2.1 拓?fù)?/li>
    • 2.2 consul服務(wù)器建立consul服務(wù)
      • 2.2.1 安裝并啟動(dòng)服務(wù)
      • 2.2.2 consul監(jiān)聽(tīng)的5個(gè)端口
      • 2.3 集群的狀態(tài)信息查看
      • 2.2.4 通過(guò)http api獲取集群信息
    • 2.3 registrator 服務(wù)器配置
      • 2.3.1 安裝Gliderlabs/Registrator
      • 2.3.2 consul 為什么可以實(shí)現(xiàn)自動(dòng)發(fā)現(xiàn)
      • 2.3.3 測(cè)試服務(wù)發(fā)現(xiàn)功能
      • 2.3.4 驗(yàn)證http和nginx服務(wù)是否注冊(cè)到consul
  • 三: consul-temple
    • 3.1在 Consul 服務(wù)器上,準(zhǔn)備template nginx模板文件
    • 3.2 編譯安裝nginx
    • 3.3 consul 服務(wù)端配置nginx
    • 3.4 配置并啟動(dòng)template
    • 3.5 訪問(wèn)template-nginx
    • 3.6 增加一個(gè)nginx容器節(jié)點(diǎn)
      • 3.6.1 加一個(gè) nginx 容器節(jié)點(diǎn),測(cè)試服務(wù)發(fā)現(xiàn)及配置更新功能
      • 3.6.2在consul端 觀察 template 服務(wù)
      • 3.6.3 查看三臺(tái) nginx 容器日志,請(qǐng)求正常輪詢(xún)到各個(gè)容器節(jié)點(diǎn)上
  • 四: consul多節(jié)點(diǎn)
    • 4.1 添加一臺(tái)已有docker環(huán)境的服務(wù)器加入已有的群集中
    • 4.2 查看集群狀態(tài)

一: Consul 概述

1.1 什么是服務(wù)發(fā)現(xiàn)與注冊(cè)

服務(wù)注冊(cè)與發(fā)現(xiàn)是微服務(wù)架構(gòu)中不可或缺的重要組件。

起初服務(wù)都是單節(jié)點(diǎn)的,不保障高可用性,也不考慮服務(wù)的壓力承載,服務(wù)之間調(diào)用單純的通過(guò)接口訪問(wèn)。直到后來(lái)出現(xiàn)了多個(gè)節(jié)點(diǎn)的分布式架構(gòu),起初的解決手段是在服務(wù)前端負(fù)載均衡,這樣前端必須要知道所有后端服務(wù)的網(wǎng)絡(luò)位置,并配置在配置文件中。

這里就會(huì)有幾個(gè)問(wèn)題:

  • 如果需要調(diào)用后端服務(wù)A-N,就需要配置N個(gè)服務(wù)的網(wǎng)絡(luò)位置,配置很麻煩
  • 后端服務(wù)的網(wǎng)絡(luò)位置變化,都需要改變每個(gè)調(diào)用者的配置

既然有這些問(wèn)題,那么服務(wù)注冊(cè)與發(fā)現(xiàn)就是解決這些問(wèn)題的。后端服務(wù)A-N可以把當(dāng)前自己的網(wǎng)絡(luò)位置注冊(cè)到服務(wù)發(fā)現(xiàn)模塊,服務(wù)發(fā)現(xiàn)就以K-V的方式記錄下來(lái), K一般是服務(wù)名, v就是IP: PORT,服務(wù)發(fā)現(xiàn)模塊定時(shí)的進(jìn)行健康檢查,輪詢(xún)查看這些后端服務(wù)能不能訪問(wèn)的了。前端在調(diào)用后端服務(wù)A-N的時(shí)候,就跑去服務(wù)發(fā)現(xiàn)模塊問(wèn)下它們的網(wǎng)絡(luò)位置,然后再調(diào)用它們的服務(wù)。這樣的方式就可以解決上面的問(wèn)題了,前端完全不需要記錄這些后端服務(wù)的網(wǎng)絡(luò)位置,前端和后端完全解耦!

1.2 什么是consul

什么是consul:

  • consul是google開(kāi)源的一個(gè)使用go語(yǔ)言開(kāi)發(fā)的服務(wù)管理軟件支持多數(shù)據(jù)中心、分布式高可用的、服務(wù)發(fā)現(xiàn)和配置共享
  • 采用Raft算法,用來(lái)保證服務(wù)的高可用
  • 內(nèi)置了服務(wù)注冊(cè)與發(fā)現(xiàn)框架、分布一致性協(xié)議實(shí)現(xiàn)、健康檢查、Key/Value存儲(chǔ)、多數(shù)據(jù)中心方案,不再需要依賴(lài)其他工具(比如zookeeper等) 。
  • 服務(wù)部署簡(jiǎn)單,只有一個(gè)可運(yùn)行的二進(jìn)制的包。
  • 每個(gè)節(jié)點(diǎn)都需要運(yùn)行agent,他有兩種運(yùn)行模式server和client。
  • 每個(gè)數(shù)據(jù)中心官方建議需要3或5個(gè)server節(jié)點(diǎn)以保證數(shù)據(jù)安全,同時(shí)保證server-leader的選舉能夠正確的進(jìn)行。
  • consul的的模式(client模式和sever模式):

    • 在client模式下,所有注冊(cè)到當(dāng)前節(jié)點(diǎn)的服務(wù)會(huì)被轉(zhuǎn)發(fā)到server節(jié)點(diǎn),本身是不持久化這些信息。

    • 在server模式下,功能和client模式相似,唯一不同的是,它會(huì)把所有的信息持久化到本地,這樣遇到故障,信息是可以被保留的。

      • server-leader是所有server節(jié)點(diǎn)的老大,它和其它server節(jié)點(diǎn)不同的是,它需要負(fù)責(zé)同步注冊(cè)的信息給其它的server節(jié)點(diǎn),同時(shí)也要負(fù)責(zé)各個(gè)節(jié)點(diǎn)的健康監(jiān)測(cè)。

    consul提供的一些關(guān)鍵特性:

    • 服務(wù)注冊(cè)與發(fā)現(xiàn): consul通過(guò)DNS或者HTTP接口使服務(wù)注冊(cè)和服務(wù)發(fā)現(xiàn)變的很容易,一些外部服務(wù),例如saas提供的也可以一樣注冊(cè)。
    • 健康檢查: 健康檢測(cè)使consu1可以快速的告警在集群中的操作。和服務(wù)發(fā)現(xiàn)的集成,可以防止服務(wù)轉(zhuǎn)發(fā)到故障的服務(wù)上面。
    • Key/Value存儲(chǔ):一個(gè)用來(lái)存儲(chǔ)動(dòng)態(tài)配置的系統(tǒng)。提供簡(jiǎn)單的HTTP接口,可以在任何地方操作。
    • 多數(shù)據(jù)中心:無(wú)需復(fù)雜的配置,即可支持任意數(shù)量的區(qū)域。

    安裝consul是用于服務(wù)注冊(cè),也就是容器本身的一些信息注冊(cè)到consul里面,其他程序可以通過(guò)consul獲取注冊(cè)的相關(guān)服務(wù)信息,這就是服務(wù)注冊(cè)與發(fā)現(xiàn)。

    二: consul 的部署

    2.1 拓?fù)?/h2> 節(jié)點(diǎn)服務(wù)
    consul服務(wù)器: 192.168.23.103consul服務(wù),nginx服務(wù),consul-template守護(hù)進(jìn)程
    registraotor服務(wù)器:192.168.23.104運(yùn)行registrator容器,nginx容器

    2.2 consul服務(wù)器建立consul服務(wù)

    2.2.1 安裝并啟動(dòng)服務(wù)

    #解壓軟件包,安裝服務(wù) [root@host103 ~]# mkdir /opt/consul [root@host103 ~]# cp /opt/consul_0.9.2_linux_amd64.zip /opt/consul/ [root@host103 ~]# cd /opt/consul/ [root@host103 consul]# unzip consul_0.9.2_linux_amd64.zip [root@host103 consul]# mv consul /usr/local/bin/#設(shè)置代理,在后臺(tái)啟動(dòng)consul 服務(wù)端 [root@host103 consul]# consul agent \ -server \ -bootstrap \ -ui \ -data-dir=/var/lib/consul-data \ -bind=192.168.23.103 \ -client=0.0.0.0 \ -node=consul-server01 &> /var/log/consul.log &

    -server: 以server身份啟動(dòng)。默認(rèn)是client。

    -bootstrap :用來(lái)控制一個(gè)server是否在bootstrap模式,在一個(gè)數(shù)據(jù)中心中只能有一個(gè)server處于bootstrap模式,當(dāng)一個(gè)server處于bootstrap模式時(shí),可以自己選舉為server-leader.

    -bootstrap-expect=2 :集群要求的最少server數(shù)量,當(dāng)?shù)陀谶@個(gè)數(shù)量,集群即失效。

    -ui:指定開(kāi)啟UI界面,這樣可以通過(guò)http://localhost:8500/ui這樣的地址訪問(wèn)consul自帶的web UI界面。

    -data-dir:指定數(shù)據(jù)存儲(chǔ)目錄。

    -bind :指定用來(lái)在集群內(nèi)部的通訊地址,集群內(nèi)的所有節(jié)點(diǎn)到此地址都必須是可達(dá)的,默認(rèn)是0.0.0.0

    -client :指定consul綁定在哪個(gè)client地址上,這個(gè)地址提供HTTP, DNS,RPC等服務(wù),默認(rèn)是127.0.0.1.

    -node:節(jié)點(diǎn)在集群中的名稱(chēng),在一個(gè)集群中必須是唯一的,默認(rèn)是該節(jié)點(diǎn)的主機(jī)名。

    -datacenter :指定數(shù)據(jù)中心名稱(chēng),默認(rèn)是dc1.

    2.2.2 consul監(jiān)聽(tīng)的5個(gè)端口

    #查看consul 默認(rèn)監(jiān)聽(tīng)的5個(gè)端口 [root@host103 docker]# netstat -natp | grep consul tcp 0 0 192.168.23.103:8300 0.0.0.0:* LISTEN 48211/consul tcp 0 0 192.168.23.103:8301 0.0.0.0:* LISTEN 48211/consul tcp 0 0 192.168.23.103:8302 0.0.0.0:* LISTEN 48211/consul tcp6 0 0 :::8500 :::* LISTEN 48211/consul tcp6 0 0 :::8600 :::* LISTEN 48211/consul

    2.3 集群的狀態(tài)信息查看

    #memebers狀態(tài) [root@host103 consul]# consul members Node Address Status Type Build Protocol DC consul-server01 192.168.23.103:8301 alive server 0.9.2 2 dc1#查看集群狀態(tài) [root@host103 consul]# consul operator raft list-peers Node ID Address State Voter RaftProtocol consul-server01 192.168.23.103:8300 192.168.23.103:8300 leader true 2[root@host103 consul]# consul info | grep leaderleader = trueleader_addr = 192.168.23.103:8300

    2.2.4 通過(guò)http api獲取集群信息

    #查看集群server成員 [root@host103 consul]# curl 127.0.0.1:8500/v1/status/peers ["192.168.23.103:8300"] #查看集群server-leader [root@host103 consul]# curl 127.0.0.1:8500/v1/status/leader "192.168.23.103:8300" #查看注冊(cè)的所有服務(wù)(當(dāng)前還沒(méi)有) [root@host103 consul]# curl 127.0.0.1:8500/v1/status/services #查看nginx的服務(wù)信息 [root@host103 consul]# curl 127.0.0.1:8500/v1/status/nginx #查看集群的節(jié)點(diǎn)詳細(xì)信息 [root@host103 consul]# curl 127.0.0.1:8500/v1/status/nodes

    2.3 registrator 服務(wù)器配置

    容器服務(wù)自動(dòng)加入Nginx集群

    2.3.1 安裝Gliderlabs/Registrator

    Gliderlabs/Registrator可檢查容器運(yùn)行狀態(tài)自動(dòng)注冊(cè),還可以注銷(xiāo)docker 容器的服務(wù)到服務(wù)配置中心。目前支持Consul,Etcd和SkyDNS2

    [root@host104 ~]# docker run -d \ > --name=registrator \ > --net=host \ > -v /var/run/docker.sock:/tmp/docker.sock \ > --restart=always \ > gliderlabs/registrator:latest \ > --ip=192.168.23.104 \ > consul://192.168.23.103:8500

    –net=host :把運(yùn)行的docker容器設(shè)定為host網(wǎng)絡(luò)模式。
    -v /var/run/docker.sock:/tmp/docker.sock :把宿主機(jī)的Docker守護(hù)進(jìn)程(Docker daemon)默認(rèn)監(jiān)聽(tīng)的Unix域套接字掛載到容器中。
    –restart=always :設(shè)置在容器退出時(shí)總是重啟容器。
    –ip :剛才把network指定了host模式,所以我們指定ip為宿主機(jī)的ip。
    consul :指定consul服務(wù)器的IP和端口。

    2.3.2 consul 為什么可以實(shí)現(xiàn)自動(dòng)發(fā)現(xiàn)

    被監(jiān)控的節(jié)點(diǎn)服務(wù)器上,nginx容器的服務(wù)啟動(dòng)后,并做了端口映射后,會(huì)將映射的信息寫(xiě)入到宿主機(jī)的docker.sock文件

    registrator自動(dòng)發(fā)現(xiàn)模塊會(huì)監(jiān)控宿主機(jī)的docker.sock ,就會(huì)發(fā)現(xiàn)nginx服務(wù)。

    registrator 會(huì)將信息寫(xiě)入到consul的自動(dòng)注冊(cè)模塊,通過(guò)8500 web ui 展示

    2.3.3 測(cè)試服務(wù)發(fā)現(xiàn)功能

    #--name 指定容器名,-h指定容器主機(jī)名 [root@host104 ~]# docker run -itd -p:83:80 --name web-01 -h test01 nginx [root@host104 ~]# docker run -itd -p:84:80 --name web-02 -h test02 nginx[root@host104 ~]# docker run -itd -p:88:80 --name web-03 -h test03 httpd [root@host104 ~]# docker run -itd -p:89:80 --name web-04 -h test04 httpd

    2.3.4 驗(yàn)證http和nginx服務(wù)是否注冊(cè)到consul

    瀏覽器中,輸入 http://192.168.23.103:8500,在 Web 頁(yè)面中“單擊 NODES”,然后單擊“consurl-server01”,會(huì)出現(xiàn) 5 個(gè)服務(wù)。

    //在consul服務(wù)器使用curl測(cè)試連接服務(wù)器

    curl 127.0.0.1:8500/v1/catalog/services
    {“consul”:[],“httpd”:[],“nginx”:[]}

    三: consul-temple

    Consul-Template是基于Consul的自動(dòng)替換配置文件的應(yīng)用。Consul-Template是一個(gè)守護(hù)進(jìn)程,用于實(shí)時(shí)查詢(xún)Consul集群信息,并更新文件系統(tǒng)上任意數(shù)量的指定模板,生成配置文件。更新完成以后,可以選擇運(yùn)行 shell 命令執(zhí)行更新操作,重新加載 Nginx。

    Consul-Template可以查詢(xún)Consul中的服務(wù)目錄、Key、Key-values 等。這種強(qiáng)大的抽象功能和查詢(xún)語(yǔ)言模板可以使 Consul-Template 特別適合動(dòng)態(tài)的創(chuàng)建配置文件。例如:創(chuàng)建Apache/Nginx Proxy Balancers 、 Haproxy Backends等。

    3.1在 Consul 服務(wù)器上,準(zhǔn)備template nginx模板文件

    [root@host103 ~]# vim /opt/consul/nginx.ctmpl #定義nginx的upstream 模板 upstream http_backend {{{range service "nginx"}}server {{.Address}}:{{.Port}};{{end}} } #定義一個(gè)server,監(jiān)聽(tīng)8000端口,反向代理到upstream server {#監(jiān)聽(tīng)8000端口,訪問(wèn)就使用端口8000listen 8000;server_name 192.168.23.103;access_log /var/log/nginx/mynet.com-access.log; #定義首頁(yè)文件 index index.html index.php;location / { #記錄所有轉(zhuǎn)發(fā)路徑,使得后端的節(jié)點(diǎn)服務(wù)器可以獲取真正的客戶(hù)端地址,而不是去獲得代理端的ip地址。proxy_set_header HOST $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header Client-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;#最后通過(guò)proxy_pass 進(jìn)行7層轉(zhuǎn)發(fā)proxy_pass http://http_backend;} }

    3.2 編譯安裝nginx

    [root@host103 nginx-1.12.0]# ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/ make [root@host103 ~]# useradd -M -s /sbin/nologin nginx [root@host103 opt]# ls nginx-1.12.0.tar.gz nginx-1.12.0.tar.gz[root@host103 opt]#tar zxvf nginx-1.12.0.tar.gz -C /opt/ [root@host103 nginx-1.12.0]#cd /opt/nginx-1.12.0/ [root@host103 nginx-1.12.0]#./configure --prefix=/usr/local/nginx --user=nginx --group=nginx && make && make install[root@host103 nginx-1.12.0]# ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/

    3.3 consul 服務(wù)端配置nginx

    [root@host103 nginx-1.12.0]# vim /usr/local/nginx/conf/nginx.conf http{ ...... #配置添加虛擬主機(jī)目錄 19// include vhost/*.conf; ..... }#創(chuàng)建虛擬主機(jī)目錄 [root@host103 nginx-1.12.0]# mkdir /usr/local/nginx/conf/vhost#創(chuàng)建日志文件目錄 [root@host103 nginx-1.12.0]# mkdir /var/log/nginx#啟動(dòng)nginx [root@host103 sbin]# cd /usr/local/nginx/sbin/ [root@host103 sbin]# ./nginx [root@host103 sbin]# netstat -natp | grep :80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 52564/nginx: master

    3.4 配置并啟動(dòng)template

    #上傳軟件包到 /opt目錄 [root@host103 ~]# cd /opt/ [root@host103 opt]# ls consul-template_0.19.3_linux_amd64.zip consul-template_0.19.3_linux_amd64.zip#解壓軟件包 [root@host103 opt]# unzip consul-template_0.19.3_linux_amd64.zip [root@host103 opt]# mv consul-template /usr/local/bin/#//在前臺(tái)啟動(dòng) template 服務(wù),啟動(dòng)后不要按 ctrl+c 中止 consul-template 進(jìn)程 #consul-addr 指定consul服務(wù)器的IP和端口 #--template指定模板文件:nginx配置文件: nginx重載配置文件命令 #--log-level=info :配置日志信息級(jí)別 [root@host103 opt]# consul-template --consul-addr 192.168.23.103:8500 \ --template "/opt/consul/nginx.ctmpl:/usr/local/nginx/conf/vhost/mynet.conf:/usr/local/nginx/sbin/nginx -s reload" \ --log-level=info#重開(kāi)終端,查看生成的配置文件 [root@host103 ~]# vim /usr/local/nginx/conf/vhost/mynet.conf upstream http_backend {server 192.168.23.104:83;server 192.168.23.104:84;}server {listen 8000;server_name 192.168.23.103;access_log /var/log/nginx/mynet.com-access.log;index index.html index.php;location / {proxy_set_header HOST $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header Client-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass http://http_backend;} }

    3.5 訪問(wèn)template-nginx

    #為nginx容器寫(xiě)入網(wǎng)頁(yè)文件(容器的nginx網(wǎng)頁(yè)目錄是/usr/share/nginx/html) [root@host104 ~]# docker exec -it web-01 bash -c "echo 'this is web-01' > /usr/share/nginx/html/index.html" [root@host104 ~]# docker exec -it web-02 bash -c "echo 'this is web-02' > /usr/share/nginx/html/index.html"#訪問(wèn)測(cè)試 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-02 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-01 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-02 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-01

    3.6 增加一個(gè)nginx容器節(jié)點(diǎn)

    3.6.1 加一個(gè) nginx 容器節(jié)點(diǎn),測(cè)試服務(wù)發(fā)現(xiàn)及配置更新功能

    #增加一個(gè)nginx容器節(jié)點(diǎn),測(cè)試服務(wù)發(fā)現(xiàn)及配置更新功能。 [root@host104 ~]# docker run -itd -p 85:80 --name web-05 -h test05 nginx #為新的nginx容器寫(xiě)入網(wǎng)站文件 [root@host104 ~]# docker exec -it web-05 bash -c "echo 'this is web-05' > /usr/share/nginx/html/index.html" #訪問(wèn)測(cè)試 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-01 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-02 [root@host104 ~]# curl http://192.168.23.103:8000 this is web-05

    3.6.2在consul端 觀察 template 服務(wù)

    #在consul端觀察 template 服務(wù),會(huì)從模板更新/usr/local/nginx/conf/vhost/kgc.conf 文件內(nèi)容,并且重載 nginx 服務(wù)。 [root@host103 ~]# cat /usr/local/nginx/conf/vhost/mynet.conf upstream http_backend {server 192.168.23.104:83;server 192.168.23.104:84;#新加入的節(jié)點(diǎn)server 192.168.23.104:85;} .........

    3.6.3 查看三臺(tái) nginx 容器日志,請(qǐng)求正常輪詢(xún)到各個(gè)容器節(jié)點(diǎn)上

    docker logs -f test-01 docker logs -f test-02 docker logs -f test-05

    四: consul多節(jié)點(diǎn)

    4.1 添加一臺(tái)已有docker環(huán)境的服務(wù)器加入已有的群集中

    [root@host105 opt]# ls consul_0.9.2_linux_amd64.zip consul_0.9.2_linux_amd64.zip [root@host105 opt]# unzip consul_0.9.2_linux_amd64.zip [root@host105 opt]# mv consul /usr/local/bin/#將192.168.23.105/24加入已有的群集中 [root@host105 opt]# consul agent \-server \-ui \-data-dir=/var/lib/consul-data \-bind=192.168.23.105 \-client=0.0.0.0 \-node=consul-server02 \-enable-script-checks=true \-datacenter=dc1 \-join 192.168.23.103 &> /var/log/consul.log &

    -enable-script-checks=true :設(shè)置檢查服務(wù)為可用
    -datacenter : 數(shù)據(jù)中心名稱(chēng)
    -join :加入到已有的集群中
    -node: 指定節(jié)點(diǎn)名(節(jié)點(diǎn)名唯一,集群里不可以重復(fù))

    4.2 查看集群狀態(tài)

    [root@host105 opt]# consul members Node Address Status Type Build Protocol DC consul-server01 192.168.23.103:8301 alive server 0.9.2 2 dc1 consul-server02 192.168.23.105:8301 alive server 0.9.2 2 dc1 [root@host105 opt]# consul operator raft list-peers Node ID Address State Voter RaftProtocol consul-server01 192.168.23.103:8300 192.168.23.103:8300 leader true 2 consul-server02 192.168.23.105:8300 192.168.23.105:8300 follower true 2

    總結(jié)

    以上是生活随笔為你收集整理的consul 自动发现与自动注册的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

    如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。