GrandeNet - The Internet on Steroids

GrandeNet can be used to optimize connectivity between computers distributed around the world by creating a mesh network which can be even faster them the Internet itself.

Last Update:2016-02-26

Version:002

Language:en

Page Content

The Great Slowdown

As many countries and ICP providers tend to optimize their "internal" data access by applying tools to
control or monitor users, the overall network condition deteriorates and performance can be reduced
to significant levels. This situation leads to considerable increases in the cost for companies who
want to provide applications to end users. Our research has shown that the Internet speed - not only
in China - varies more than expected on a global scale and quite often, the Internet does not use
optimized routes leading to temporary or permanently slow access to some applications or for a group
of users. GrandeNet can
optimize up to 80% of the connectivity of certain servers by using Re6st and maintaining optimized and stable routes
between all connected servers.

Can you Re6st?

Re6st
is a multiprotocol random mesh generator that uses the Babel routing protocol to discover optimizal routes
between each point in the mesh. It supports IPv6 and IPv4 with RINA support coming soon.
It is commercially used by VIFIB
our distributed cloud provider helping to solve the current lack of reliability of Internet connectivity for
distributed enterprise applications due to bugs in routers, packet inspection breaking TCP protocol, government
filters filtering too much, etc. Without re6st, it would have been impossible to deploy critical business
applications used by large companies (Mitsubishi, SANEF, Aide et Action, etc.) on a decentralized cloud. It
would also be impossible to manage the deployment of distributed cloud in Brazil, China or Ivory Coast where
the Internet is even less reliable.

IPython Notebook

IPython Notebook
is a web-based interactive computational environment for creating Executable Notebooks with Embeeded Python Code.
IPython Notebook is largely used by researchers to produce and share their scientific work. We chose to use
IPython Notebook for this article to provide a transparent walkthrough of what we are doing.

This article is fully reproducible by importing this notebook on your IPython Notebook Instance.

In order to execute the this notebook we need some well-known python libraries, specifically, panda,
numpy, scipy and matplotlib. Below are the imports required to initialize the necessary libraries.

Next, we'll define the core code - written as methods which will perform the Data Collection and the
Calculation of the results for this article. If you are not interested in Code, you can move directly
to the next section of this article.

In [2]:

