The Scalability Protocols

Patterns for programs that need to talk.

nanomsg is a family of lightweight messaging protocols for building distributed systems. Start with the communication pattern you need; choose the implementation that fits your language.

Protocol first

A small vocabulary for distributed systems.

Each protocol describes how peers exchange messages. Implementations share this model, letting you make a deliberate choice about language, API, and lifecycle without losing sight of the topology.

01

PAIR

Direct one-to-one communication between two peers.

02

PUB / SUB

Publish messages to every interested subscriber.

03

REQ / REP

Route requests to services and receive replies.

04

PUSH / PULL

Distribute work and aggregate messages.

05

BUS

Exchange messages in a simple many-to-many mesh.

06

SURVEYOR / RESPONDENT

Ask many peers a question and collect their answers.

Choose your implementation

One protocol family, clear paths forward.

Preferred pure Go implementation

mangos

A native Go implementation of the protocol family, built for Go applications rather than as a wrapper around a C library.

Read the Go API documentation

Legacy C API

libnanomsg

The original C implementation. It remains available for existing applications and the language bindings built around its stable API.

Browse the legacy documentation

Open source

Build the shape of communication your system needs.

Visit nanomsg on GitHub