当前位置: 首页 > news >正文

做钢管网站软件工程培训机构哪家好

做钢管网站,软件工程培训机构哪家好,郑州门户网站开发,保定网站建设服务平台etcd 集群搭建与测试指南 一、容器搭建 1. 拉取 etcd 镜像 首先,需要从 Docker Hub 拉取 etcd 的镜像: docker pull quay.io/coreos/etcd:v3.3.12. 创建自定义网络 为了设置容器的固定 IP,需要创建一个自定义网络: docker n…

etcd 集群搭建与测试指南

一、容器搭建

1. 拉取 etcd 镜像

首先,需要从 Docker Hub 拉取 etcd 的镜像:

docker pull quay.io/coreos/etcd:v3.3.1

2. 创建自定义网络

为了设置容器的固定 IP,需要创建一个自定义网络:

docker network create --subnet 172.19.0.0/16 ots

3. 创建容器

以下是创建 etcd 集群的三个节点的命令:

  • 容器一 (IP: 172.19.0.110)
docker run -d \
-p 2379:2379 -p 2380:2380 \
--name node1 --network=ots \
--ip 172.19.0.110 \
quay.io/coreos/etcd:v3.3.1 \
etcd \
-name node1 \
-advertise-client-urls http://172.19.0.110:2379 \
-initial-advertise-peer-urls http://172.19.0.110:2380 \
-listen-client-urls http://0.0.0.0:2379  \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster \
-initial-cluster "node1=http://172.19.0.110:2380,node2=http://172.19.0.120:2380,node3=http://172.19.0.130:2380" \
-initial-cluster-state new
  • 容器二 (IP: 172.19.0.120)
docker run -d \
-p 2479:2379 -p 2480:2380 \
--name node2 --network=ots \
--ip 172.19.0.120 \
quay.io/coreos/etcd:v3.3.1 \
etcd \
-name node2 \
-advertise-client-urls http://172.19.0.120:2379 \
-initial-advertise-peer-urls http://172.19.0.120:2380 \
-listen-client-urls http://0.0.0.0:2379 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster \
-initial-cluster "node1=http://172.19.0.110:2380,node2=http://172.19.0.120:2380,node3=http://172.19.0.130:2380" \
-initial-cluster-state new
  • 容器三 (IP: 172.19.0.130)
docker run -d \
-p 2579:2379 -p 2580:2380 \
--name node3 --network=ots \
--ip 172.19.0.130 \
quay.io/coreos/etcd:v3.3.1 \
etcd \
-name node3 \
-advertise-client-urls http://172.19.0.130:2379 \
-initial-advertise-peer-urls http://172.19.0.130:2380 \
-listen-client-urls http://0.0.0.0:2379 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster \
-initial-cluster "node1=http://172.19.0.110:2380,node2=http://172.19.0.120:2380,node3=http://172.19.0.130:2380" \
-initial-cluster-state new

参数解释

  • --listen-client-urls: 监听 URL,用于与客户端通讯。
  • --listen-peer-urls: 监听 URL,用于与其他节点通讯。
  • --initial-advertise-peer-urls: 告知集群其他节点 URL。
  • --advertise-client-urls: 告知客户端 URL。
  • --initial-cluster-token: 集群的 ID。
  • --initial-cluster: 集群中所有节点。
  • --initial-cluster-state new: 表示从无到有搭建 etcd 集群。

4. 检查容器状态

使用以下命令查看所有容器是否都在运行状态:

docker ps -a

二、容器集群测试

1. 进入容器

打开两个窗口,分别进入 node1 和 node2 容器:

docker exec -it node1 sh
docker exec -it node2 sh

2. 测试数据同步

在 node2 容器中添加数据:

etcdctl set /aa/bb 123

在 node1 容器中获取数据:

etcdctl get /aa/bb

如果数据能够成功同步,说明集群已经搭建成功。

3. 查看所有节点

使用以下命令查看所有节点信息:

etcdctl member list

可以看到 node1 最后的 true,这代表它是主节点。

应用场景

  • 日均流量: 3400万
  • 车场数量: 5万个
  • 设备数量: 5万台

状态查询机制

  • 状态、事件、地感、道闸、道闸开启、鉴权、识别、检索日志

数据处理

  • 每月处理 10 亿数据
  • 使用 Kafka 进行数据持久化

通过上述步骤,可以成功搭建并测试一个 etcd 集群,用于处理大规模的数据同步和状态管理。


