Technical Specs

The engineering behind Blip's BLE mesh network. Built for festival-scale crowds with end-to-end encryption, adaptive gossip routing, and Ed25519 packet authentication.

Mesh Network

TransportBluetooth Low Energy 5.0+
TopologyDual-role (central + peripheral simultaneously)
Max connections6 per device (configurable for bridge nodes)
Service UUIDFC000001-0000-1000-8000-00805F9B34FB
MTU512 bytes (517 requested, 512 effective)
Hop limit (TTL)0–7 hops per packet
Range per hop~40m (BLE 5.0, line-of-sight up to 100m)
Effective range~200–300m through crowd (7 hops)

Gossip Routing

AlgorithmProbabilistic gossip with adaptive relay
Deduplication3-tier Bloom filter (60s / 10min / 2hr windows)
Relay probability100% (<10 peers) → 20% (60+ peers)
SOS relayAlways 100%, TTL preserved for first 3 hops
Jitter8–25ms random per relay (prevents synchronized flooding)
Congestion backoffQueue fill >80% reduces relay to 20%
DM routing (at scale)DirectedRouter with 5-min route expiry
Store-and-forward10MB LRU cache, DMs cached 2hrs, SOS until resolved

Encryption

Key agreementNoise XX handshake (Curve25519 + ChaChaPoly + SHA256)
Packet signingEd25519 via libsodium (64-byte detached signatures)
Signable dataFull packet excluding TTL byte and signature (spec §7.3)
Relay compatibilityTTL excluded from signed data — relay nodes decrement without breaking sig
Key distributionNoise + signing public keys exchanged in announce payload
Session managementNoise session per peer pair, rekeying on reconnect

Packet Format

Header16 bytes fixed (version, type, TTL, timestamp, flags, length)
Sender ID8 bytes (SHA256 of noise public key, truncated)
Recipient ID8 bytes (optional, for addressed DMs)
Signature64 bytes (optional, Ed25519)
Max payload (broadcast signed)424 bytes
Max payload (addressed signed)416 bytes
Fragmentation threshold416 bytes
Byte orderBig-endian (network byte order)

Scale Design

Target100,000+ concurrent users
Crowd modesGather (<500) / Festival (500–5K) / Mega (5K–25K) / Massive (25K+)
RSSI pollingEvery 10 seconds for connected peers
Peer evaluation30-second cycle for connection quality scoring
Reconnect backoff30 seconds (reduced from 120s for density)
Stale peer cleanupDisconnected peers pruned after 5 minutes

Platform

iOS17.0+ (SwiftUI, SwiftData, MVVM)
PackagesBlipProtocol, BlipMesh, BlipCrypto (Swift Package Manager)
DependenciesCryptoKit (Apple), swift-sodium, swift-opus
BackendCloudflare Workers (auth, relay) + Neon Postgres
BuildXcodeGen + xcodebuild

Open development

Blip is built in the open. Check out the source, report issues, or contribute.

View on GitHub