36
Weave Net Five years with no central control. 1 FOSDEM 2020 Bryan Boreham @bboreham https://weave.works @weaveworks

Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Weave NetFive years with no central control.

1

FOSDEM 2020

Bryan Boreham @bborehamhttps://weave.works @weaveworks

Page 2: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Lead on Weave Net since 2015.

Project member of Kubernetes, CNI, Cortex, Scope, …

Not a networking expert.

Bryan Boreham

2

Page 3: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

● Open Source container network

● Easy to install; runs anywhere*

● No “Enterprise Version”

Weave Net

3

Page 4: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

What is a “container network”?

4

Page 5: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

“There’s 👏 no 👏 such 👏 thing 👏 as 👏 container 👏 networking”

https://medium.com/@rothgar/no-sdn-kubernetes-5a0cb32070dd 5

Page 6: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

https://twitter.com/rothgar/status/998333265739042816 6

Page 7: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Containers give you isolation.

- Each container runs in its own network namespace.

How do these network namespaces talk to each other?

- That’s a container network.

What is a “container network”

7

Page 8: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Let’s look at how it works

8

Page 9: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Container network model

9

Page 10: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Ex-RabbitMQ, Erlang expert.

Wrote the first version of Weave Net.

3,400 lines of Go

Matthew Sackman

10

Page 11: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Containers with bridges

11

Page 12: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Weave Net 1.0

veth

pcap

veth

pcap

UDP

12

Page 13: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Weave Net daemon learns where MACs come from

- when it sees the first packet from that MAC.

Thus, it knows where to send each packet**.

If it doesn’t know where a MAC comes from?

- send it everywhere!

Distributed Ethernet Switch*

13

Page 14: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

“Weave is kinda slow”

14

Page 15: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Weave Net 1.2 “Fast Data Path”

veth

veth

VXLAN

OVS Datapath

OVS Datapath

UDP

15

Page 16: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Ex-Pivotal

Implementer of the “fast data path”

Now at Cloudflare

David Wragg

https://github.com/weaveworks/go-odp/ 16

Page 17: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

How to set up all the devices?

veth

17

Page 18: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Jérôme Petazzoni

18

Page 19: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

The weave script

19

Page 20: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Encryption

ESP

OVS Datapath

UDP

mark xfrm

https://github.com/weaveworks/weave/blob/master/docs/fastdp-crypto.md 20

Page 21: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Implementer of Weave Net XFRM encryption.

Kernel fixes for conntrack race conditions, etc.

Now at Isovalent (Cillium)

Martynas Pumputis

https://www.weave.works/blog/racy-conntrack-and-dns-lookup-timeouts 21

Page 22: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Weave Net handles multicast

- via the “send the packet everywhere” logic.

Multicast

22

Page 23: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Peers and Topology

23

Page 24: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Peers and topology

Gossip

24

Page 25: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

IP Address Management

Gossip

25

Page 26: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Community

26

Page 27: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Weave Net installs per week

27

Page 28: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Lots of requests, very few PRs

28

Page 29: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Mostly paid contributors

29

Page 30: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Kubernetes

30

Page 31: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Mandates NAT-free network between “pods”.

3rd-party pod networks.

Rkt, from CoreOS, has a simple ‘exec’ model to add a network.

Kubernetes

31

Page 32: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

CNI - the Container Network Interface

Interface

Network

Plugin

{ "cniVersion": "0.3.0", "name": "mynet", "type": "my-plugin", "ipam": { "type": "host-local", "subnet":"10.4.0.0/24", }}

Runtime(kubelet)

JSON Config

Network Manager

32

Page 33: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Installing via DaemonSet

DaemonSet runs on every node

Pod mounts host directory and copies plugin at startup

33

Page 34: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

End of main content

34

Page 35: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Kubernetes Network Policy

Launch modes

Scalability

Service Management / Service Discovery

Bug bounty programme

Things I didn’t cover

35

Page 36: Weave Net - FOSDEM 2020 · Weave Net daemon learns where MACs come from - when it sees the first packet from that MAC. Thus, it knows where to send each packet**. If it doesn’t

Questions?

Bryan Boreham @bborehamhttps://weave.works @weaveworks

36