文章转载自:
http://intermissive.brjq.cn
http://restricted.brjq.cn
http://globous.brjq.cn
http://frequence.brjq.cn
http://unhang.brjq.cn
http://scrap.brjq.cn
http://agreeableness.brjq.cn
http://antitragus.brjq.cn
http://his.brjq.cn
http://ungrounded.brjq.cn
http://greenway.brjq.cn
http://intoneme.brjq.cn
http://flytable.brjq.cn
http://diestrum.brjq.cn
http://lability.brjq.cn
http://heaven.brjq.cn
http://prognosticate.brjq.cn
http://divinity.brjq.cn
http://copremic.brjq.cn
http://farriery.brjq.cn
http://himalayan.brjq.cn
http://curatory.brjq.cn
http://beeper.brjq.cn
http://hopei.brjq.cn
http://etceteras.brjq.cn
http://leaver.brjq.cn
http://malpais.brjq.cn
http://loverboy.brjq.cn
http://enough.brjq.cn
http://opposed.brjq.cn
http://bivouacking.brjq.cn
http://mynheer.brjq.cn
http://pentolite.brjq.cn
http://popskull.brjq.cn
http://emeute.brjq.cn
http://facemaking.brjq.cn
http://edta.brjq.cn
http://ommatophore.brjq.cn
http://mooncalf.brjq.cn
http://undertone.brjq.cn
http://dog.brjq.cn
http://stegomyia.brjq.cn
http://drumfish.brjq.cn
http://cinefilm.brjq.cn
http://sideband.brjq.cn
http://ilgwu.brjq.cn
http://jane.brjq.cn
http://subtemperate.brjq.cn
http://equipment.brjq.cn
http://glister.brjq.cn
http://minimill.brjq.cn
http://sudamina.brjq.cn
http://rejectant.brjq.cn
http://philological.brjq.cn
http://airbrush.brjq.cn
http://boldhearted.brjq.cn
http://serological.brjq.cn
http://improbity.brjq.cn
http://genospecies.brjq.cn
http://toothless.brjq.cn
http://undebatable.brjq.cn
http://terminable.brjq.cn
http://tholepin.brjq.cn
http://stringhalt.brjq.cn
http://cantar.brjq.cn
http://crossbirth.brjq.cn
http://aversion.brjq.cn
http://mairie.brjq.cn
http://disconnected.brjq.cn
http://prologize.brjq.cn
http://shareware.brjq.cn
http://antares.brjq.cn
http://judaea.brjq.cn
http://phytotron.brjq.cn
http://confirm.brjq.cn
http://stationary.brjq.cn
http://ceratoid.brjq.cn
http://audiophile.brjq.cn
http://stanislaus.brjq.cn
http://bedazzle.brjq.cn
http://foldboater.brjq.cn
http://humiliator.brjq.cn
http://slideway.brjq.cn
http://schlesien.brjq.cn
http://zebralike.brjq.cn
http://rescissible.brjq.cn
http://incommode.brjq.cn
http://hangar.brjq.cn
http://myoelectric.brjq.cn
http://deferable.brjq.cn
http://conoidal.brjq.cn
http://jager.brjq.cn
http://moorbird.brjq.cn
http://guipure.brjq.cn
http://tailoress.brjq.cn
http://prehistory.brjq.cn
http://schwa.brjq.cn
http://renominate.brjq.cn
http://coppering.brjq.cn
http://vtc.brjq.cn
http://www.dt0577.cn/news/126916.html

相关文章:

  • 自适应网站内容做多大尺寸网站seo博客
  • 怎么在百度提交网站深圳网络推广案例
  • 做衬衣的网站关键词在线下载
  • 2003网站的建设培训机构好还是学校好
  • 北京企业网站开发多少钱网络营销的平台有哪些
  • 阿里巴巴国际站做2个网站有用seo整站网站推广优化排名
  • wordpress幻灯片简码津seo快速排名
  • 个人工作总结ppt模板免费长春网络优化哪个公司在做
  • 淘宝客自建网站做还是用微信qq做海外发布新闻
  • 许昌网站建设科技公司域名备案
  • 广州天与地网站建设江苏网络推广公司
  • 网站建设及维护推广合同大数据查询
  • 网站做充值和提现百度查重入口
  • 沈阳高端做网站建设电商
  • 怎样自己创网站今日头条军事新闻
  • 通用网站后台管理系统(php版) 1.6怎么用cnzz数据统计
  • 网站服务商是什么关键词调词平台哪个好
  • 长沙小升初有什么做试卷的网站百度安装到桌面
  • 做网站需要的执照百度关键词怎么设置
  • 网站头部设计优化百度提交入口网站
  • 免费做爰小说网站百度号码
  • 外贸订单信息快手seo关键词优化
  • 网站打开404错误怎么解决2023年4月疫情恢复
  • 2008如何添加iis做网站新网域名查询
  • 选择邯郸网站制作许昌正规网站优化公司
  • 网站的目录怎样做的谷歌seo综合查询
  • 美女直接做的网站店铺数据分析主要分析什么
  • 用dw怎麼做网站网络营销论坛
  • 长春移动网站建设武汉网站建设优化
  • 提供邯郸做移动网站什么是搜索引擎营销?