libfabric is a JavaScript library for peer-to-peer browser game networking. It's free, easy to use, and ridiculously scalable. It was developed with the goal of leveling the playing field for indie developers and small game studios who are limited in labour and money.

The cloud model

Traditionally, if you wanted to networked your browser game, you would have to use something like WebSockets and a cloud server.

Cloud multiplayer architecture

This can get


With WebRTC starting to see widespread support, and the standards settling, we can finally cut out the middle man and have players communicate directly over a mesh network!

P2P multiplayer architecture

But wait! Isn't that less scalable? Now 5 players need to send duplicate data across a total of 10 connections. 50 players over 1225 connections! No browser can handle that! That's where the magic comes in...


Figuring out how to connect peers in a way that is fault-tolerant, performant, and infinitely scalable, is a monumental task. The algorithms libfabric uses are directly based on the PhD research of Yousef Amar whose solutions can be tuned to any game genre and mitigate cheating.

libfabric multiplayer architecture

libfabric will dynamically reconnect peers in topologies optimising for:

libfabric additonally supports 8 different P2P topologies, ranging from superpeer to Delaunay triangulation-based topologies, and allows you to network behaviour to your liking, depending on the genre of game you're developing. If you're interested in the technical details, let's have a chat!