oscon 15 building opensource wtih open source
TRANSCRIPT
![Page 1: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/1.jpg)
Building Open Source with Open Source
Susan Wu Director of Technical Marketing
Midokura
![Page 2: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/2.jpg)
About Me § Took the scenic drive to Open Source from proprietary software like Oracle, Citrix, Sun § Product marketing for container technologies like Solaris Zones, Docker § Plugins/Connectors for enterprise manager § Open Source community experience: Ubuntu, Docker, OpenStack, CloudStack, MidoNet
![Page 3: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/3.jpg)
About Midokura § Global startup with about 50+ employees § Founders built distributed systems at Amazon and Google § Engineering in Barcelona, Tokyo, Tel Aviv § Sales and Marketing in San Francisco § Network Virtualization for OpenStack and Docker § Customers in web scale, enterprise, higher ed and service provider segments
![Page 4: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/4.jpg)
Why Open Source § It’s actually a two-fold question…for Midokura
- Why build virtualization software for networking with open source technologies - Why did the company open source the software
§ Today, we’re covering the first topic - Why we build with open source - And how we use open source technologies like Zookeeper and Cassandra
![Page 5: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/5.jpg)
/* Copyright (c) 2015 Midokura SARL, All Rights Reserved. */
import Ember from 'ember';import isValidIP4 from 'midonet-manager/utils/is-valid-ip4';import { copyOpt121Route, createOpt121Route} from 'midonet-manager/utils/dhcp-subnets';import DHCPSubnetCommons from 'midonet-manager/mixins/dhcp-subnet; -commons’;
const { get, set, setMeta, Logger: { debug }, Component} = Ember;
export default Component.extend(DHCPSubnetsCommons, { selectedDevice: null,
actions: {
update() { let model; let networkId;
let { dnsServerAddrs, defaultGateway, subnetPrefix, subnetLength, interfaceMTU, opt121Routes } = this.validateDHCPSubnet();
model = get(this, 'model'); networkId = get(this, 'selectedDevice').get('id'); setMeta(model, '_networkId', networkId); setMeta(model, '_uuidBeforeSave', model.get('id'));
![Page 6: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/6.jpg)
Open Source Leads in Innovation § Used to be imitation and commoditization to an expensive, proprietary solution § Now open source leads in innovation § Leveraging open source as building blocks speed up innovation § OpenStack - building an advanced Infrastructure as a service (IaaS) platform with open
source
§ Same with open source MidoNet
![Page 7: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/7.jpg)
![Page 8: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/8.jpg)
Cloud Networking
![Page 9: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/9.jpg)
MidoNet Topology
![Page 10: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/10.jpg)
Intelligence at the Edge MidoNet leverages a distributed architecture where the SDN intelligence is pushed at the edge
1. VM 1 sends a packet through the virtual network 2. MN Agent fetches the virtual topology/state 3. It simulates the packet through the virtual network 4. It installs a flow rule in the kernel at the ingress host 5. Tunnel packets to egress host
![Page 11: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/11.jpg)
Data type drives technology used
![Page 12: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/12.jpg)
Data type drives technology used
3. Host State 4. Flow State
Host State Active Inactive
Flow State Flow IP Source IP Destination Port Source Port Destination Protocol
NAT Router ID Type of NAT (dst or src) NAT Binding
Connection Tracking + Device ID
![Page 13: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/13.jpg)
Can only optimize 2 out of 3
![Page 14: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/14.jpg)
Zookeeper provides consistency
§ Suited for Consistency § Performance (in memory, r > w) - In memory: limits dataset size (backed by disk)
§ Reliable delivery - If a node sees an update, all will eventually
§ Total & Causal Order - Data is delivered in the same order it is sent - A message m is delivered only after all messages sent before m have been delivered
§ Not suited for high write volume
Consistency Availability Partition Tolerance Solution Virtual Network Topology X X Zookeeper Virtual Network State X X Zookeeper Host State X X Zookeeper
![Page 15: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/15.jpg)
Three Zookeeper use cases
§ Watch for Data Changes § Service Discovery § Coordination
![Page 16: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/16.jpg)
Zookeeper tracks the changes
![Page 17: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/17.jpg)
Zookeeper notifies subscribers Updating changes to logical network configurations
![Page 18: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/18.jpg)
Deploy in odd numbers for decisive vote Leader
![Page 19: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/19.jpg)
Service Discovery
Leader
![Page 20: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/20.jpg)
Cassandra used for backup
§ Well suited for high write volume § Used in storing stateful connection tracking information like flow state and metrics § Chosen for availability § Although the agent can function in the case of Cassandra failure as flow state is stored in
memory, and so Cassandra is primarily used as backup
Consistency Availability Partition Tolerance Solution
Flow State X X Cassandra
![Page 21: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/21.jpg)
Fault Tolerance
FAIL
w(x)ok
ok
ok
![Page 22: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/22.jpg)
Fault Tolerance
x
x
x
![Page 23: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/23.jpg)
Trading off Consistency
read_repair
x1
x
x
![Page 24: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/24.jpg)
Trading off Consistency
?
![Page 25: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/25.jpg)
Must Haves: Low Latency, High Throughput for Network Address Translation
§ Trivial Schema Changes - vs. schema changes in shards
§ Flexible (good on growth mode)
![Page 26: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/26.jpg)
Putting it all together § Start with a packet § What’s the virtual
topology? § Go there (you and
all other similar packets)
![Page 27: OSCON 15 Building Opensource wtih Open Source](https://reader030.vdocument.in/reader030/viewer/2022032700/55d2852cbb61ebe8098b46d6/html5/thumbnails/27.jpg)
Ready to Try MidoNet?
https://www.midonet.org/#quickstart