text stringlengths 0 1.49k |
|---|
**Carlisia Thompson:** Nice. |
**Wally Quevedo:** Derek explains more in detail why Go was a good fit. |
**Carlisia Thompson:** Can you share with us some of those reasons? |
**Wally Quevedo:** Go is great for these kinds of system. The performance is of course one of the big gains for NATS. I think the original server - you could get it at mostly like 150,000 messages per second, but for the NATS server it's up to the millions, right? So even though the original Ruby server was already.. -... |
Of course, there's the whole building concurrency - Ruby is still having some issues there. Also, the small binaries I think were all a huge factor in a compiled language, where you can't have a small binary. It was a big plus here, that's why we can have very small Docker images, for example, a few megabytes. So I thi... |
**Carlisia Thompson:** Nice. |
**Brian Ketelsen:** One of the questions I have about NATS in general is that I find the sales pitch for NATS is a little muddy. When you look at the NATS website it says "It's the dial tone for your servers", or "It's a communication platform", but a lot of the benchmarks that they list on the website are about messag... |
**Wally Quevedo:** Okay, so NATS is a high-performance messaging system, and you could use it as a transport to be able to communicate with clients that connect through it. It's like a pure publish-subscribe messaging system, but on top of this basic pub-sub you could do also basic request-response for RPC type of use ... |
Actually, one of the really nice, concise explanations from NATS is from Ivan from the NATS team, describing that someone was complaining that a NATS server was sending duplicate messages. Ivan describes in the issue that basically it receives a message, and once it receives a message, it send it directly to any subscr... |
**Erik St. Martin:** I think it has the notion of persistent messages too, right? Where if the client goes offline, the client can reconnect and kind of consume any messages that it might have lost. |
**Wally Quevedo:** \[11:50\] NATS itself does not... NATS is just a fire-and-forget; you can publish messages... For any subscriber, they have to be connected to a stable connection to be able to receive those messages. If they're not around by the time those messages get published, then those messages will not be rece... |
So for the persistent use cases, there is another tool named NATS Streaming. That gives you the redelivery, kind of like message replay features. |
**Brian Ketelsen:** From my understanding, NATS Streaming is a whole lot like [Kafka](https://kafka.apache.org/), where you can just go back and say "Give me all of these messages from the beginning of time" or "Start 600 messages ago and give me all those messages." |
**Wally Quevedo:** Yeah, pretty much. You can start your subscription from the beginning of all the messages that have been published, or if you reconnect and maybe you have lost some messages during that reconnection, then you start once again from the last sequence number that you may have received. |
**Brian Ketelsen:** That's nice. So in terms of NATS vs NATS Streaming, what's the cost of the durability? How much throughput do you lose when you have to save messages? |
**Wally Quevedo:** Yeah, the performance is going to be very different, mostly because also NATS Streaming itself is on top of NATS. NATS Streaming is built, for example, with [protocol buffers](https://developers.google.com/protocol-buffers/). It is using protocol buffers being transmitted on top of the NATS transport... |
**Brian Ketelsen:** One of the things that really impresses me about NATS is how flexible it is. I was building a class this week on microservices with [Go Micro](https://github.com/micro/go-micro) and one of the plugins for Go Micro is a transport layer plugin, so that you can choose to use NATS as the entire transpor... |
**Erik St. Martin:** One of the things that I love about it is the number of platforms, because I think there's JavaScript implementations... I know I've seen Arduino and things like that, so people can have IoT devices just push metrics out to NATS servers. |
**Wally Quevedo:** Yeah, it's been very cool how the community has been taking off in some of the recent years. For a long time there was only the Ruby, Node.js and the Go clients. Now we have C\#, C, Elixir clients. The Python clients, they are official now... |
**Erik St. Martin:** So is this mostly open source contributions, or does Apcera in the NATS scene deliver most of these different libraries? |
**Wally Quevedo:** Yeah, we try to have official libraries as much as we can. It's a very small team, the NATS team. But yeah, for the more important languages, we try to have some off-the-shelf solutions. There's many from the community as well, even like Perl clients. But yeah, it is all open source. |
**Brian Ketelsen:** Yeah, an amazing amount of clients. I looking at the community contributed clients - there's .NET, Arduino, Elixir, Erlang, Haskell, Lua, MicroPython - I've never even heard of MicroPython - PHP, Python, Rust, Scala, Spring, Swift... That's impressive. That is a very broad platform. |
**Erik St. Martin:** \[16:09\] Wow, I'm just looking through this... It's been forever since I've looked through some of the connectors and things like that. There's Fluentd and Prometheus... This is crazy. |
I think it is about time for our first sponsor break, but when we come back, I wanna talk about maybe some of the use cases you've seen NATS used for, which would be really cool. |
**Wally Quevedo:** Okay. |
**Erik St. Martin:** Our first sponsor for today is Backtrace. |
**Break:** \[16:33\] |
**Erik St. Martin:** Alright, so we are back, talking with Wally about NATS. Just before the break I was talking about what are some of the unique -- or maybe not unique, but interesting use cases or large scale that you've seen NATS for... I know often it helps to put into perspective example use cases... |
**Wally Quevedo:** One that's very interesting recently is the work from R.I. Pienaar; he wrote MCollective for [Puppet](https://puppet.com/), and he was initially trying to prototype using the original Ruby client, but it was not thread safe, so basically that's why now we have a different one for Ruby... But he could... |
Also, Clarifai was using NATS Streaming, as well. This is just from the content that has been published recently in the [NATS.io blog](https://nats.io/blog/)... There's a number of entries there. |
**Erik St. Martin:** Now, with just the amount of effort and the large nature of this project, my assumption is that Apcera also heavily uses it for some of their own infrastructure, too. |
**Wally Quevedo:** Yes, of course. The whole Apcera platform is written in Go. There's some C in some places, but NATS is part of the control plane, and we use it for the discovery from the components. So yeah, it's an essential piece of the architecture for the communication as well, and simple use cases like the serv... |
**Erik St. Martin:** So we all end up loving when new Go releases come out, because of the performance improvements. I can only imagine the difference when you guys do a new build... \[laughs\] It's like, "Oh, we can get rid of half our servers now." \[laughter\] |
**Carlisia Thompson:** Can you tell us a bit about alternatives to NATS and what makes NATS a good choice for people? |
**Wally Quevedo:** I would choose NATS when I want to have low-latency communications. That is simple, right? When you care a lot about the simplicity of deployment, maybe having a lower collective overhead for your system, and you care a lot about the performance - that's where I would look for NATS. |
\[20:05\] These types of systems, like the Apcera platforms or Cloud Foundry, where you want to do basic communication and service discovery, I think it fits really well. The control plane use case, yeah. |
**Carlisia Thompson:** And how about systems that don't have so much demand. Is there any disadvantage in using something like NATS as well? For example let's say I need messaging, but I'm not at the level of Cloud Foundry, I'm not that big of a system... Would there be an advantage for me to use NATS, or would that be... |
**Wally Quevedo:** Yeah, that's a very good use case... It's definitely the opposite of overkill. It helps to have a very simple solution for this type of communication. You don't have to have a huge platform to be able to rely on NATS. You just want to be able to have this low overhead solution. I think that fits real... |
**Brian Ketelsen:** The NATS binary itself is tiny, and it uses very little RAM. It's amazing how much performance they're squeaking out of Go. That GopherCon [talk](https://www.youtube.com/watch?v=ylRKac5kSOk) from 2014 is a really good talk to watch. Derek Collison goes through pretty much all of the work that they d... |
**Wally Quevedo:** Yeah, it has been getting faster... Now we're doing demos with like 11 million messages. \[unintelligible 00:22:08.00\] micro benchmarks. For smaller types of payloads it's around 11, 12 million messages per second. |
**Brian Ketelsen:** That's amazing. |
**Wally Quevedo:** Yeah, it's pretty cool. |
**Erik St. Martin:** So speaking of GopherCon talks... You will be speaking at [GopherCon](https://www.gophercon.com/), and I don't think we wanna give away the secret sauce, but do you wanna give some hints or a background of what your talk is gonna be about? |
**Wally Quevedo:** The title of the talk is Writing Network Clients In Go, and the designing and implementation of the NATS client. It was motivating to do this talk, because Go is a very important piece of the success of NATS. It is also the canonical implementation, so I really want to have something that really show... |
**Brian Ketelsen:** It seems like Apcera is very community-oriented. I noticed that they sponsor a lot of meetups and conferences, and the whole team seems to be very active in all of the communities that they participate in. Is that a culture that's deeply embedded in Apcera, or is that just the coincidence of my obse... |
**Wally Quevedo:** No, Apcera has been involved a lot - especially with the Go community - from the beginning. It's part of the culture of Apcera, I would say. We run a couple of the meetups as well for the SF Microservices... So it could have been a coincidence, but I would say that yeah, we're very community-oriented... |
**Brian Ketelsen:** \[24:14\] That's cool. |
**Erik St. Martin:** I totally just lost my place. \[laughter\] |
**Brian Ketelsen:** Well, we had a lot of interesting projects and news come up this week. Do you wanna move on to that, Erik? |
**Erik St. Martin:** Yeah, yeah. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.