All Projects → vipshop → TupleNet

vipshop / TupleNet

Licence: Apache-2.0 License
TupleNet is a lightweight tool for building virtual-networking

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
go
31211 projects - #10 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to TupleNet

Zerotierone
A Smart Ethernet Switch for Earth
Stars: ✭ 7,839 (+30050%)
Mutual labels:  sdn, virtual-network
SDN-Datacenter
Making a software defined datacenter. Which includes various virtual networks with mutiple network functions deployed on it. This includes SDN network deployed on real hardware.
Stars: ✭ 28 (+7.69%)
Mutual labels:  sdn, virtual-network
logica
Logica is a logic programming language that compiles to StandardSQL and runs on Google BigQuery.
Stars: ✭ 1,469 (+5550%)
Mutual labels:  datalog
kytos
Kytos SDN Platform is the fastest way to deploy an SDN Network. With this you can deploy a basic OpenFlow controller or your own controller. Kytos was designed to be easy to install, use, develop and share Network Apps (NApps). Kytos is incredibly powerful and easy, its modular design makes Kytos a lightweight SDN Platform.
Stars: ✭ 43 (+65.38%)
Mutual labels:  sdn
husarnet
Husarnet is a Peer-to-Peer VPN to connect your laptops, servers and microcontrollers over the Internet with zero configuration.
Stars: ✭ 128 (+392.31%)
Mutual labels:  sdn
pathman-sr
Pathman SR is an open-source app to compute paths and deploy routes in Segment Routing-enabled network.
Stars: ✭ 79 (+203.85%)
Mutual labels:  sdn
matcha
🍵 SPARQL-like DSL for querying in memory Linked Data Models
Stars: ✭ 18 (-30.77%)
Mutual labels:  datalog
logifix
Fixing static analysis violations in Java source code using Datalog
Stars: ✭ 17 (-34.62%)
Mutual labels:  datalog
multipath
Multipath routing with Ryu and Pyretic SDN Controllers
Stars: ✭ 56 (+115.38%)
Mutual labels:  sdn
katana-slice manager
5G Network E2E Slice Manager
Stars: ✭ 61 (+134.62%)
Mutual labels:  sdn
flowmanager
An SDN application that gives its user the ability to control flows in an OpenFlow network without coding.
Stars: ✭ 60 (+130.77%)
Mutual labels:  sdn
iovisor-ovn
IOVisor OVN integration
Stars: ✭ 62 (+138.46%)
Mutual labels:  sdn
semantic-python-overview
(subjective) overview of projects which are related both to python and semantic technologies (RDF, OWL, Reasoning, ...)
Stars: ✭ 406 (+1461.54%)
Mutual labels:  datalog
netmaker
Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
Stars: ✭ 4,147 (+15850%)
Mutual labels:  virtual-network
fog05
End-to-End Compute, Storage and Networking Virtualisation.
Stars: ✭ 50 (+92.31%)
Mutual labels:  sdn
netbox-joined-inventory
Netbox_joined_inventory is a python script that gathers data from a Netbox source-of-truth and stores them as Ansible inventory, group_vars and host_vars files.
Stars: ✭ 21 (-19.23%)
Mutual labels:  sdn
SOL
SOL: SDN optimization layer. A framework for writing network optimization problems more easily.
Stars: ✭ 22 (-15.38%)
Mutual labels:  sdn
sdn-nfv-papers
This is a paper list about Resource Allocation in Network Functions Virtualization (NFV) and Software-Defined Networking (SDN).
Stars: ✭ 40 (+53.85%)
Mutual labels:  sdn
percival
📝 Web-based, reactive Datalog notebooks for data analysis and visualization
Stars: ✭ 285 (+996.15%)
Mutual labels:  datalog
hsdatalog
BDD-based implementation of Datalog
Stars: ✭ 30 (+15.38%)
Mutual labels:  datalog

TupleNet

Build Status License

TupleNet 是基于OVS提供网络虚拟化的系统,它利用Geneve tunnel技术在物理网络上建立虚拟网络。 使用TupleNet可以非常简便地建立一个高效灵活的虚拟网络。

