`
gaojingsong
  • 浏览: 1181918 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

【CoreOS--ETCD介绍】

阅读更多

etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines. It’s open-source and available on GitHub. etcd gracefully handles leader elections during network partitions and will tolerate machine failure, including the leader.

ETCD是CoreOS公司发起的一个开源项目,ETCD是用于共享配置和服务发现的分布式,一致性的KV存储系统。

Your applications can read and write data into etcd. A simple use-case is to store database connection details or feature flags in etcd as key value pairs. These values can be watched, allowing your app to reconfigure itself when they change.

 

Advanced uses take advantage of the consistency guarantees to implement database leader elections or do distributed locking across a cluster of workers.

ETCD使用Raft协议来维护集群内各个节点状态的一致性。简单说,ETCD集群是一个分布式系统,由多个节点相互通信构成整体对外服务,每个节点都存储了完整的数据,并且通过Raft协议保证每个节点维护的数据是一致的。

 

Disaster recovery

etcd is designed to withstand machine failures. An etcd cluster automatically recovers from temporary failures (e.g., machine reboots) and tolerates up to (N-1)/2 permanent failures for a cluster of N members. When a member permanently fails, whether due to hardware failure or disk corruption, it loses access to the cluster. If the cluster permanently loses more than (N-1)/2 members then it disastrously fails, irrevocably losing quorum. Once quorum is lost, the cluster cannot reach consensus and therefore cannot continue accepting updates.

提供配置共享和服务发现的系统比较多,其中最为大家熟知的是[Zookeeper](后文简称ZK),而ETCD可以算得上是后起之秀了。在项目实现,一致性协议易理解性,运维,安全等多个维度上,ETCD相比Zookeeper都占据优势。

 

Clustering Guide

Starting an etcd cluster statically requires that each member knows another in the cluster. In a number of cases, the IPs of the cluster members may be unknown ahead of time. In these cases, the etcd cluster can be bootstrapped with the help of a discovery service.

 

Once an etcd cluster is up and running, adding or removing members is done via runtime reconfiguration. To better understand the design behind runtime reconfiguration, we suggest reading the runtime configuration design document.

 

ETCD的使用场景

和ZK类似,ETCD有很多使用场景,包括:

配置管理

服务注册于发现

选主

应用调度

分布式队列

分布式锁

 

Discovery service protocol

 

Discovery service protocol helps new etcd member to discover all other members in cluster bootstrap phase using a shared discovery URL.

 

Discovery service protocol is only used in cluster bootstrap phase, and cannot be used for runtime reconfiguration or cluster monitoring.

 

The protocol uses a new discovery token to bootstrap one unique etcd cluster. Remember that one discovery token can represent only one etcd cluster. As long as discovery protocol on this token starts, even if it fails halfway, it must not be used to bootstrap another etcd cluster.




 
 

The rest of this article will walk through the discovery process with examples that correspond to a self-hosted discovery cluster. The public discovery service, discovery.etcd.io, functions the same way, but with a layer of polish to abstract away ugly URLs, generate UUIDs automatically, and provide some protections against excessive requests. At its core, the public discovery service still uses an etcd cluster as the data store as described in this document.

  • 大小: 30.9 KB
  • 大小: 19.5 KB
0
0
分享到:
评论

相关推荐

    CoreOS主机启动程序Coreos-bootstrap.zip

    Coreos-bootstrap 是使用 Ansible 来启动 CoreOS 主机。配置示例:[coreos] host-01 host-02 [coreos:vars] ansible_ssh_user=core ansible_python_interpreter="PATH=/home/core/bin:$PATH python"启动...

    springboot整合etcd配置中心-etcd-config-spring-boot.zip

    然后在项目中引入Spring Cloud Config和Etcd的相关依赖,例如`spring-cloud-starter-config`和`spring-cloud-starter-etcd-config`。 2. **配置Etcd**:在Spring Boot的`application.properties`或`application.yml...

    管理系统系列--基于etcd的配置管理系统 (etcd v2).zip

    etcd是一个分布式的、一致性的键值存储系统,最初由CoreOS开发并维护,现已成为云原生计算基金会(CNCF)的重要项目之一。它主要用于分布式系统中的服务发现和配置管理,尤其在微服务架构中扮演着关键角色。本管理系统...

    开源项目-sohlich-etcd_service_discovery.zip

    ETCD,全称为“Elastic Reliable Key-Value Store”,是由CoreOS开发的一个分布式键值存储系统,广泛应用于微服务架构中的服务发现和服务配置。这个开源项目提供了一个方便的方式来与ETCD进行交互,从而实现服务注册...

    Python-一个etcd的python客户端

    而`etcd`是一个分布式的键值存储系统,由CoreOS开发,主要用于共享配置和服务发现。它提供了一个强一致性保证的接口,使得在分布式环境中协调服务变得简单。`etcd`支持HTTP的gRPC协议,这使得它可以很容易地被多种...

    etcd-manager-1.2.0-win64 etcd数据库管理客户端

    etcd-manager-1.2.0-win64是一款专为Windows平台设计的etcd数据库管理客户端,它提供了方便的交互式界面和命令行工具,帮助用户有效地管理和操作etcd集群。etcd是CoreOS开发的一个分布式键值存储系统,常用于分布式...

    coreos-etcd-secure-demo:CoreOS、etcd2、DigitalOcean 和 Terraform

    TLS 证书由etcd-ca创建和签名当 Terraform 引导一个新的 CoreOS 实例时,etcd-ca 将生成并签署证书。 然后它将使用文件配置器为每个服务器 scp 证书和密钥。 工作人员的客户端证书已预先生成并假定位于: ./etcd-ca-...

    CoreOS秦毅成:etcd架构及关键技术

    标题提到的“CoreOS秦毅成:etcd架构及关键技术”是指秦毅成在一次名为CoreOS Meetup的会议上进行的演讲,这次会议是在北京举行的。秦毅成是CoreOS etcd的主要贡献者之一,etcd是一个在分布式系统中广泛使用的高可用...

    ansible-coreos-cloudinit:CoreOS 的云配置

    coreos_reboot:可以是best-effort 、 etcd-lock 、 reboot或off ,请参阅 machine_metadata: 请参阅 用户名: 请参阅 userssh:在~/.ssh/id_rsa.pub找到的证书(没有ssh-rsa起始块) 依赖关系 没

    oneapm-nodejs-etcd-demo

    oneapm-nodejs-etcd-demo 准备环境 第一步,启动 ETCD sudo docker run -d -p 4002:4002 --name etcd quay.io/coreos/etcd \ -listen-client-urls http://etcd:4002 -advertise-client-urls http://etcd:4002 启动...

    rethinkdb-coreos-cluster:使用CoreOS,etcd2和Docker简化了RethinkDB集群

    CoreOS使用etcd(在每台机器上运行的服务)来处理集群上运行的软件之间的协调。 为了使一组CoreOS计算机组成一个集群,需要连接其etcd实例。 发现服务作为一项免费服务提供,通过将对等地址,元数据和群集的初始...

    nginx-proxy-confd-etcd:支持 confd+etcd 的 nginx 代理

    文件“nginx-proxy-confd-etcd-master”可能包含以下组成部分: 1. confd 的配置文件(如 `confd.conf`),定义了 confd 如何连接到 etcd 并监视特定的键路径。 2. nginx 配置模板(如 `nginx.conf.tmpl`),使用 Go...

    coreos-cluster:使用 Vagrant 设置 CoreOS 集群

    使用 Vagrant 设置 CoreOS 集群 这将使用设置集群环境。 $ git clone https://github.com/YungSang/coreos-cluster $ cd coreos-cluster $ make virtualbox 如果您使用并行... $ make parallels 默认情况下,...

    etcd-php:PHP 的 Etcd 客户端库

    composer require linkorb/etcd-php 用法 客户端 实例化客户端 $ client = new Client ( $ server ); 使用自定义 Guzzle Client 实例化客户端 $ client = Client :: constructWithGuzzleClient ( $ guzzleClient ,...

    kubernetes-vagrant-coreos-cluster:使用Vagrant和CoreOS简化了Kubernetes集群(出于测试目的)

    CoreOS主要由Docker容器和etcd(分布式键值存储)组成,非常适合部署和管理Kubernetes集群。 ### Kubernetes集群搭建 `kubernetes-vagrant-coreos-cluster`项目将Vagrant与CoreOS结合,提供了一种简便的方式来创建...

    etcd-v3.5.9

    `etcd-v3.5.9-linux-amd64`表明这是针对Linux AMD64架构的etcd v3.5.9版本。升级etcd通常涉及停止旧版本服务,替换二进制文件,然后重启服务,确保新版本的平稳运行。在升级过程中需要注意数据迁移和兼容性问题。 ...

    coreos-openstack-beginner

    CoreOS-OpenStack初学者这包含了我在OpenStack基础架构上学习CoreOS的经验。 该项目使用HEAT模板在我们的基础架构中配置多节点集群。 请遵循以下命令: alok@remote $ heat stack-create -f heat-template.yaml -P ...

    nginx-confd-etcd:基于etcd和registrator为confd配置nginx的Docker容器

    nginx-confd-etcd 集装箱配置基于由生成的值 。 主要用于集群。 我从开始,但我不喜欢 sidekick 实例的想法。 我将 sidekick 更改为 Registrator 并在 Confd 配置中进行了一些更改。 集群配置的先决条件 这个 ...

Global site tag (gtag.js) - Google Analytics