Topology-aware Service Routing in Kubernetes Boots

It's a pain point for multi-zone clusters deployment since cross-zone network traffic being charged, while in-zone is not. In addition, cross-node traffic may carry sensitive metadata from other nodes. Therefore, users always prefer the service backends that close to them, e.g. same zone, rack and host etc. for security, performance and cost concerns. Kubernetes scheduler can constraining a pod to only be able to run on particular nodes/zones. However, Kubernetes service proxy just randomly picks an available backend for service routing and this one can be very far from the user, so we need a topology-aware service routing solution in Kubernetes. Basically, to find the nearest service backend.
展开查看详情

1.Topology-aware Service Routing in Kubernetes Boots a Smarter Service Discovery Jun Du, Software Engineer, Huawei Cloud

2.Agenda Topologies in Kubernetes Topology-aware service routing Solutions and prototypes Q&A

3.Topology is Arbitrary AZ Region Rack Host Generator Anything you like…

4.Topology in Kubernets scheduler Scheduling is about finding hardware to run your code. Where should I run this Pod?

5.Node Affinity Should I run my Pod on this Node?

6.Pod Affinity/Anti-affinity Labels identify topologies topologyKey is the key of Node Labels Should I run my Pod in the same hostname as a web-frontend Pod?

7.Topologies in Pod (Anti-)Affinity

8.

9.

10.Supported topology-aware features in Kubernetes Node level - Workloads - Volumes Within a node - Hardware

11.Agenda Topologies in Kubernetes Requests of topology-aware service routing Solutions and prototypes Q&A

12.Kubernetes Service & Endpoints

13.i ptables IPVS

14.Topology-aware service routing: user stories Clear demand for node-local - per-node services: fluentd , aws - es -proxy - secure “Find zone-local backends for service X”? - data costs - performance Extend: “locality” means same topological level - select a subset of endpoints based on topology

15.Topology-aware service routing: problem statements Hard requests or soft requests? - try local, then go wider ? - always want that one? How hard to try? - weight per topo What if multiple backends satisfy? - probabilities

16.Topology-aware service routing: problem statements Hard requests or soft requests? - try local, then go wider ? - always want that one? How hard to try? - weight per topo What if multiple backends satisfy? - probabilities

17.Solutions and prototypes API Changes:

18.Architecture

19.Data Flow

20.Topology-aware service routing R unning well in Huawei Cloud CCE Happy to open source the implementation - Proposal: https ://github.com/kubernetes/community/pull/1551

21.Contact US!

22.Contact US!