Service discovery
Articles on service discovery for Node.js back-ends: when you actually need it, when the queue name is the address, and auto-scaling broker discovery.
3 articles
One event, every instance: pub/sub over a Redis broker fleet with @imqueue
You need to tell every instance of a service something at once — a price list changed, a tenant was suspended, an order was created and three concerns want to know. Pub/sub is the tool, and a fleet of brokers changes how it behaves. Here is what a clustered subscription does across several Redis brokers, how to publish and subscribe so brokers joining and leaving never cost you a handler, how to write a handler that stays correct when it gets one copy per broker, and how to see that it works.
read →Auto-scaling Redis broker: with and without broadcast
One Redis behind your message bus is a ceiling and a single point of failure. The promoter and unicaster modules turn a fleet of plain Redis instances into a horizontally auto-scaling broker — here are the recipes for networks that deliver broadcast and for clouds like GCP that don't, and how to encrypt the result when the brokers announce addresses no certificate can carry.
read →Do your Node.js back-ends really need service discovery?
Consul, etcd, DNS-SD — service discovery is a lot of machinery to stand up. Sometimes you genuinely need it; often you don't. Here's how to tell, and how a queue makes the question disappear.
read →