TupleNet is a system was built base on OVS, it leverages Geneve tunneling to construct virtual networking on physical networking. Anyone can use TupleNet to run an efficient and agile virtual networking easily.

TupleNet和Flannel,Calico类似采用的基于数据库的架构方式。TupleNet中控模块由ETCD来担当,而TupleNet运行在每个compute-node节点,用于在该节点调用ovs来建立和提供虚拟网络。

Like Flannel and Calico the architecture of Tuplenet is base on Database. Etcd play a role of brain, and each compute-node has a TupleNet instance which utilizes OVS to construct virtual networking.

                                     +-----------------+
                                     |      ETCD       |
                                     |                 |
                                     +-----------------+
                                              |
                                +---------------------------+
                                |        Control-path       |
                          +----------+                +----------+
                          |          |                |          |  +-------------+
                 +-----+  |          |                |          +--+ Container   |
                 | VM  +--+ TupleNet |                | TupleNet |  +-------------+
                 +-----+  |          |                |          |         |
                    |     +----------+                +----------+         |
                    |     |   OVS    |                |   OVS    |         |
                    |     +----------+                +----------+         |
                    |          |       Phy-network          |              |
                    |          +----------------------------+              |
                    +------------------------------------------------------+
                                      Virtual-network


Why TupleNet

1. TupleNet 采用了及其简便的架构方式,没有中心控制节点,部署方便快捷

TupleNet 是stateless的,它没有中控节点,TupleNet相互之间只需要通过etcd就可以相互构建完整的虚拟网络。其中TupleNet的重要节点(Edge TupleNet)是可以多套部署,所以在TupleNet的网络中是可以避免单点故障。TupleNet实现了CNI,和CNM接口,可以直接为k8s和docker的容器集群提供虚拟网络。

2. TupleNet 的redirecting特性可以支持让其他TupleNet节点作为中间节点转发数据报文,减少网络故障带来的影响

在TupleNet网络中可能存在某个Edge节点不能和某些节点进行通信,开启了redirecting功能后Edge TupleNet节点发现和报文接收方之间存在网络问题(普通TupleNet节点和Edge TupleNet节点通过BFD进行健康探测)后可以将数据报文先转发到其他Edge节点,让这个Edge节点帮助转发数据报文。Redirecting可以减少网络故障带来的影响。

3. TupleNet采用on-demand方式生成flow,可以大幅降低control-plane的cpu使用率,而且可以完美解决传统on-demand方式出现的首包延迟问题

TupleNet 的所有ovs-flow都是在本地生成,不需要一个额外的controller来发送OpenFlow。Ovs-flow生成的方式可以选择是否on-demand方式生成(默认是ondemand方式生成ovs-flow),采用on-demand方式可以大大减少生成不必要的ovs-flow。由于采用on-demand后ovs-flow的生成总是要迟于数据流,当ovs-flow没有被及时生成时候TupleNet会将数据报文转发到特定节点帮忙转发,从而解决因为实时计算ovs-flow带来的网络数据报文延迟问题。

4. TupleNet使用ovs的BFD与Edge TupleNet节点进行健康探测,实时获知Edge节点存活状态,屏蔽单点故障。并且TupleNet支持ECMP,可以充分利用所有Edge节点的带宽,解决单个Edge性能瓶颈问题

虚拟网络里面的数据报文如果要和外部网络通信必须经过Edge节点,TupleNet支持同时部署和使用多台Edge TupleNet节点。普通的TupleNet节点通过ECMP方式可以将数据报文分发给不同的Edge节点,避免Edge节点成为物理网络和虚拟网络之间的瓶颈。 普通的TupleNet节点和Edge TupleNet节点使用BFD不间断进行健康探测,当普通的TupleNet节点发现某个Edge节点异常后可以自动切换,将发送数据报文给健康的Edge节点。

5. TupleNet支持虚拟路径的 + 物理节点的数据报文tracing,快速定位网络故障

在实际网络中很可能会出现某个网络链路出现问题,或者人为导致TupleNet配置错误,这些情况都会导致在虚拟网络中出现网路不可达。TupleNet提供了Packet tracing功能,可以通过pkt-trace工具从指定logical port发送被标记好的报文,报文所经过的TupleNet节点和虚拟网络中的虚拟节点(logical switch,logical router,logical port)都会被完整记录下来。这些信息可以帮助运维人员快速定位故障。