importurllib2defload_json(url,average="internet_ipv4",packet_lost="internet_ipv4_packet_lost"):""" Download JSON and normalize the data by: - Replace failed by a number '0', so the column is a float and not string - Replace 'average' and packet_lost by another name for help concat 2 numpy array w/o recreate it. - Remove latest empty line. """req=urllib2.Request(url)response=urllib2.urlopen(req)content=response.read()return'[%s]'%content\
.replace('"failed"',"0")\
.replace('"average"','"%s"'%average)\
.replace('"packet_lost"','"%s"'%packet_lost)\
.replace("\n",",")[:-1]defload_test(id,date_id):""" Load Test results from Distributed Monitoring Tool and transform into DataFrames """# Load JSON for ICMPv6ping6_as_jsonstring=load_json(log_dict[id]["grandenet_ipv6"]%date_id,average="grandenet_ipv6",packet_lost="grandenet_ipv6_packet_lost")# Load JSON for ICMPv4 ping_as_jsonstring=load_json(log_dict[id]["internet_ipv4"]%date_id,average="internet_ipv4",packet_lost="internet_ipv4_packet_lost")returnpd.read_json(ping6_as_jsonstring,convert_dates=["time"]), \
pd.read_json(ping_as_jsonstring,convert_dates=["time"])defget_computer_list(dframeA,dframeB):""" Extract all computer names at the DataFrames """returnlist(set([computer_name[0]forcomputer_nameindframeA[["computer_name"]].as_matrix()]+[computer_name[0]forcomputer_nameindframeB[["computer_name"]].as_matrix()]))defget_computer_destination_label(dframeA):""" Determinate the Label Name for the computer which are receiving the ping"""returngetComputerLabel([computer_name[0]forcomputer_nameindframeA[["name_or_ip"]].as_matrix()][0])defgetComputerLabel(computer_name):""" Translate hostname, ip addresses into meaningfull names for better understanting"""returnserver_label.get(computer_name,computer_name)# Initiallization function which are going to be used for # collect the logs and transform them on Data Frames.defplot_ping_comparation(df_ping6,df_ping):""" Function to load, plot and compare 2 Data Frames """computer_list=get_computer_list(df_ping,df_ping6)computer_destination_label=get_computer_destination_label(df_ping6)measured_average=[]packet_lost=[]forcomputer_nameincomputer_list:ifgetComputerLabel(computer_name)==computer_destination_label:continuedf6=pd.DataFrame(df_ping6[df_ping6["computer_name"]==computer_name][df_ping6["grandenet_ipv6"]>0][["time","grandenet_ipv6"]])df4=pd.DataFrame(df_ping[df_ping["computer_name"]==computer_name][df_ping["internet_ipv4"]>0][["time","internet_ipv4"]])# Use Moving average in order to eliminate noise spikes on the chart and measurement.df6['grandenet_ipv6']=rolling_median(df6['grandenet_ipv6'],window=3,center=True)df4['internet_ipv4']=rolling_median(df4['internet_ipv4'],window=3,center=True)label="'%s' to '%s'"%(getComputerLabel(computer_name),computer_destination_label)if0in[len(df6),len(df4)]:print"Found one empty array for %s"%labelcontinuedf=pd.DataFrame(pd.concat([df6,df4]))ifSHOW_ALL_CHARTS:df4.plot(x="time",title=label+" (lower is better)",sort_columns=["time"],figsize=(20,6))df6.plot(x="time",title=label+" (lower is better)",sort_columns=["time"],color='r',figsize=(20,6))df.plot(x="time",title=label+" (lower is better)",marker='o',color=["b","r"],figsize=(20,6))# Ignore 0 entries as it represents a full failure (so no average).ipv6_mean=df6["grandenet_ipv6"].mean()ipv4_mean=df4["internet_ipv4"].mean()grandenet_ipv6_packet_lost=df_ping6[df_ping6["computer_name"]==computer_name]["grandenet_ipv6_packet_lost"].mean()internet_ipv4_packet_lost=df_ping[df_ping["computer_name"]==computer_name]["internet_ipv4_packet_lost"].mean()ifipv6_mean<ipv4_mean:improvement_ratio=float(ipv4_mean-ipv6_mean)/ipv4_meanstate="OPTIMIZED in %sms (%.2f%%)"%((ipv4_mean-ipv6_mean),improvement_ratio*100)elifipv6_mean<(ipv4_mean+max(20,ipv4_mean*0.15)):state="OK (in acceptable range %s < %s < %s)"%(ipv4_mean,ipv6_mean,(ipv4_mean+max(20,ipv4_mean*0.15)))else:state="BAD (%sms slower)"%(ipv6_mean-ipv4_mean)measured_average.append({"name":"'%s' to '%s'"%(getComputerLabel(computer_name),computer_destination_label),"grandenet_ipv6":ipv6_mean,"internet_ipv4":ipv4_mean,"state":state})ifgrandenet_ipv6_packet_lost<internet_ipv4_packet_lost:loss_state="OPTIMIZED (Better Packet Lost rate)"elifgrandenet_ipv6_packet_lost==internet_ipv4_packet_lost:loss_state="OK (Same Packet Lost rate)"elif(grandenet_ipv6_packet_lost-internet_ipv4_packet_lost)<1:loss_state="OK (less them 1% diference is considered same)"else:loss_state="BAD (Worst Packet Lost rate)"packet_lost.append({"name":"'%s' to '%s'"%(getComputerLabel(computer_name),computer_destination_label),"grandenet_ipv6_packet_lost":grandenet_ipv6_packet_lost,"internet_ipv4_packet_lost":internet_ipv4_packet_lost,"state":loss_state})returnpd.DataFrame(measured_average),pd.DataFrame(packet_lost)

Measuring Performance with SlapOS Distributed Monitoring

The core of GrandeNet
Infrastructure is based on servers distributed on multiples cloud providers (Amazon, Qincloud, OVH, Rackspace, UCloud...)
as well as standalone machines distributed on companies offices and/or people's home. Customers may add their servers
located on their premises or even at their homes to be used as their main production servers.

This hybrid and heterogenious infrastrucuture of GrandeNet
uses SlapOS
to manage and monitor all distributed servers around the globe.

In this article we used a small set of servers (12) with public IPv4 running SlapOS
Distributed Monitoring. Each server tries to contact (using ICMP Protocol) all other 12 servers using IPv4
and IPv6 addresses. Tests are performed 10 times (10 pings) every 10 minutes and we get the average and packet loss for testing
and comparison.

The image bellow ilustrates the tests with using just 3 servers:

Below we initialize the location for each servers' logs along with labels to improve the readability of the charts and results.

We also limit the scope of this article to the tests performed on a certain date range, shown below by the variable "DAY".

In [4]:

# Define here if you want more or less charts verbosity. Show all charts can# make this report quite big.SHOW_ALL_CHARTS=False# Generate Report for the Jan, 28, 2016DAY="20160128"

Collecting Data from Distributed SlapOS Monitoring

In order to produce results for this article, we use the methods defined above, crawl the logs and turn them into
dataframes. These dataframes contain the test results for the indicated period (DAY above).

Internet IPv4 vs Grandenet IPv6

Using the dataframes we can visualize a comparison of the response time (in miliseconds) between using
Internet IPv4 (red) vs Grandenet IPv6 (blue). As we are using the ICMP Protocol to measure the response time,
the charts below use the name "ping" for IPv4 and ping6 for IPv6 and highlight the differences between
the Internet IPv4 and the IPv6. The smaller the response time, the lower the plotted line, the better.