Node.js library for microservices that discover peers automatically and exchange messages without central registries, queues, or reverse proxies. It provides request-response and publish-subscribe patterns over lightweight TCP.
Overview
Cote is a Node.js package for building microservice-style applications where services find each other without manual network configuration. It replaces typical service registries and message brokers with IP broadcast and multicast discovery, then speaks over simple TCP sockets instead of full HTTP for internal traffic.
Developers instantiate components such as Requester, Responder, Publisher, and Subscriber. Requesters load-balance across discovered responders; publishers fan out updates to subscribers. Keys and namespaces support segmented request types when multiple responders handle different duties.
The design targets decentralization: no fixed manager nodes, queued requests when no responder is available, and horizontal scaling across machines or datacenters once multicast or broadcast is available. Docker overlay networking is highlighted as a practical way to run cote across hosts.
An e-commerce case study in the documentation wires express REST back offices, socket.io storefronts, and several CRUD services together, including Docker Compose for local multi-service runs.
Key features
- Auto-discovery via broadcast/multicast
- Requester and Responder pattern
- Publisher and Subscriber pattern
- No external broker required
- Lightweight TCP protocol
- Round-robin load balancing
- Request queuing when peers absent
- Docker-friendly networking
Use cases
- Splitting monoliths into services
- Internal RPC between Node processes
- Real-time catalog or sales updates
- Multi-datacenter Node deployments
- Express app microservice glue