Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MidoNet deep dive

1,420 views

Published on

Slides used in MidoNet developer meetup #1. I explained about Midolman modules and how they work here.

Published in: Engineering
  • Be the first to comment

MidoNet deep dive

  1. 1. midonet deep dive Taku Fukushima
  2. 2. Agenda 1. MidoNet components (revisited) 2. Midolman deep dive 3. Getting started with coding 4. Wrap-up
  3. 3. MidoNet components
  4. 4. NSDB NSDB NSDB Open vSwitch Datapath IF IF Interfaces on the host IF VM VM VM Midolman (MidoNet agent) Network Flow Table MidoNet APINova API Horizon MidoNet CLI Watch/modify Add/remove flows Neutron API MidoNet Plugin Host Cache + local state Store virtual topology information Clients / Users Nova compute
  5. 5. Midolman (MidoNet agent) NSDB NSDB NSDB Open vSwitch Datapath IF IF Interfaces on the host IF VM VM VM Midolman (MidoNet agent) Network Flow Table Watch/modify Add/remove flows Host Cache + local state Store virtual topology information Nova compute
  6. 6. Midolman deep dive
  7. 7. Foundations • Java and Scala • Java 8 migration is coming • Guava and Guice • Akka Actor • Future and RxJava • Jackson → Protocol Buffer • Disruptor
  8. 8. Upcall Lifecycle 1. Input stage • Get upcalls with packets from the datapath 2. Packet processing stage 1. Deduplicate and queue packets 2. Simulate packets on the virtual topology 3. Deal with the wildcard flows 4. Determine the egress physical port 3. Output stage • Emit packets and install flows based on the sims
  9. 9. Module diagrams
  10. 10. MidolmanActorsService Fl PacketsEntryPoint RoutingManager Actor DatapathReady Vir Ph HealthMonitor MtuIncreaser DeduplicationActor UpcallDatapath ConnectionManager (NetlinkInputChannel) Fast Path State Management Flow Invalidation by Tag W DatapathReady Midolman.java
  11. 11. F PacketsEntryPoint NetlinkCallback Dispatcher DeduplicationActor PacketWorkflow UpcallDatapath ConnectionManager One-to-Man One-to-On HTB Supended Packets Waiting Room (NetlinkInputChannel) NetlinkChannel Fast Path State Management Open vSwitch Datapath Flow Table UpcallPacket 1. Input stage Select Loop
  12. 12. Datapath Controller Flow Controller PacketsEntryPoint NetlinkCallback Dispatcher DeduplicationActor PacketWorkflow UpcallDatapath ConnectionManager One-to-Many One-to-One HTB Supended Packets Waiting Room (NetlinkInputChannel) NetlinkChannel (NetlinkOutputChannel) DatapathChannel ment path Open WildcardFlow Pa Wildcard Flows Flow Managem 2. Packet processing stage PacketContext PacketContextPacketContext PacketContext PacketContext PacketContext Routing by hashing with FlowKey
  13. 13. Datapath Controller Flow Controller PacketsEntryPoint RoutingManager Actor DatapathReady VirtualTopology Actor VirtualTo PhysicalMapper DeduplicationActor PacketWorkflow atapath nManager NSDB NSD NSDB Disrupto Ring Buff putChannel) (NetlinkOutputChannel) DatapathReady WildcardFlow Flow Invalidation by Tag Virtual Topolog State data / Mess Wildcard Flows DatapathReady Datapath port operations Flow Management 2. Packet processing stage Retrieve virtual resources Virtual Resource Virtual Resource Virtual Resource Future • Completed • NotYetException
  14. 14. Datapath Controller Flow Controller PacketsEntryPoint RoutingManager Actor DatapathReady VirtualTopology Actor VirtualTo PhysicalMapper DeduplicationActor UpcallDatapath nnectionManager NS etlinkInputChannel) (NetlinkOutputChannel) DatapathReady WildcardFlow Flow Invalidation by Tag Virt State Wildcard Flows DatapathReady Datap oper Flow Management 2. Packet processing stage Manage virtual to local and physical mapping • Interface name to UUID • UUID to local port number • Which host has the interface • …
  15. 15. Datapath Controller Flow Controller PacketsEntryPoint NetlinkCallback Dispatcher DeduplicationActor PacketWorkflow UpcallDatapath ConnectionManager One-to-Many One-to-One HTB Supended Packets Waiting Room (NetlinkInputChannel) NetlinkChannel (NetlinkOutputChannel) DatapathChannel ment path Open WildcardFlow Pa Wildcard Flows Flow Managem 2. Packet processing stage PacketContextPacketContext PacketContext PacketContext PacketContext PacketContext Simulation
  16. 16. Datapath Controller Flow Controller PacketsEntryPoint VirtualTo PhysicalMapper DeduplicationActor PacketWorkflow Disruptor Ring Buffer Supended Packets Waiting Room el) (NetlinkOutputChannel) DatapathChannel Flow Table DatapathReady WildcardFlow validation y Tag Virtual Topology State data / Messages Packet Flow Wildcard Flows DatapathReady Datapath port operations Flow Management 2. Packet processing stage Local datapath management • Create local datapath ports • Track UUID to port # mapping • Manage overlay tunnels PacketContext
  17. 17. Datapath Controller Flow Controller PacketsEntryPoint VirtualTo PhysicalMapper DeduplicationActor PacketWorkflow Disruptor Ring Buffer Supended Packets Waiting Room (NetlinkOutputChannel) DatapathChannel Flow Table DatapathReady WildcardFlow n Virtual Topology State data / Messages Packet Flow Wildcard Flows DatapathReady Datapath port operations Flow Management 2. Packet processing stage Flow Flow Flow Flow Query statistics Invalidate flows PacketContext
  18. 18. Datapath Controller Flow Controller PacketsEntryPoint NetlinkCallback Dispatcher DeduplicationActor PacketWorkflow One-to-Many One-to-One B Disruptor Ring Buffer Supended Packets Waiting Room (NetlinkOutputChannel) DatapathChannel Open vSwitch Datapath Flow Table WildcardFlow Virtual Topology State data / Messages Packet Flow Wildcard Flows Datapath port operations Flow Management 3. Output stage Select Loop
  19. 19. https://github.com/midonet/midonet/blob/master/docs/ “Read the docs.”
  20. 20. Getting started with coding
  21. 21. Prerequisites • JDK7 • JDK8 is coming • protoc (Protocol Buffer >= 2.6.0) ! • build-essential (for packaging deb packages) • rpm (for packaging RPM packages) • fpm (for packaging)
  22. 22. Dev environment (recommended) • JDK 7 (required) • JDK8 is coming • Protocol Buffers >= 2.6.0 (required) • IntelliJ IDEA 14 community edition (OSS!) (optional) • Scala plugin + protoc plugin • Nice displays and keyboards
  23. 23. Building MidoNet
  24. 24. Building IDEA project and modules
  25. 25. Importing MidoNet project
  26. 26. Wrap-up
  27. 27. Midolman deep dive • Upcall lifecycle 1. Input stage 2. Packet processing stage 3. Output stage • Fast path and state management • Read the docs • Getting started with coding
  28. 28. The end of slides. Any Questions?

×