6. TupleNet支持Non-overlay DSR(Direct Server Return)报文传递

在物理网络上架设TupleNet虚拟网络后,虚拟网络的节点需要和外界物理网络通信时候可以采用overlay & non-overlay 混杂传递报文(从TupleNet node到外部物理网络的报文不经过Geneve封装,直接传递给宿主机协议栈,由宿主机协议栈发送出去,避免解封报文带来的性能损耗。从物理网络到虚拟网络节点的报文仍然经过Edge节点转发)。可以大大提升overlay 虚拟网络的性能,以及减轻Edge节点压力。

TupleNet目前支持以下特性:(TupleNet's features)

  • 分布式虚拟 Switch (distributed virtual switch)
  • 分布式或集中虚拟 Router (distributed virtual router)
  • Active-Active Edge(虚拟网络与外部网络交互Gateway)
  • Overlay & non-Overlay 混杂快速报文传递
  • Arp Proxy
  • ECMP to Edge(Gateway),BFD探测Edge,自动切换
  • Router 设置静态路由规则 (static routes)
  • Redirect,支持使用其他host帮助转发数据报文 (Redircte: other tuplenet node can help deliver traffic )
  • Pkt-tracing,支持发送“染色”探测报文,并分析出所经过的整条链路 (it send out packet which can be traced and print the whole path)
  • SNAT,DNAT, floating-ip
  • HostSwitch IPFIX
  • CNI for K8S, CNM for Docker

很快将会支持的特性 (Feature coming soon)

    • [ ]LoadBalance
    • [ ]ACL
    • [ ]Mirroring

TupleNet 概要 (What TupleNet is)

  • TupleNet的设计目标是尽量用最简单的方式建立一个支持2000物理节点,20000 虚拟节点的中型网络。所以整个TupleNet代码架构非常精简,其主要使用PyDatalog来根据目前的网络拓扑动态实时生成ovs-flow。 *TupleNet was designed to support a system which contains 500 physical node and 5000 virtual node at most. Therefore we simplify whole architecture and code in TupleNet to make it easy to be upgraded and understand. TupleNet consume pyDatalog to generate ovs-flows in run-time *
  • 同时TupleNet支持preprogrammed,ondemanded两种方式来生成ovs-flow,并支持将ondemand节点的packet offload给preprogrammed节点转发。 TupleNet has two ways(on-demand and preprogrammed) to generate ovs-flow. Besides of that, tuplenet(on-demaned node ) can deliver traffic to other host to help forwarding
  • 为了更好支持特性的添加,TupleNet目前只支持使用Geneve Tunnel进行网络虚拟化. TupleNet only support Geneve tunneling due to adding new feature easily
  • Want more details?

如何编译TupleNet (How to compile TupleNet)

TupleNet目前主要由三种语言编写,分别是

  • Python TupleNet的所有主要逻辑
  • C 编写的pkt_controller用于和ovs,tuplenet交互
  • Golang TupleNet的tpctl,tpcnm

TupleNet的主要逻辑都是由Python构建,只需要编译pkt_controller以及tpctl(用于将配置虚拟网络写入ETCD)和tpcnm(TupleNet虚拟网络的docker cnm接口实现)

如何使用TupleNet (Have fun with TupleNet)

  • on master-host:
  1. install ETCD
  2. config ETCD start ETCD cluster
  • on compute-host:
  1. install openvswitch(please install ovs which version above 2.10.0)
  2. pip install tuplenet-xxx.whl(generate whl by running python setup.py bdist_wheel in TupleNet folder)
  3. config & run tuplenet and enjoy it. For detail guide document, please visit tutorials

NOTE1: TupleNet还处于0.3.X的版本,还有很多不足也有很多工作要做。目前TupleNet使用在唯品会内网的测试开发云平台,经过小规模集群验证。如果你在使用中遇到问题,欢迎告诉我们。

NOTE2: You can download and consume latest pypy to speed up the control path to accerlate generating ovs-flow

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].