Bondy Connect is an open-source application networking platform. It connects the parts of a distributed application — web and mobile apps, IoT devices, backend services and AI agents — through one protocol. Each part calls and notifies the others without knowing where they run.
Bondy Connect implements the Web Application Messaging Protocol (WAMP), an open standard that combines Remote Procedure Calls (RPC) and Publish/Subscribe. Around the WAMP router, Bondy Connect adds an HTTP API Gateway, an MCP gateway, an HTTP connector, broker bridges, identity management and role-based access control. A Bondy Connect cluster replicates realms, identities, permissions and API specifications to every node.
Bondy is now Bondy Connect. From 1.0.0:
- The release and its start script are named
bondy-connect. Runbin/bondy-connect, notbin/bondy.- The Docker images are
leapsight/bondy-connectandghcr.io/bondy-io/bondy-connect.- The repository is
github.com/bondy-io/bondy-connect.The
/bondypaths, node names,BONDY_*environment variables andetc/bondy.confkeep their names.
Upgrading from
1.0.0-rc.65or earlier. Bondy Connect 1.0.0 cannot read the data directory of an earlier release. Take a backup on the old release, wipe the data directory, and import the backup into 1.0.0. Read the migration guide and the Action required section of the CHANGELOG before you start.
Upgrading to 1.2. A node that runs 1.2 cannot go back to an earlier release. 1.2 upgrades the storage engine (leveled), and from its first start a node writes stored data in a format that earlier releases cannot read. Before you upgrade, take a logical export (
bondy.export.create). To go back, deploy a new cluster on the earlier release and import the export; it holds nothing written after you took it. See the Action required section of the CHANGELOG.
- A cluster of equal nodes. No node is special, and any node accepts any session. A node keeps working when other nodes or the network fail.
- Location-transparent routing. A message reaches its callee or its subscribers on whichever node their sessions run. The nodes form a full mesh, so a routed message takes one hop between nodes.
- Replicated state. Every node holds the realms, identities, permissions, API specifications and registry. Each table converges through operation-based CRDTs. Pull-based active anti-entropy over Merkle Search Trees repairs what a node missed. See Database architecture and Convergence.
- Partisan. The nodes talk over Partisan, a replacement for Distributed Erlang that keeps control and data traffic on separate channels. A node finds its peers through DNS or a static list. See Clustering.
- Erlang/OTP. Bondy Connect runs on the BEAM. Every session and subsystem is a lightweight, isolated and supervised process.
- Realm isolation. A realm is a routing and administrative domain. Each realm has its own users, groups, permissions, authentication methods and URI namespace, and a session belongs to exactly one realm.
These components run in the same node as the WAMP router:
- HTTP API Gateway. Maps HTTP requests to WAMP calls and publications, and maps the results back to HTTP responses. The cluster replicates API specifications to every node.
- Admin API. Manages realms, users, groups, grants and sources, over HTTP
or over WAMP through the
bondy.*procedures. - MCP gateway. Serves the Model Context Protocol over HTTP on any listener
that declares the
mcpservice. It mapstools/*andresources/*onto WAMP, and it can expose upstream MCP servers as WAMP procedures. - HTTP connector. Registers WAMP procedures that call upstream HTTP services. See HTTP connector.
- Broker bridges. Re-publish WAMP events to Kafka, AWS SNS, Mailgun, SendGrid or an SMTP server.
- Bridge relay. Connects a realm on one cluster to a realm on another, for example an edge node to a core cluster. See Bridge relay.
- Outbound mail. Sends email through configured SMTP relays.
- Rate limiting. Token buckets per IP address for handshakes, authentication, connections, HTTP requests and messages. See Load regulation and rate limiting.
- Export and import. A logical export of the durable tables, through the
bondy.export.*procedures.
- A new storage and replication stack.
bondy_db,bondy_oplogandbondy_mstreplace PlumDB and RocksDB. Every replicated table converges through operation-based CRDTs. Deletion and tombstone reclamation are on by default. - Summary-based registry routing. See Registry routing.
- Progressive Call Results and Progressive Call Invocations, also across cluster nodes and through bridge relays.
- Call deadlines and retries.
CALL.Options._deadlinecaps the duration of a whole call.CALL.Options._retriesre-routes a call that got no answer to another_idempotentregistration. - Procedure, topic and error reflection through the
wamp.reflection.*procedures. - Operator-defined listeners (
listeners.$name.*), validated at boot. Listeners support HTTP/2, Unix domain sockets and the PROXY protocol. Suspend and resume take a node out of rotation. - MCP gateway. Serves the Model Context Protocol on any listener and maps MCP tools and resources onto WAMP procedures.
- HTTP connector. Registers WAMP procedures that call upstream HTTP services, with token acquisition and connection pooling.
- Outbound mail over SMTP relays.
- Inbound rate limiting per IP address, globally or per listener.
- Observability. Prometheus metrics, OpenTelemetry (OTLP) span export and
alarms.
monitoring/bundles a Prometheus, Tempo and Grafana stack. - Security hardening.
- A revoked ticket is revoked on every node.
- A node refuses to start on an insecure cluster peer plane unless its configuration allows it.
- Realm keys can be encrypted at rest.
- The CHANGELOG lists the security fixes.
- Erlang/OTP 29.
- Install and start Docker.
- Download the examples/custom_config
folder, or clone this repository. Then
cdto the folder that containsexamples/. - Run:
docker run \
--rm \
-e BONDY_ERL_NODENAME=bondy1@127.0.0.1 \
-e BONDY_ERL_DISTRIBUTED_COOKIE=bondy \
-u 0:1000 \
-p 18080:18080 \
-p 18081:18081 \
-p 18082:18082 \
-v "$PWD/examples/custom_config/etc:/bondy/etc" \
-v "/tmp/data:/bondy/data" \
leapsight/bondy-connect:1.2.1The example configuration runs a single node (cluster.enabled = off) with the
default listeners:
| Port | Listener | Serves |
|---|---|---|
| 18080 | api_gateway_http |
API Gateway, WAMP over WebSocket (/ws), SSE and Longpoll |
| 18081 | admin |
Admin API, WAMP over WebSocket, /ping, /ready, /metrics |
| 18082 | wamp_tcp |
WAMP RawSocket over TCP |
The images are built for linux/amd64 and linux/arm64. They are published as
leapsight/bondy-connect:<version> and ghcr.io/bondy-io/bondy-connect:<version>.
From 1.0.1, each version also has an Alpine Linux image, <version>-alpine.
- macOS (Intel or Apple silicon) or Linux (amd64 or arm64)
- Erlang/OTP 29 or later. The release images use 29.1.2.
- rebar3 3.27.0 or later. The release images use 3.28.0.
- just, the task runner (
brew install justorcargo install just) - A C and C++ toolchain,
cmakeandgit, to build the native dependencies - OpenSSL
Clone this repository and cd into it. To list every recipe, run just with
no arguments.
To build a production release tarball, run:
just release-tarThe recipe writes _build/prod/rel/bondy-connect/bondy-connect-1.2.1.tar.gz
and unpacks a copy into _build/tar. To install Bondy Connect somewhere else,
unpack the tarball there, for example into ~/tmp/bondy:
mkdir -p ~/tmp/bondy
tar -zxvf _build/prod/rel/bondy-connect/bondy-connect-1.2.1.tar.gz -C ~/tmp/bondyRun these commands from the install directory. With no arguments, the start script lists its commands:
bin/bondy-connectTo run Bondy Connect in the foreground and log to stdout:
bin/bondy-connect foregroundTo run Bondy Connect with an interactive Erlang shell:
bin/bondy-connect consoleThe node1, node2 and node3 recipes build and start three nodes on
127.0.0.1. Each node reads its own configuration from config/test/.
| Listener | node1 | node2 | node3 |
|---|---|---|---|
| API Gateway HTTP, WebSocket | 18080 | 18180 | 18280 |
| Admin API HTTP, WebSocket | 18081 | 18181 | 18281 |
| RawSocket TCP | 18082 | 18182 | 18282 |
| API Gateway HTTPS | 18083 | 18183 | off |
| Admin API HTTPS | 18084 | 18184 | off |
| RawSocket TLS | 18085 | 18185 | off |
| Cluster peer | 18086 | 18186 | 18286 |
just node1Every WAMP session belongs to a realm. Create one through the Admin API on the node's local socket, which needs no credentials:
SOCK=_build/node1/rel/bondy-connect/run/bondy_admin.sock
curl --unix-socket "$SOCK" -X POST "http://localhost/realms" \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Accept: application/json; charset=utf-8' \
-d '{"uri": "com.myrealm", "description": "My first realm"}'While you experiment, disable security on the realm so that clients can connect without credentials:
curl --unix-socket "$SOCK" \
-X DELETE "http://localhost/realms/com.myrealm/security_enabled" \
-H 'Accept: application/json; charset=utf-8'On port 18081 the Admin API needs a bearer token from the master realm. See Authenticating to the Admin API.
just node2node2 finds node1 in its static peer list and joins the cluster within a
few seconds. Anti-entropy then copies the realm you created on node1 to
node2.
node3 starts with peer discovery off. To add it to the cluster, set
cluster.peer_discovery.enabled = on in config/test/node_3_bondy.conf.template
before you run just node3.
Bondy Connect advertises its features in every WELCOME message, under
roles.dealer.features and roles.broker.features. The build fixes the
features; configuration does not change them. See
WAMP features for how a session obtains
them and for the contracts of Bondy Connect's extensions.
- Anonymous
- Cryptosign
- Ticket
- WAMP-CRA
- WAMP-SCRAM
- Cookie (validates a Bondy Connect ticket issued by the OpenID Connect flow)
In addition, Bondy Connect provides:
- Password
- OAuth2, with Bondy Connect as the token server
- Trust — admits a known user without credentials; for trusted networks only
- OpenID Connect relying party — an HTTP login flow that issues a ticket for the
cookiemethod - Same Sign-on — one set of credentials signs on to several realms
- Single Sign-on — Same Sign-on combined with Ticket authentication; one ticket signs on to several realms
- Prototype realms — realms that inherit configuration from a prototype
- Mutual TLS — the TLS layer verifies client certificates
- Remote Procedure Calls (Caller, Dealer, Callee)
- Publish & Subscribe (Publisher, Broker, Subscriber)
- Progressive Call Results
- Progressive Call Invocations — streams call arguments from caller to callee; see Progressive call invocations
- Call Timeouts
- Call Canceling —
skip,killandkillnowait, also when the callee is on another node - Caller Identification
- Call Trust Levels —
INVOCATION.Details.trust_levelis always0 - Pattern-based Registration —
exact,prefixandwildcard - Shared Registration
- Single
- Round robin
- First
- Random
- Last
- Sharded Registration — caller side only: a CALL with
runmode = "partition"andrkeyreaches the callee itsrkeyhashes to; registration-side sharding is not implemented - Call Re-Routing
- Payload Passthru Mode
- Registration Revocation
- Registration Meta API —
list,lookup,match,get,list_callees,count_callees; eventson_registerandon_unregister - Procedure Reflection —
wamp.reflection.procedure.listanddescribe
In addition, Bondy Connect provides:
- Call deadline —
CALL.Options._deadline; see Call deadline - Call retries —
CALL.Options._retrieswithREGISTER.Options._idempotent; see Call retries - Error reflection —
wamp.reflection.error.listanddescribe - Caller authentication claims (
caller_auth_claims)
- Pattern-based Subscriptions —
exact,prefixandwildcard - Publisher Exclusion
- Publisher Identification
- Subscriber Black- and Whitelisting — by session id,
authidandauthrole - Event Retention
- Publication Trust Levels
- Payload Passthru Mode
- Sharded Subscriptions
- Event History
- Subscription Revocation
- Subscription Meta API —
list,lookup,match,get,list_subscribers,count_subscribers; eventson_subscribeandon_unsubscribe - Topic Reflection —
wamp.reflection.topic.listanddescribe
Bondy Connect does not publish the on_create and on_delete meta events for
registrations or subscriptions. A cluster cannot tell a URI's first and last
registration without coordinating its nodes.
- Session Meta API —
wamp.session.on_join,on_leaveandgetare implemented;list,countand thekill*procedures are not - Testament
- WebSocket
- RawSocket over TCP and TLS
- HTTP Longpoll (JSON)
- E2E encryption (via Payload Passthru Mode)
In addition, Bondy Connect provides:
- HTTP Server-Sent Events (SSE) — a variant of HTTP Longpoll that receives over SSE (JSON)
- RawSocket over Unix domain sockets
- HTTP/1.1 and HTTP/2 on every HTTP listener
- JSON
- MessagePack
- CBOR
- Erlang (
wamp.2.erl, a subset of the Erlang external term format) - JSON batched
- MessagePack batched
- CBOR batched
- developer.bondy.io — the documentation site.
doc/guides/— the guides for this release: architecture, configuration, database, deployment, router and security.- CHANGELOG.
- bondy.io
- WAMP specification
- @bondyIO
- Recorded webinar: Implementing a polyglot microservices architecture (2019)
- Recorded Conference Talk: Introducing Bondy: The IoT, Web and Mobile Platform (2023)
Bondy Connect is licensed under the Apache License 2.0.
The Bondy Connect documentation (https://developer.bondy.io) is copyright Leapsight and licensed under CC-BY-SA 4.0. It is provided as-is, without any warranties.

