Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
Motonori Shindo
PPTX, PDF
1,102 views
宣言的(Declarative)ネットワーキング
宣言的なコントロールプレーンの実例として、OVNに対してDifferential Datalogを適用する試みについて紹介をしています。JANOG45(札幌)での発表資料です。
Technology
◦
Read more
2
Save
Share
Embed
Embed presentation
Download
Downloaded 12 times
1
/ 26
2
/ 26
3
/ 26
4
/ 26
5
/ 26
6
/ 26
7
/ 26
8
/ 26
9
/ 26
10
/ 26
11
/ 26
12
/ 26
13
/ 26
14
/ 26
15
/ 26
16
/ 26
17
/ 26
18
/ 26
19
/ 26
20
/ 26
21
/ 26
22
/ 26
23
/ 26
24
/ 26
25
/ 26
26
/ 26
More Related Content
PPTX
コンテナネットワーキング(CNI)最前線
by
Motonori Shindo
PPTX
Dockerと外部ルータを連携させる仕組みを作ってみた
by
npsg
PPTX
ConfD で Linux にNetconfを喋らせてみた
by
Akira Iwamoto
PDF
Mastodonインスタンスをセットアップできるスタートアップスクリプトについて
by
さくらインターネット株式会社
PDF
Ansible npstudy-shtsuchi
by
Shishio Tsuchiya
PPTX
WebRTC getStats - WebRTC Meetup Tokyo 5 LT
by
mganeko
PDF
Lagopus + DockerのDPDK接続
by
Tomoya Hibi
PDF
Bird in show_net
by
Tomoya Hibi
コンテナネットワーキング(CNI)最前線
by
Motonori Shindo
Dockerと外部ルータを連携させる仕組みを作ってみた
by
npsg
ConfD で Linux にNetconfを喋らせてみた
by
Akira Iwamoto
Mastodonインスタンスをセットアップできるスタートアップスクリプトについて
by
さくらインターネット株式会社
Ansible npstudy-shtsuchi
by
Shishio Tsuchiya
WebRTC getStats - WebRTC Meetup Tokyo 5 LT
by
mganeko
Lagopus + DockerのDPDK接続
by
Tomoya Hibi
Bird in show_net
by
Tomoya Hibi
What's hot
KEY
Vyatta 改造入門
by
Masakazu Asama
PDF
VTI の中身
by
Masakazu Asama
PPTX
さくらのクラウドでVyOS使ってみた
by
SAKURA Internet Inc.
PDF
「さくらのクラウド」におけるVyattaの活用事例
by
SAKURA Internet Inc.
PDF
WebSocketプロトコル
by
Daniel Perez
PDF
10分で作るクラスライブラリ
by
_norin_
PDF
HTTP/2, QUIC入門
by
shigeki_ohtsu
PPTX
ネットワーク機器のAPIあれこれ入門(NetOpsCoding#2)
by
Kentaro Ebisawa
PPTX
pipework - Advanced Docker Networking
by
saba syake
PDF
VyOSでMPLS
by
雄也 日下部
PDF
Havana版 RDO-QuickStart-3 (140421-Havana-RDO-QuickStart-3.pdf)
by
VirtualTech Japan Inc.
PDF
自動でできるかな?
by
_norin_
PDF
【さくらのクラウド】ローカルルータ導入ガイド
by
さくらインターネット株式会社
PDF
いまさら聞けないNGINXコンフィグ_F5-NGINX-Community-20200805
by
shinyatsukasaki
PDF
第20回 OpenStack勉強会 Neutron Deep Dive - DVR
by
Toru Makabe
PDF
OpenStack Neutronの機能概要 - OpenStack最新情報セミナー 2014年12月
by
VirtualTech Japan Inc.
PDF
Havana版 RDO-QuickStart-4 (140421-Havana-RDO-QuickStart-4.pdf)
by
VirtualTech Japan Inc.
PDF
「Photon OS + Docker」VLAN 環境の構築
by
Fuva Brain
PDF
「Docker +VLAN 環境」アプリケーション実行環境の構築
by
Fuva Brain
PDF
さくらのクラウドインフラの紹介
by
SAKURA Internet Inc.
Vyatta 改造入門
by
Masakazu Asama
VTI の中身
by
Masakazu Asama
さくらのクラウドでVyOS使ってみた
by
SAKURA Internet Inc.
「さくらのクラウド」におけるVyattaの活用事例
by
SAKURA Internet Inc.
WebSocketプロトコル
by
Daniel Perez
10分で作るクラスライブラリ
by
_norin_
HTTP/2, QUIC入門
by
shigeki_ohtsu
ネットワーク機器のAPIあれこれ入門(NetOpsCoding#2)
by
Kentaro Ebisawa
pipework - Advanced Docker Networking
by
saba syake
VyOSでMPLS
by
雄也 日下部
Havana版 RDO-QuickStart-3 (140421-Havana-RDO-QuickStart-3.pdf)
by
VirtualTech Japan Inc.
自動でできるかな?
by
_norin_
【さくらのクラウド】ローカルルータ導入ガイド
by
さくらインターネット株式会社
いまさら聞けないNGINXコンフィグ_F5-NGINX-Community-20200805
by
shinyatsukasaki
第20回 OpenStack勉強会 Neutron Deep Dive - DVR
by
Toru Makabe
OpenStack Neutronの機能概要 - OpenStack最新情報セミナー 2014年12月
by
VirtualTech Japan Inc.
Havana版 RDO-QuickStart-4 (140421-Havana-RDO-QuickStart-4.pdf)
by
VirtualTech Japan Inc.
「Photon OS + Docker」VLAN 環境の構築
by
Fuva Brain
「Docker +VLAN 環境」アプリケーション実行環境の構築
by
Fuva Brain
さくらのクラウドインフラの紹介
by
SAKURA Internet Inc.
Similar to 宣言的(Declarative)ネットワーキング
PDF
OpenFlowをXenServerで試してみよう
by
Kimihiko Kitase
PPTX
Isec2015 2015-03-01-02
by
Ruo Ando
PDF
ONIC-Japan-2019-OVN public
by
Manabu Ori
PDF
System Center Operations Managerによる仮想環境の高度な管理
by
junichi anno
PPTX
共有用 2012 r2hyper-v_nw仮想化
by
Osamu Takazoe
PPTX
Dell EMC Forum 2017_networld_20171026
by
VxRail ChampionClub
PPTX
[SoftLayer Summit 2015] DockerとOpenVNetを用いたSoftLayer VLAN上への仮想ネットワークオーバーレイ
by
cloudconductor
PDF
20161129 neutron recent topic
by
Akihiro Motoki
PDF
OpenFlow in IaaS - Wakame
by
axsh co., LTD.
PDF
Extreme Data Center
by
エクストリーム ネットワークス / Extreme Networks Japan
PDF
VlanManagerを使ってみた
by
Hiroki Ishikawa
PDF
第23回「NTT DataとIBMが熱く語ります!!OpenFlow/SDNコントローラー開発秘話から 未来まで、裏話もあるよ」(2012/12/20 o...
by
System x 部 (生!) : しすなま! @ Lenovo Enterprise Solutions Ltd.
PDF
VIOPS01: VMwareによる仮想化とネットワーク
by
VIOPS Virtualized Infrastructure Operators group ARCHIVES
PDF
OpenStack with OpenFlow
by
Toshiki Tsuboi
PDF
巨大ポータルを支えるプライベート・クラウド構築事例から学べ!~攻める情シスのためのインフラ構築、その極意とは?~
by
Brocade
PDF
NSDI '16 Reading: Flexible Networks Session
by
Daisuke Kotani
PDF
Cloudstack networking の内側
by
Hiroaki Kawai
PPTX
ミドクラ様講演 OpenStack最新情報セミナー 2014年4月
by
VirtualTech Japan Inc.
PDF
Mk network programmability-03
by
Miya Kohno
PDF
OpenFlow Controller lily
by
Kazuhiro Miyashita
OpenFlowをXenServerで試してみよう
by
Kimihiko Kitase
Isec2015 2015-03-01-02
by
Ruo Ando
ONIC-Japan-2019-OVN public
by
Manabu Ori
System Center Operations Managerによる仮想環境の高度な管理
by
junichi anno
共有用 2012 r2hyper-v_nw仮想化
by
Osamu Takazoe
Dell EMC Forum 2017_networld_20171026
by
VxRail ChampionClub
[SoftLayer Summit 2015] DockerとOpenVNetを用いたSoftLayer VLAN上への仮想ネットワークオーバーレイ
by
cloudconductor
20161129 neutron recent topic
by
Akihiro Motoki
OpenFlow in IaaS - Wakame
by
axsh co., LTD.
Extreme Data Center
by
エクストリーム ネットワークス / Extreme Networks Japan
VlanManagerを使ってみた
by
Hiroki Ishikawa
第23回「NTT DataとIBMが熱く語ります!!OpenFlow/SDNコントローラー開発秘話から 未来まで、裏話もあるよ」(2012/12/20 o...
by
System x 部 (生!) : しすなま! @ Lenovo Enterprise Solutions Ltd.
VIOPS01: VMwareによる仮想化とネットワーク
by
VIOPS Virtualized Infrastructure Operators group ARCHIVES
OpenStack with OpenFlow
by
Toshiki Tsuboi
巨大ポータルを支えるプライベート・クラウド構築事例から学べ!~攻める情シスのためのインフラ構築、その極意とは?~
by
Brocade
NSDI '16 Reading: Flexible Networks Session
by
Daisuke Kotani
Cloudstack networking の内側
by
Hiroaki Kawai
ミドクラ様講演 OpenStack最新情報セミナー 2014年4月
by
VirtualTech Japan Inc.
Mk network programmability-03
by
Miya Kohno
OpenFlow Controller lily
by
Kazuhiro Miyashita
More from Motonori Shindo
PPTX
おうち Lab で GitDNSOps / GitDNS Ops in My Home Lab
by
Motonori Shindo
PPTX
Tanzu Mission Control における Open Policy Agent (OPA) の利用
by
Motonori Shindo
PDF
Open Policy Agent (OPA) と Kubernetes Policy
by
Motonori Shindo
PDF
Open Policy Agent (OPA) 入門
by
Motonori Shindo
PPTX
急速に進化を続けるCNIプラグイン Antrea
by
Motonori Shindo
PPTX
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
by
Motonori Shindo
PPTX
Service Mesh for Enterprises / Cloud Native Days Tokyo 2019
by
Motonori Shindo
PDF
Idea Hackathon at vFORUM 2019 Tokyo
by
Motonori Shindo
PPTX
Containers and Virtual Machines: Friends or Enemies?
by
Motonori Shindo
PPTX
Open Source Projects by VMware
by
Motonori Shindo
PPTX
Serverless Framework "Disptach" の紹介
by
Motonori Shindo
PPTX
フロー技術によるネットワーク管理
by
Motonori Shindo
PDF
Viptela 顧客事例
by
Motonori Shindo
PDF
ViptelaのSD-WANとクラウド最適化ネットワーク
by
Motonori Shindo
PDF
OpenStack Congress and Datalog (English)
by
Motonori Shindo
PDF
OpenStack Congress and Datalog (Japanese)
by
Motonori Shindo
PPTX
L2 over l3 ecnaspsulations (english)
by
Motonori Shindo
PDF
L2 over L3 ecnaspsulations
by
Motonori Shindo
PDF
VMware NSXがサポートするトンネル方式について
by
Motonori Shindo
PPTX
CloudStack 4.1 + NVP Integration
by
Motonori Shindo
おうち Lab で GitDNSOps / GitDNS Ops in My Home Lab
by
Motonori Shindo
Tanzu Mission Control における Open Policy Agent (OPA) の利用
by
Motonori Shindo
Open Policy Agent (OPA) と Kubernetes Policy
by
Motonori Shindo
Open Policy Agent (OPA) 入門
by
Motonori Shindo
急速に進化を続けるCNIプラグイン Antrea
by
Motonori Shindo
Cluster API によるKubernetes環境のライフサイクル管理とマルチクラウド環境での適用
by
Motonori Shindo
Service Mesh for Enterprises / Cloud Native Days Tokyo 2019
by
Motonori Shindo
Idea Hackathon at vFORUM 2019 Tokyo
by
Motonori Shindo
Containers and Virtual Machines: Friends or Enemies?
by
Motonori Shindo
Open Source Projects by VMware
by
Motonori Shindo
Serverless Framework "Disptach" の紹介
by
Motonori Shindo
フロー技術によるネットワーク管理
by
Motonori Shindo
Viptela 顧客事例
by
Motonori Shindo
ViptelaのSD-WANとクラウド最適化ネットワーク
by
Motonori Shindo
OpenStack Congress and Datalog (English)
by
Motonori Shindo
OpenStack Congress and Datalog (Japanese)
by
Motonori Shindo
L2 over l3 ecnaspsulations (english)
by
Motonori Shindo
L2 over L3 ecnaspsulations
by
Motonori Shindo
VMware NSXがサポートするトンネル方式について
by
Motonori Shindo
CloudStack 4.1 + NVP Integration
by
Motonori Shindo
宣言的(Declarative)ネットワーキング
1.
©2020 VMware, Inc. 宣言的(Declarative)ネットワーキング Jan.
22, 2020 CTO, North Asia (Japan, Korea and Greater China) Motonori Shindo (@motonori_shindo) OVN のコントロールプレーンの例
2.
2©2020 VMware, Inc. ネットワークは非常に複雑な分散型システム ・非同期に起こる多重障害の可能性 ・一部の操作は冪等ではない さまざまな実装を試したが、最もうまく動いたのは
Dalalog をベースにした Nlog というエンジンを使った宣言的なコン トローラであった。 Nicira のコントローラ (NVP) はどう動いていたか? Napkin Talk with Martin Casado Source: Computer History Museum
3.
3©2020 VMware, Inc. オープンソースな仮想ネットワークの実装 Open
vSwitch (OVS) と共に開発されている(主に C で記述) 主な機能: • 論理スイッチ • 論理ルータ(IPv4、IPv6) • オーバーレイネットワーク • ACL • Native NAT、Load Balancer、DHCP • L2、L3 ゲートウェイ • DPDK 対応 • Linux / Hyper-V で利用可能 • 複数のオーケストレータ(OpenStack、Kubernetes、Docker、Mesos、oVirt など)に対応 OVN (Open Virtual Network) とは
4.
4©2020 VMware, Inc. OVN
のアーキテクチャ HV-1 ovn-northd ovn-controller ovsdb- server ovs- vswitchd HV-n ovn-controller ovsdb- server ovs- vswitchd CMS Desired State: Logical Switch Logical Port Logical Router Logical Router Port ACL Runtime State: Chassis Datapath Binding Encap Logical Flow Multicast Group Port Binding • Converts NB DB -> SB DB • Generates Logical Flow South Bound DB North Bound DB South Bound DB South Bound DB ・・・・・・・・・・・・・・・・・ • Register Chassis & VIFs to SB DB • Converts logical flow -> physical flows • Push config to local OVSDB and OF
5.
5©2020 VMware, Inc. OVN
内部の動き lport1 br-int sw0-port2sw0-port1 00:00:00:00:00:0200:00:00:00:00:01 lport2 sw0 $ ovn-nbctl lswitch-add sw0 (論理スイッチ追加) $ ovn-nbctl lport-add sw0 sw0-port1 (論理ポートの追加) $ ovn-nbctl lport-add sw0 sw0-port2 $ ovn-nbctl lport-set-addresses sw0-port1 00:00:00:00:00:01 (MAC アドレスの設定) $ ovn-nbctl lport-set-addresses sw0-port2 00:00:00:00:00:02 $ ovn-nbctl lport-set-port-security sw0-port1 00:00:00:00:00:01 (Port Security の設定) $ ovn-nbctl lport-set-port-security sw0-port2 00:00:00:00:00:02 (Port Security の設定) $ ovs-vsctl add-port br-int lport1 -- set Interface lport1 (br-int にポートを追加し、 external_ids:iface-id=sw0-port1 インターフェースを接続) $ ovs-vsctl add-port br-int lport2 -- set Interface lport2 external_ids:iface-id=sw0-port2 ovn-northd South Bound DB North Bound DB South Bound DB South Bound DB Logical Switch Table Logical Flow Table Logical Port Table Chassis Table Encap Table Datapath Biding Table Port Binding Table
6.
6©2020 VMware, Inc. VM
/ コンテナ環境は巨大かつ非常にダイナミック
7.
7©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VM
8.
8©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VM for h in Hosts: for vm in VM: if vm.host == h: h.add_flow(match=“dst={vm.ip}”,action=“output:{vm.port}”) else: h.add_flow(match=“dst={vm.ip}”,action=“output:{tunport}”)
9.
9©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VM 3 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port
10.
10©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VM 3 VM2 10.10.10.102 Host 1 3Host 2 3 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.102 output:3 //local port
11.
11©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VM 3 VM2 10.10.10.102 Host 1 3Host 2 3 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.102 output:3 //local port 案1: 全てのフローを1から再計算する for h in Hosts: for vm in VM: if vm.host == h: h.add_flow(match=“dst={vm.ip}”,action=“output:{vm.port}”) else: h.add_flow(match=“dst={vm.ip}”,action=“output:{tunport}”) どのようにフローテーブルをアップデートするか? • CPU サイクルの無駄遣い • ネットワーク帯域の無駄遣い • 設定遅延の増大
12.
12©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VMs 3 VM2 10.10.10.102 Host 1 3Host 2 3 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.102 output:3 //local port 案2: インクリメンタルな更新のアルゴリズムを作る for h in Hosts: if old_vm.host == h: h.del_flow(…) else: h.del_flow(…) if new_vm.host == h: h.add_flow(match=“dst={new_vm.ip}”, action=“output:{new_vm.port}”) else: h.add_flow(match=“dst={new_vm.ip}”, action=“output:{tunport}”) どのようにフローテーブルをアップデートするか?
13.
13©2020 VMware, Inc. Host
1 Host 2 Controller tunnel 2 3 1 2 1 vm ip host port VM1 10.10.10.101 Host 1 2 VM2 10.10.10.102 Host 1 3 VM3 10.10.10.103 Host 2 2 Table: VMs 3 VM2 10.10.10.102 Host 1 3Host 2 3 Match Action dst=10.10.10.101 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.103 output:2 //local port Match Action dst=10.10.10.101 output:2 //local port dst=10.10.10.102 output:3 //local port dst=10.10.10.103 output:1 //tunnel port dst=10.10.10.102 output:1 //tunnel port dst=10.10.10.102 output:3 //local port 案2: インクリメンタルな更新のアルゴリズムを作る for h in Hosts: if old_vm.host == h: h.del_flow(…) else: h.del_flow(…) if new_vm.host == h: h.add_flow(match=“dst={new_vm.ip}”, action=“output:{new_vm.port}”) else: h.add_flow(match=“dst={new_vm.ip}”, action=“output:{tunport}”) どのようにフローテーブルをアップデートするか? • 複雑になりがち • エラー処理、部分障害、バッチ更新、等々… • テーブルごとに専用のアルゴリズムが必要 • ovn_northd には47個、NSX には数百のテーブルが存在する
14.
14©2020 VMware, Inc. •
コントロール -> データプレンのマッピング設定を宣言的行う • マッピングを差分更新するために汎用的な推論エンジンを用いる • プログラマは差分更新について心配する必要なし 解決策 ”Differential Datalog”
15.
15©2020 VMware, Inc. 一階述語論理にもとづいた宣言的論理プログラミング言語(DSL) •
しばしば Query Language として使われる 文法的には Prolog に似ているが、Prolog と違い、 • Function symbol がない • 停止することが保証されている • 説の順序は無関係 • リストの概念がない • カット(!)や fail オペレータがない Datalog
16.
16©2020 VMware, Inc. Datalog
入門 parent child Anakin Luke sibling1 sibling2 Table: Parent Table: Sibling ? Sibling(c1,c2) :- Parent(p,c1), Parent(p,c2), c1 != c2. Anakin Leia Luke Leia Leia Luke Head Body
17.
17©2020 VMware, Inc. Datalog
入門 host match action 1 dst=10.10.10.101 output:2 1 dst=10.10.10.102 output:3 1 dst=10.10.10.103 output:1 2 dst=10.10.10.101 output:1 2 dst=10.10.10.102 output:1 2 dst=10.10.10.103 output:2 Table: Flow vm ip host port VM1 10.10.10.101 1 2 VM2 10.10.10.102 1 3 VM3 10.10.10.103 2 2 Table: VM id 1 2 Table: Host
18.
18©2020 VMware, Inc. Datalog
入門 host match action 1 dst=10.10.10.101 output:2 1 dst=10.10.10.102 output:3 1 dst=10.10.10.103 output:1 2 dst=10.10.10.101 output:1 2 dst=10.10.10.102 output:1 2 dst=10.10.10.103 output:2 Table: Flow Flow(h,”dst={ip}”,”output:{p}”) :- Host(h), VM(_, ip, h, p). Flow(h,”dst={ip}”,”output:1”) :- Host(h), VM(_, ip, other_host, _), other_host != h. vm ip host port VM1 10.10.10.101 1 2 VM2 10.10.10.102 1 3 VM3 10.10.10.103 2 2 Table: VM id 1 2 Table: Host VM2 10.10.10.102 2 3 1 dst=10.10.10.102 output:1 1 dst=10.10.10.102 output:3
19.
19©2020 VMware, Inc. Differential
Datalog (a.k.a. DDlog) Timely Dataflow Differential Dataflow Differential Datalog 低遅延な巡回データフロー計算モデル 大量のデータを効率よく処理し、任意の入力集合の変 化に素早く対応することができるデータ並列プログラ ミングフレームワーク Differential Dataflow にもとづく Datalog エンジン
20.
20©2020 VMware, Inc. DDlog
による効果 よりメンテナンスし 易いコード インクリメンタルな 更新による性能の向 上
21.
21©2020 VMware, Inc. C
vs DDlog struct band_entry { int64_t rate; int64_t burst_size; const char *action; }; static int band_cmp(const void *band1_, const void *band2_) { const struct band_entry *band1p = band1_; const struct band_entry *band2p = band2_; if (band1p->rate != band2p->rate) { return band1p->rate > band2p->rate ? -1 : 1; } else if (band1p->burst_size != band2p->burst_size) { return band1p->burst_size > band2p->burst_size ? -1 : 1; } else { return strcmp(band1p->action, band2p->action); } } static bool bands_need_update(const struct nbrec_meter *nb_meter, const struct sbrec_meter *sb_meter) { if (nb_meter->n_bands != sb_meter->n_bands) { return true; } /* A single band is the most common scenario, so speed up that * check. */ if (nb_meter->n_bands == 1) { struct nbrec_meter_band *nb_band = nb_meter->bands[0]; struct sbrec_meter_band *sb_band = sb_meter->bands[0]; return !(nb_band->rate == sb_band->rate && nb_band->burst_size == sb_band->burst_size && !strcmp(sb_band->action, nb_band->action)); } /* Place the Northbound entries in sorted order. */ struct band_entry *nb_bands; nb_bands = xmalloc(sizeof *nb_bands * nb_meter->n_bands); for (size_t i = 0; i < nb_meter->n_bands; i++) { struct nbrec_meter_band *nb_band = nb_meter->bands[i]; nb_bands[i].rate = nb_band->rate; nb_bands[i].burst_size = nb_band->burst_size; nb_bands[i].action = nb_band->action; } qsort(nb_bands, nb_meter->n_bands, sizeof *nb_bands, band_cmp); /* Place the Southbound entries in sorted order. */ struct band_entry *sb_bands; sb_bands = xmalloc(sizeof *sb_bands * sb_meter->n_bands); for (size_t i = 0; i < sb_meter->n_bands; i++) { struct sbrec_meter_band *sb_band = sb_meter->bands[i]; sb_bands[i].rate = sb_band->rate; sb_bands[i].burst_size = sb_band->burst_size; sb_bands[i].action = sb_band->action; } qsort(sb_bands, sb_meter->n_bands, sizeof *sb_bands, band_cmp); bool need_update = false; for (size_t i = 0; i < nb_meter->n_bands; i++) { if (nb_bands[i].rate != sb_bands[i].rate || nb_bands[i].burst_size != sb_bands[i].burst_size || strcmp(nb_bands[i].action, nb_bands[i].action)) { need_update = true; goto done; } } done: free(nb_bands); free(sb_bands); return need_update; } /* Each entry in the Meter and Meter_Band tables in OVN_Northbound have * a corresponding entries in the Meter and Meter_Band tables in * OVN_Southbound. */ static void sync_meters(struct northd_context *ctx) { struct shash sb_meters = SHASH_INITIALIZER(&sb_meters); const struct sbrec_meter *sb_meter; SBREC_METER_FOR_EACH (sb_meter, ctx->ovnsb_idl) { shash_add(&sb_meters, sb_meter->name, sb_meter); } const struct nbrec_meter *nb_meter; NBREC_METER_FOR_EACH (nb_meter, ctx->ovnnb_idl) { bool new_sb_meter = false; sb_meter = shash_find_and_delete(&sb_meters, nb_meter->name); if (!sb_meter) { sb_meter = sbrec_meter_insert(ctx->ovnsb_txn); sbrec_meter_set_name(sb_meter, nb_meter->name); new_sb_meter = true; } if (new_sb_meter || bands_need_update(nb_meter, sb_meter)) { struct sbrec_meter_band **sb_bands; sb_bands = xcalloc(nb_meter->n_bands, sizeof *sb_bands); for (size_t i = 0; i < nb_meter->n_bands; i++) { const struct nbrec_meter_band *nb_band = nb_meter->bands[i]; sb_bands[i] = sbrec_meter_band_insert(ctx->ovnsb_txn); sbrec_meter_band_set_action(sb_bands[i], nb_band->action); sbrec_meter_band_set_rate(sb_bands[i], nb_band->rate); sbrec_meter_band_set_burst_size(sb_bands[i], nb_band->burst_size); } sbrec_meter_set_bands(sb_meter, sb_bands, nb_meter->n_bands); free(sb_bands); } sbrec_meter_set_unit(sb_meter, nb_meter->unit); } struct shash_node *node, *next; SHASH_FOR_EACH_SAFE (node, next, &sb_meters) { sbrec_meter_delete(node->data); shash_delete(&sb_meters, node); } shash_destroy(&sb_meters); } /* Meter_Band table */ for (mb in nb.Meter_Band) { sb.Out_Meter_Band(.uuid_name = uuid2str(mb._uuid), .action = mb.action, .rate = mb.rate, .burst_size = mb.burst_size) } /* Meter table */ for (meter in nb.Meter) { sb.Out_Meter(.name = meter.name, .unit = meter.unit, .bands = set_map_uuid2str(meter.bands)) }
22.
22©2020 VMware, Inc. DDlog
によるパフォーマンスの改善 論理ポート追加にかかる時間
23.
23©2020 VMware, Inc. DDlog
によるパフォーマンスの改善 論理ポート追加にかかる時間 DDlog OVN
24.
24©2020 VMware, Inc. 予定 •
ovn-northd と ovn-controller のロジックを DDlog で実装 • Test、Test、and Test !! – C バージョンと DDlog バージョンで同じフローテーブルが計算されるかを比較 • NSX-T での適用? 課題 • 新しいプログラミング・パラダイムの学習コスト • 新しいツールチェーン(Rust、Haskel、デバッガ、etc.) • C 実装への追従 今後の予定と課題
25.
25©2020 VMware, Inc. •
“RFC: incremental computation for OVN with DDlog”, discussion on ovs-discuss mailing list, – https://mail.openvswitch.org/pipermail/ovs-discuss/2018-November/047665.html • “OVN Controller Incremental Processing”, Han Zhou, Open vSwitch 2018 Fall Conference – http://www.openvswitch.org/support/ovscon2018/6/1350-zhou.pptx • ”Toward Leaner, Faster ovn-northd”, Leonid Ryzhyk, OVS Orbit Episode 58 – https://ovsorbit.org/#e58 • “DDlog in OVN – Current State and Future Challenges”, OVS and OVN 2019 Fall Conference – https://www.youtube.com/watch?v=Sf6QjyoZk34&feature=youtu.be • Differential Datalog – https://github.com/ryzhyk/differential-datalog – https://research.vmware.com/files/attachments/0/0/0/0/0/8/8/ddlog.pdf • Timely Dataflow & Differential Dataflow – https://github.com/TimelyDataflow – https://www.youtube.com/watch?v=nRp3EQy6ccw References
26.
©2020 VMware, Inc. Thank
You
Editor's Notes
#3
Rekhter and Kirk Lougheed in 1989
Download