go-etcd入门资料

参考网站

官方网站
参考文档1
微服介绍

A distributed, reliable key-value store for the most critical data of a distributed system.
为分布式系统重要数据提供分布式,可靠的key-value存储。

feature 特性

simple interface 简化的接口

Read and write values using standard HTTP tools, such as curl
读取和写入数据使用标准的HTTP工具,比如curl。

Key-value storage

Store data in hierarchically organized directories, as in a standard filesystem
层次分明的组织目录存储数据,类似于标准文件系统。

Watch for changes

Watch specific keys or directories for changes and react to changes in values
监控指定key/目录的编号,并且相应对其值做修改。
Optional SSL client certificate authentication
支持SSL客户端验证;
Benchmarked at 1000s of writes/s per instance
性能测试:单实例1000写操作/秒
Optional TTLs for keys expiration
为keys生存期提供TTLs支持。
Properly distributed via Raft protocol
通过Raft协议实现分布式。

what is etcd

Project

etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines. It gracefully handles leader elections during network partitions and can tolerate machine failure, even in the leader node.
etcd 是健壮,分布式key-value存储,为分布式系统、集群机器提供可靠的数据存储、访问。它能优雅的处理网络节点的leader elections,且有机器故障容灾,甚至故障来自于leader节点。

Applications of any complexity, from a simple web app to Kubernetes, can read data from and write data into etcd.
任何复杂度的应用,从简单的web app到kubernetes,都能从etcd中读取/写入数据。

Your applications can read from and write data into etcd. A simple use case is storing 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 etcd’s consistency guarantees to implement database leader elections or perform distributed locking across a cluster of workers.
应用可以从etcd读取/写入数据。一种简单应用场景是以key-value对方式存储db连接详细信息或者特性flags信息。这些数据能被监控,允许你的app在当值变化了之后自己去重新配置。高级应用利用etcd的一致性保证特性,去实现db leader elections,以及在集群中提供高效分布式锁。

etcd is open source, available on GitHub, and backed by the Cloud Native Computing Foundation.
etcd是开源项目可以通过这里访问到他的信息。

Technical overview 技术概述

etcd is written in Go, which has excellent cross-platform support, small binaries and a great community behind it. Communication between etcd machines is handled via the Raft consensus algorithm.
etcd 通过go实现,具备优秀的跨平台支持,轻量级且身后有强大的社区。etcd机器之间通讯使用的Raft算法。

Latency from the etcd leader is the most important metric to track and the built-in dashboard has a view dedicated to this. In our testing, severe latency will introduce instability within the cluster because Raft is only as fast as the slowest machine in the majority. You can mitigate this issue by properly tuning the cluster. etcd has been pre-tuned on cloud providers with highly variable networks.
etcd leader的延时是非常重要的监控指标,内建了dashboard来监控此信息。在我们测试中, 许多延时的情况出现在存在不稳定的集群中,因为Raft速度大多数情况下取决于最慢的这台机器。你可以通过调优集群来优化延时问题。etcd已经高变化的云网络中调优过的。

发布了76 篇原创文章 · 获赞 13 · 访问量 13万+

猜你喜欢

转载自blog.csdn.net/erlang_hell/article/details/104259613