Mesh Networking: Why Care?

Image for post
Image for post

Today information travels between computers and mobile devices at a rate which would have been unimaginable just a decade ago. How is it possible that a person in Hong Kong can tweet a photo which another person in New York City can retweet less than one second later? How can two people across the globe click a link and near-instantaneously start seeing and hearing each other in real time?

Most of us take for granted the underlying fabric that makes our constant connectivity possible, but it is important to remember how new this technology is in the scope of human history and how rapidly it can change.

Image for post
Image for post

Hub & Spoke Model

We know that most of our digital communications are routed through “the internet”… but what is it? Broadly speaking, the internet is a web-like network of smaller sub-networks, all of which communicate by adhering to the same rules or protocol. There are many layers and subtle differences but you can think of the underlying sub-networks as Internet Service Providers (ISPs) like AT&T, Comcast or Verizon in the US, or company-wide Local Area Networks (LANs) within an office building.

Big or small, these sub-networks generally rely on hubs to act as the central entry/exit point for information between the greater internet and individual users or spokes. Everything from a home router to a regional data center are designed around the hub & spoke model… and for good reason! This centralized approach allows for a few powerful, specialized machines to do the heavy lifting and serve data to many smaller machines, often for a fee. But this is not the only approach.

Image for post
Image for post

Mesh Model

Mesh networks operate under a different set of rules. Rather than differentiating between hubs and spokes, all network participants (nodes) are treated equally. Each individual member of the network acts as a routing/relay node, receiving data from one neighbor and passing it to the next until it reaches its final destination. This may seem more simple on surface level but in fact the implications are quite problematic once scaled to a global level.

Imagine a scenario where Alice uploads a video of her cat to her favorite social media website. Bob then logs in and tries to watch the cat video. Within a hub and spoke network, Alice’s video would have traveled from 1. her personal device to 2. her regional hub to 3. Bob’s regional hub and finally to 4. Bob’s personal device. How would the route be determined in a mesh network where every device is treated equally? One option is for Alice’s device to send the video directly to Bob, but what if they are out of range? Maybe the video is routed from Alice to Carol to Bob, or Alice to David to Edward to Bob, and so on. If Alice’s video is repeatedly transferred to every other device she is connected to, that is a huge drain on each device and thus the network as a whole. This is one of the biggest challenges of building decentralized systems in general.

While mesh networks do have inherent problems with latency and redundancy, they also have some naturally positive properties. Hub and spoke models are very efficient under ideal settings, but if one server node (hub) goes down due to a power outage or security breach, all the client nodes (spokes) it serves will instantly be cut off from the greater internet. If one node in a meshnet goes offline the network automatically finds a new route to send information through. In network theory this is known as a self-healing property. Another way of looking at it is that meshnets have no central point of failure — they optimize for accessibility and resiliency over efficiency.

Image for post
Image for post

In The Wild

It’s easy to see why the limitations of mesh networks have stopped it from being our de facto means of communication, but there are some use cases where it is warranted. The concept of meshnets predates the internet itself and was first developed by the US Navy in the 1960’s. To this day it is widely used by military and intelligence agencies who wish to maintain communication networks without exposing data to the entire internet.

As the protocols are hardened and hardware becomes cheaper and more powerful, alternative ISPs have begun popping up around the world who offer internet access by means of local meshnets. NYC Mesh operates in Manhattan and Brooklyn, offering competitive rates for high speed internet through small antennas installed on rooftops of thousands of apartment buildings. Similar efforts such as guifi.net in Barcelona and Freifunk in Berlin are giving traditional ISPs a run for their money.

Another practical usage of meshnet is maintaining communication in remote locations. Brooklyn, NY-based goTenna offers a line of portable, battery-powered devices which connect to a smartphone via Bluetooth. The devices then communicate with each other over long distances through radio waves, allowing hikers, rescue workers, etc. to maintain contact with the outside world in locations where traditional internet access is unavailable.

Similarly, the concept can also be applied to more developed regions where traditional internet access is disrupted by natural disasters or political forces. Open source, grassroots mesh project Locha Mesh is one such example in Venezuela, where the government censors many communications that most of the western world take for granted. For about $40 USD worth of hardware, Locha Mesh allows Venezuelans to route around the oppressive restrictions and communicate freely through text and financial transactions.

Image for post
Image for post

The Future of Mesh

Mesh networking will not be replacing current network standards anytime soon, but as both hardware and the underlying routing technologies improve it is likely that we’ll start seeing it pop up in more niche uses. Meshnets are a great way to build resilient communication protocols in addition to and as a backup for the high-speed networks we are used to. In a world where nearly everyone carries a computer around in their pocket, it’s not hard to imagine a new web of peer-to-peer connections between them, routing small packets of information without relying on central hubs.

Written by

Data Science | Data Engineering | Python Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store