nats server vs streaming server

802 views
Skip to first unread message

kfir ozer

unread,
Dec 25, 2016, 8:32:08 AM12/25/16
to nats
Hello.

I want to use nats to communicate between micro services. 

I saw that there is nats server, and nats-streaming-server. if I understand correctly, the nats-streaming-server supports binary data exchange while nats-server does not.
is that the only major difference ?

in general I have tons of small json based messages to exchange between micro services. should I go for nats-server or nats-streaming-server ?

any information regarding the issue would be greatly appreciated.

thanks!

Steve Dischinger

unread,
Dec 26, 2016, 10:29:56 AM12/26/16
to nats
Kfir, the primary difference between NATS core & NATS Streaming is in the area of persistence data & for enabling the @ least once message delivery QOS.
Based on your summary of above use-case it sounds like the core NATS Server is right for you. We have alot of case studies with NATS as control plane
for microservices:



Thanks-
Steve

Ivan Kozlovic

unread,
Dec 26, 2016, 12:35:11 PM12/26/16
to nats
Hello,

Yes, Steve's answer is spot on. 

I just wanted to add that I am not sure from where you got the impression that only nats-streaming-server supports binary data exchange. Actually both products only deal with byte array as message payload. It is up to the sender/receiver to interpret the content.
That being said, the NATS clients (some of them) actually provide encoded connections that allow to do the encoding/decoding for you. Since you said you are using JSON, the Go client for example provide a JSON encoder. Here is the section of the README about encoded connections: https://github.com/nats-io/go-nats#encoded-connections
Here is an example of using the JSON encoder: https://github.com/nats-io/go-nats/blob/master/encoders/builtin/json_test.go#L16. Check out the rest of the tests programs to see how to create subscribers and send content.

Hope this helps!
Ivan.
Reply all
Reply to author
Forward
0 new messages