etcd3

Kubernetes switched from etcd2 to etcd3 in Kubernetes 1.6. This was a big deal. Scaling Kubernetes to 5,000 nodes wasn't possible due to limitations of etcd2, especially related to the watch implementation. The scalability needs of Kubernetes drove many of the improvements of etcd3, as CoreOS used Kubernetes as a measuring stick. Some of the big ticket items are as follows:

  • GRPC instead of REST-etcd2 has a REST API, etcd3 has a gRPC API (and a REST API via gRPC gateway). The http/2 protocol at the base of gRPC can use a single TCP connection for multiple streams of requests and responses.
  • Leases instead of TTLs-etcd2 uses time to live (TTL) per key as the mechanism to expire keys, and etcd3 uses leases with TTLs, where multiple keys can share the same key. This reduces significantly keep alive traffic.
  • The watch implementation of etcd3 takes advantage of GRPC bi-directional streams and maintains a single TCP connection to send multiple events, which reduced the memory footprint by at least an order of magnitude.
  • With etcd3, Kubernetes started storing all the state as protobug, which eliminated a lot of wasteful JSON serialization overhead.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset