When I have one server, channels are a great way t...
# server
p
When I have one server, channels are a great way to communicate. But what to use, when you have multiple servers? And what do you use, when your channel needs to be permanent?
c
Kafka?
e
Kafka is old and heavy. I'd look into NATS, Fluvio, Pulsar, Iggy and maybe even Redis.
a
Nats has been fantastic for us
👍 1
p
Kafka is difficult to operate
a
I should be a little more helpful regarding our nats experience: We have had nats servers up for over 4 years now with zero downtime and it is so simple to set up. We use it for server to server communication and also for a network of embedded systems to send thousands of print jobs and other real-time communications that require a physical presence at locations all over. We have upgraded client libraries as well as server processes regularly and never had a backward compatibility issue either. The nats team has maintained compatibility the entire time. A pretty awesome experience for an unzip and run server with a very tiny config file.
👍 1
e
We used cloud native solution for communication between services, in one company it was event bridge (aws) in another it was Service Bus (azure). This also gives you advantages like dead letter queues (when message processing fails)
👍 1
a
I'm on AWS, and don't like to spin up dedicated infra services like message brokers. I wish there was a fully managed solution for this kind of thing. For p2p between servers, I always publish deviceId -> instanceId/privateIp mappings to Dynamo or Redis. Then I either: 1. send HTTP requests to the private IP 2. emit events to redisson pubSub I've even done HTTP over redisson pubSub with a custom protocol, but I don't know if there's much advantage to doing it this way versus sending HTTP to the private ip.
e
@Andrew O'Hara https://www.synadia.com/cloud is hosted