SlideShare ist ein Scribd-Unternehmen logo
1 von 79
Downloaden Sie, um offline zu lesen
Simplified Messaging for Microservices with NATS
Waldemar Quevedo /
SF Microservices Meetup / August 2017
@wallyqs
1 . 1
About this talk
What is NATS
Design from NATS
Building systems with NATS
2 . 1
What is NATS?
High Performance Messaging System
Created by
First written in in 2010
Originally built for Cloud Foundry
Rewritten in in 2012
Much better performance
Open Source, MIT License
Derek Collison
Ruby
Go
https://github.com/nats-io
3 . 1
NATS v1.0.0 milestone reached
4 . 1
What is NATS useful for?
Used in production by thousands of users for…
Building Microservices Control Planes
Internal communication among components
Service Discovery
Low Latency Request Response RPC
Fire and Forget PubSub
5 . 1
Acts as an always available dial-tone
6 . 1
Performance
7 . 1
single byte message
Around 10M messages/second
8 . 1
Better benchmarks
From 's awesome blog
(he is now part of the NATS team too )
(2014)
@tyler_treat
http://bravenewgeek.com/dissecting-message-queues/
9 . 1
10 . 1
NATS = Performance +
Simplicity
11 . 1
Design from NATS
Design constrained to keep it as operationally simple and reliable as possible while still
being both performant and scalable.
12 . 1
Simple & Lightweight Design
TCP/IP based
Plain Text protocol with few commands
Easy to use API
Small binary of ~7MB
Little config
Clustering for HA (full mesh topology)
Just fire and forget, no built-in persistence
At-most-once delivery guarantees
13 . 1
NATS Streaming
For at-least-once delivery check (also OSS, MIT License).
It is a layer on top of NATS core which enhances it with message redelivery features and persistence.
NATS Streaming
https://github.com/nats-io/nats-streaming-server
14 . 1
The NATS Protocol
Client -> Server
| PUB | SUB | UNSUB | CONNECT |
Client <- Server
| INFO | MSG | -ERR | +OK |
Client <-> Server
| PING | PONG |
15 . 1
Simple Protocol == Simple Clients
16 . 1
Given the protocol is simple, NATS clients libraries tend to have a very small footprint as
well.
17 . 1
Clients
18 . 1
Go (canonical implementation)
nc, err := nats.Connect()
// ...
nc.Subscribe("hello", func(m *nats.Msg){
fmt.Printf("[Received] %s", m.Data)
})
nc.Publish("hello", []byte("world"))
19 . 1
Ruby (Eventmachine & Pure Ruby)
require 'nats/client'
NATS.start do |nc|
nc.subscribe("hello") do |msg|
puts "[Received] #{msg}"
end
nc.publish("hello", "world")
end
20 . 1
Python (Asyncio)
yield from nc.connect()
@asyncio.coroutine
def handler(msg):
print("[Received] {data}".format(
data=msg.data.decode()))
# Coroutine based subscriber
yield from nc.subscribe("foo", cb=handler)
yield from nc.publish("foo", "bar")
21 . 1
Node.js
var nats = require('nats').connect();
// Simple Publisher
nats.publish('foo', 'Hello World!');
// Simple Subscriber
nats.subscribe('foo', function(msg) {
console.log('[Received] ' + msg);
});
22 . 1
C
natsConnection_Publish(nc,"foo",data,5);
natsConnection_Subscribe(&sub,nc,"foo",onMsg, NULL);
void
onMsg(natsConnection *nc, natsSubscription *sub,
natsMsg *msg, void *closure)
{
printf("[Received] %.*sn",
natsMsg_GetData(msg));
// ...
}
23 . 1
C#
using (ISyncSubscription s = c.SubscribeSync("foo"))
{
for (int i = 0; i < 10; i++)
{
Msg m = s.NextMessage();
System.Console.WriteLine("[Received] " + m);
}
}
24 . 1
Java
// Simple Publisher
nc.publish("foo", "Hello World".getBytes());
// Simple Async Subscriber
nc.subscribe("foo", m -> {
System.out.println("[Received] %sn",
new String(m.getData()));
});
25 . 1
Community contributing as well
C C# Java
Python NGINX Go
Node.js Elixir Ruby
PHP Erlang Rust
Haskell Scala Perl
( italics → community contributed)
26 . 1
Asynchronous IO
Note: Most clients have asynchronous behavior
nc, err := nats.Connect()
// ...
nc.Subscribe("hello", func(m *nats.Msg){
fmt.Printf("[Received] %s", m.Data)
})
for i := 0; i < 1000; i ++ {
nc.Publish("hello", []byte("world"))
}
// No guarantees of having sent the bytes yet!
// They may still just be in the flushing queue.
27 . 1
Asynchronous IO
In order to guarantee that the published messages have been processed by the server, we can do an extra
ping/pong to confirm they were consumed:
Then flush the buffer and wait for PONG from server
nc.Subscribe("hello", func(m *nats.Msg){
fmt.Printf("[Received] %s", m.Data)
})
for i := 0; i < 1000; i ++ {
nc.Publish("hello", []byte("world"))
}
// Do a PING/PONG roundtrip with the server.
nc.Flush()
SUB hello 1rnPUB hello 5rnworldrn..PINGrn
28 . 1
Asynchronous IO
Worst way of measuring NATS performance
nc, _ := nats.Connect(nats.DefaultURL)
msg := []byte("hi")
nc.Subscribe("hello", func(_ *nats.Msg) {})
for i := 0; i < 100000000; i++ {
nc.Publish("hello", msg)
}
29 . 1
30 . 1
The client is a slow consumer since it is not consuming the messages which the server is sending fast
enough.
Whenever the server cannot flush bytes to a client fast enough, it will disconnect the client from the
system as this consuming pace could affect the whole service and rest of the clients.
NATS Server is protecting itself
31 . 1
NATS = Performance +
Simplicity + Resiliency
32 . 1
Also included
Subject routing with wildcards
Authorization
Distribution queue groups for balancing
Cluster mode for high availability
Auto discovery of topology
Secure TLS connections with certificates
/varz monitoring endpoint
used by
Configuration reload (New in v1.0.0)
Send signal to reload settings in conf file
nats-top
33 . 1
Subjects Routing
Wildcards: *
e.g. subscribe to all NATS requests being made on the demo site:
SUB foo.*.bar 90
PUB foo.hello.bar 2
hi
MSG foo.hello.bar 90 2
hi
telnet demo.nats.io 4222
INFO {"auth_required":false,"version":"0.9.4",...}
SUB _INBOX.* 99
MSG _INBOX.ioL1Ws5aZZf5fyeF6sAdjw 99 11
I can help!
34 . 1
Subjects Routing
Full wildcard: >
Subscribe to all subjects and see whole traffic going through the server:
SUB hello.> 90
PUB hello.world.again 2
hi
MSG hello.world.again 90 2
hi
telnet demo.nats.io 4222
INFO {"auth_required":false,"version":"0.9.4",...}
sub > 1
+OK
35 . 1
Subjects Authorization
Clients are not allowed to publish on _SYS for example:
PUB _SYS.foo 2
hi
-ERR 'Permissions Violation for Publish to "_SYS.foo"'
36 . 1
Subjects Authorization
Can customize disallowing pub/sub on certain subjects via server config too:
authorization {
admin = { publish = ">", subscribe = ">" }
requestor = {
publish = ["req.foo", "req.bar"]
subscribe = "_INBOX.*"
}
users = [
{user: alice, password: foo, permissions: $admin}
{user: bob, password: bar, permissions: $requestor}
]
}
37 . 1
Building systems with NATS
38 . 1
Scenario
Service A needs to talk to services B and C
39 . 1
Familiar scenario
Horizontally scaled…
40 . 1
Communicating within a distributed system
Just use HTTP everywhere?
Use some form of point to point RPC?
What about service discovery and load balancing?
What if sub ms latency performance is required?
41 . 1
Communicating through NATS
Using NATS for internal communication
42 . 1
HA with NATS cluster
Avoid SPOF on NATS by assembling a full mesh cluster
43 . 1
HA with NATS cluster
Clients reconnect logic is triggered
44 . 1
HA with NATS cluster
Connecting to a NATS cluster of 2 nodes explicitly
Bonus: Cluster topology can be discovered dynamically too!
srvs := "nats://10.240.0.11:4222,nats://10.240.0.21:4223"
nc, _ := nats.Connect(srvs)
45 . 1
We can start with a single node…
46 . 1
Then have new nodes join the cluster…
47 . 1
As new nodes join, server announces INFO to clients.
48 . 1
Clients auto reconfigure to be aware of new nodes.
49 . 1
Clients auto reconfigure to be aware of new nodes.
50 . 1
Now fully connected!
51 . 1
On failure, clients reconnect to an available node.
52 . 1
We can start with a single node…
53 . 1
Then have new nodes join the cluster…
54 . 1
As new nodes join, server announces INFO to clients.
55 . 1
Clients auto reconfigure to be aware of new nodes.
56 . 1
Clients auto reconfigure to be aware of new nodes.
57 . 1
Now fully connected!
58 . 1
On failure, clients reconnect to an available node.
59 . 1
Communicating using NATS
60 . 1
Heartbeats
For announcing liveness, services could publish heartbeats
61 . 1
Heartbeats → Discovery
Heartbeats can help too for discovering services via wildcard subscriptions.
nc, _ := nats.Connect(nats.DefaultURL)
// SUB service.*.heartbeats 1rn
nc.Subscribe("service.*.heartbeats", func(m *nats.Msg) {
// Heartbeat from service received
})
62 . 1
Distribution Queues
Balance work among nodes randomly
63 . 1
Distribution Queues
Balance work among nodes randomly
64 . 1
Distribution Queues
Balance work among nodes randomly
65 . 1
Distribution Queues
Service A workers subscribe to service.A and create workers distribution queue group for balancing
the work.
nc, _ := nats.Connect(nats.DefaultURL)
// SUB service.A workers 1rn
nc.QueueSubscribe("service.A", "workers",
func(m *nats.Msg) {
nc.Publish(m.Reply, []byte("hi!"))
})
66 . 1
Distribution Queues
Note: NATS does not assume the audience!
67 . 1
Distribution Queues
All interested subscribers receive the message
68 . 1
Lowest latency response
Service A communicating with fastest node from Service B
69 . 1
Lowest latency response
Service A communicating with fastest node from Service B
70 . 1
Lowest latency response
NATS requests were designed exactly for this
nc, _ := nats.Connect(nats.DefaultURL)
ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond)
defer cancel()
msg, err := nc.RequestWithContext(ctx, "service.B", []byte("help"))
if err == nil {
fmt.Println(string(msg.Data))
// => sure!
}
nc, _ := nats.Connect(nats.DefaultURL)
nc.Subscribe("service.B", func(m *nats.Msg) {
nc.Publish(m.Reply, []byte("sure!"))
})
71 . 1
Handling a NATS timeout
Note: Making a request involves establishing a client timeout.
This needs special handling!
ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond)
defer cancel()
_, err := nc.RequestWithContext(ctx, "service.A", []byte("help"))
fmt.Println(err)
// => context deadline exceeded
72 . 1
Handling a NATS timeout
NATS is fire and forget, reason for which a client times out could be many things:
No one was connected at that time
service unavailable
Service is actually still processing the request
service took too long
Service was processing the request but crashed
service error
73 . 1
Confirm availability of service node with request
Each service node could have its own inbox
A request is sent to service.B to get a single response, which will then reply with its own inbox, (no
payload needed).
If there is not a fast reply before client times out, then most likely the service is unavailable for us at that
time.
If there is a response, then use that inbox in a request
SUB _INBOX.123available 90
PUB _INBOX.123available _INBOX.456helpplease...
74 . 1
Wrapping up
75 . 1
NATS is a simple, fast and reliable solution for the internal communication of a distributed system.
It chooses simplicity and reliability over anything else.
76 . 1
NATS Streaming FAQ
Clustering is coming…
77 . 1
NATS Office Hours
Active discussion in the newly launched community meetings.
78 . 1
Questions?
/
Play with the demo site!
telnet demo.nats.io 4222
github.com/nats-io @nats_io
79 . 1

Weitere ähnliche Inhalte

Was ist angesagt?

RethinkConn 2022!
RethinkConn 2022!RethinkConn 2022!
RethinkConn 2022!NATS
 
[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링
[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링
[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링OpenStack Korea Community
 
A New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & ConnectivityA New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & ConnectivityNATS
 
What CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDWhat CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDShapeBlue
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQLI Goo Lee
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2InfraEngineer
 
Workshop de Monitoramento com Zabbix e OCS
Workshop de Monitoramento com Zabbix e OCSWorkshop de Monitoramento com Zabbix e OCS
Workshop de Monitoramento com Zabbix e OCSLinux Solutions
 
Using NATS for Control Flow in Distributed Systems
Using NATS for Control Flow in Distributed SystemsUsing NATS for Control Flow in Distributed Systems
Using NATS for Control Flow in Distributed SystemsNATS
 
Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Murat Mukhtarov
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)충섭 김
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)Altinity Ltd
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance TuningRicardo Santos
 
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...OpenStack Korea Community
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기NeoClova
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewRené Cannaò
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요Jo Hoon
 
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for EveryoneAlexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for EveryoneZabbix
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
Taking advantage of Prometheus relabeling
Taking advantage of Prometheus relabelingTaking advantage of Prometheus relabeling
Taking advantage of Prometheus relabelingJulien Pivotto
 
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...Altinity Ltd
 

Was ist angesagt? (20)

RethinkConn 2022!
RethinkConn 2022!RethinkConn 2022!
RethinkConn 2022!
 
[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링
[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링
[OpenStack Days Korea 2016] Track1 - Monasca를 이용한 Cloud 모니터링
 
A New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & ConnectivityA New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & Connectivity
 
What CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBDWhat CloudStackers Need To Know About LINSTOR/DRBD
What CloudStackers Need To Know About LINSTOR/DRBD
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
[MeetUp][2nd] 오리뎅이의_쿠버네티스_네트워킹_v1.2
 
Workshop de Monitoramento com Zabbix e OCS
Workshop de Monitoramento com Zabbix e OCSWorkshop de Monitoramento com Zabbix e OCS
Workshop de Monitoramento com Zabbix e OCS
 
Using NATS for Control Flow in Distributed Systems
Using NATS for Control Flow in Distributed SystemsUsing NATS for Control Flow in Distributed Systems
Using NATS for Control Flow in Distributed Systems
 
Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
 
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
New features in ProxySQL 2.0 (updated to 2.0.9) by Rene Cannao (ProxySQL)
 
Zabbix Performance Tuning
Zabbix Performance TuningZabbix Performance Tuning
Zabbix Performance Tuning
 
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
[OpenInfra Days Korea 2018] Day 2 - CEPH 운영자를 위한 Object Storage Performance T...
 
Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기Maria db 이중화구성_고민하기
Maria db 이중화구성_고민하기
 
ProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management OverviewProxySQL High Avalability and Configuration Management Overview
ProxySQL High Avalability and Configuration Management Overview
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for EveryoneAlexei Vladishev - Zabbix - Monitoring Solution for Everyone
Alexei Vladishev - Zabbix - Monitoring Solution for Everyone
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Taking advantage of Prometheus relabeling
Taking advantage of Prometheus relabelingTaking advantage of Prometheus relabeling
Taking advantage of Prometheus relabeling
 
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...HTTP Analytics for 6M requests per second using ClickHouse, by  Alexander Boc...
HTTP Analytics for 6M requests per second using ClickHouse, by Alexander Boc...
 

Ähnlich wie Microservices Meetup San Francisco - August 2017 Talk on NATS

NATS + Docker meetup talk Oct - 2016
NATS + Docker meetup talk Oct - 2016NATS + Docker meetup talk Oct - 2016
NATS + Docker meetup talk Oct - 2016wallyqs
 
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmSimple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmApcera
 
Writing Networking Clients in Go - GopherCon 2017 talk
Writing Networking Clients in Go - GopherCon 2017 talkWriting Networking Clients in Go - GopherCon 2017 talk
Writing Networking Clients in Go - GopherCon 2017 talkNATS
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...wallyqs
 
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native EraNATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Erawallyqs
 
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...NATS
 
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native EraNATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native EraAll Things Open
 
The Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATSThe Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATSApcera
 
The Zen of High Performance Messaging with NATS (Strange Loop 2016)
The Zen of High Performance Messaging with NATS (Strange Loop 2016)The Zen of High Performance Messaging with NATS (Strange Loop 2016)
The Zen of High Performance Messaging with NATS (Strange Loop 2016)wallyqs
 
NATS for Rubyists - Tokyo Rubyist Meetup
NATS for Rubyists - Tokyo Rubyist MeetupNATS for Rubyists - Tokyo Rubyist Meetup
NATS for Rubyists - Tokyo Rubyist Meetupwallyqs
 
OSCON: Building Cloud Native Apps with NATS
OSCON:  Building Cloud Native Apps with NATSOSCON:  Building Cloud Native Apps with NATS
OSCON: Building Cloud Native Apps with NATSwallyqs
 
Implementing Domain Events with Kafka
Implementing Domain Events with KafkaImplementing Domain Events with Kafka
Implementing Domain Events with KafkaAndrei Rugina
 
KubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
KubeCon NA 2019 Keynote | NATS - Past, Present, and the FutureKubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
KubeCon NA 2019 Keynote | NATS - Past, Present, and the FutureNATS
 
Gopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSGopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSApcera
 
GopherFest 2017 - Adding Context to NATS
GopherFest 2017 -  Adding Context to NATSGopherFest 2017 -  Adding Context to NATS
GopherFest 2017 - Adding Context to NATSwallyqs
 
GopherFest 2017 talk - Adding Context to NATS
GopherFest 2017 talk - Adding Context to NATSGopherFest 2017 talk - Adding Context to NATS
GopherFest 2017 talk - Adding Context to NATSNATS
 
HA System-First presentation
HA System-First presentationHA System-First presentation
HA System-First presentationAvin Chan
 
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATSKubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATSNATS
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applicationsDing Li
 

Ähnlich wie Microservices Meetup San Francisco - August 2017 Talk on NATS (20)

NATS + Docker meetup talk Oct - 2016
NATS + Docker meetup talk Oct - 2016NATS + Docker meetup talk Oct - 2016
NATS + Docker meetup talk Oct - 2016
 
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and SwarmSimple and Scalable Microservices: Using NATS with Docker Compose and Swarm
Simple and Scalable Microservices: Using NATS with Docker Compose and Swarm
 
Writing Networking Clients in Go - GopherCon 2017 talk
Writing Networking Clients in Go - GopherCon 2017 talkWriting Networking Clients in Go - GopherCon 2017 talk
Writing Networking Clients in Go - GopherCon 2017 talk
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
 
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native EraNATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
NATS: Simple, Secure and Scalable Messaging For the Cloud Native Era
 
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
Simple, Secure, Scalable Messaging for the Cloud Native Era - AllThingsOpen 2...
 
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native EraNATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
NATS: Simple, Secure, and Scalable Messaging for the Cloud Native Era
 
The Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATSThe Zen of High Performance Messaging with NATS
The Zen of High Performance Messaging with NATS
 
The Zen of High Performance Messaging with NATS (Strange Loop 2016)
The Zen of High Performance Messaging with NATS (Strange Loop 2016)The Zen of High Performance Messaging with NATS (Strange Loop 2016)
The Zen of High Performance Messaging with NATS (Strange Loop 2016)
 
NATS for Rubyists - Tokyo Rubyist Meetup
NATS for Rubyists - Tokyo Rubyist MeetupNATS for Rubyists - Tokyo Rubyist Meetup
NATS for Rubyists - Tokyo Rubyist Meetup
 
OSCON: Building Cloud Native Apps with NATS
OSCON:  Building Cloud Native Apps with NATSOSCON:  Building Cloud Native Apps with NATS
OSCON: Building Cloud Native Apps with NATS
 
Implementing Domain Events with Kafka
Implementing Domain Events with KafkaImplementing Domain Events with Kafka
Implementing Domain Events with Kafka
 
mTCP使ってみた
mTCP使ってみたmTCP使ってみた
mTCP使ってみた
 
KubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
KubeCon NA 2019 Keynote | NATS - Past, Present, and the FutureKubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
KubeCon NA 2019 Keynote | NATS - Past, Present, and the Future
 
Gopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATSGopher fest 2017: Adding Context To NATS
Gopher fest 2017: Adding Context To NATS
 
GopherFest 2017 - Adding Context to NATS
GopherFest 2017 -  Adding Context to NATSGopherFest 2017 -  Adding Context to NATS
GopherFest 2017 - Adding Context to NATS
 
GopherFest 2017 talk - Adding Context to NATS
GopherFest 2017 talk - Adding Context to NATSGopherFest 2017 talk - Adding Context to NATS
GopherFest 2017 talk - Adding Context to NATS
 
HA System-First presentation
HA System-First presentationHA System-First presentation
HA System-First presentation
 
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATSKubeCon + CloudNative Con NA 2021 | A New Generation of NATS
KubeCon + CloudNative Con NA 2021 | A New Generation of NATS
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applications
 

Mehr von NATS

NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATSNATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATSNATS
 
NATS Connect Live!
NATS Connect Live!NATS Connect Live!
NATS Connect Live!NATS
 
NATS Connect Live | SwimOS & NATS
NATS Connect Live | SwimOS & NATSNATS Connect Live | SwimOS & NATS
NATS Connect Live | SwimOS & NATSNATS
 
NATS Connect Live | Pub/Sub on the Power Grid
NATS Connect Live | Pub/Sub on the Power GridNATS Connect Live | Pub/Sub on the Power Grid
NATS Connect Live | Pub/Sub on the Power GridNATS
 
NATS Connect Live | Distributed Identity & Authorization
NATS Connect Live | Distributed Identity & AuthorizationNATS Connect Live | Distributed Identity & Authorization
NATS Connect Live | Distributed Identity & AuthorizationNATS
 
NATS Connect Live | NATS as a Service Mesh
NATS Connect Live | NATS as a Service MeshNATS Connect Live | NATS as a Service Mesh
NATS Connect Live | NATS as a Service MeshNATS
 
NATS Connect Live | Resgate
NATS Connect Live | ResgateNATS Connect Live | Resgate
NATS Connect Live | ResgateNATS
 
NATS Connect Live | NATS & Augmented Reality
NATS Connect Live | NATS & Augmented RealityNATS Connect Live | NATS & Augmented Reality
NATS Connect Live | NATS & Augmented RealityNATS
 
OSCON 2019 | Time to Think Different
OSCON 2019 | Time to Think DifferentOSCON 2019 | Time to Think Different
OSCON 2019 | Time to Think DifferentNATS
 
Serverless for the Cloud Native Era with Fission
Serverless for the Cloud Native Era with FissionServerless for the Cloud Native Era with Fission
Serverless for the Cloud Native Era with FissionNATS
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesNATS
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup NATS
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupNATS
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices NATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices NATS
 
Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATSNATS
 
How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the Internet How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the Internet NATS
 
How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine Learning How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine Learning NATS
 

Mehr von NATS (17)

NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATSNATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
NATS Connect Live | Serverless on Kubernetes with OpenFaaS & NATS
 
NATS Connect Live!
NATS Connect Live!NATS Connect Live!
NATS Connect Live!
 
NATS Connect Live | SwimOS & NATS
NATS Connect Live | SwimOS & NATSNATS Connect Live | SwimOS & NATS
NATS Connect Live | SwimOS & NATS
 
NATS Connect Live | Pub/Sub on the Power Grid
NATS Connect Live | Pub/Sub on the Power GridNATS Connect Live | Pub/Sub on the Power Grid
NATS Connect Live | Pub/Sub on the Power Grid
 
NATS Connect Live | Distributed Identity & Authorization
NATS Connect Live | Distributed Identity & AuthorizationNATS Connect Live | Distributed Identity & Authorization
NATS Connect Live | Distributed Identity & Authorization
 
NATS Connect Live | NATS as a Service Mesh
NATS Connect Live | NATS as a Service MeshNATS Connect Live | NATS as a Service Mesh
NATS Connect Live | NATS as a Service Mesh
 
NATS Connect Live | Resgate
NATS Connect Live | ResgateNATS Connect Live | Resgate
NATS Connect Live | Resgate
 
NATS Connect Live | NATS & Augmented Reality
NATS Connect Live | NATS & Augmented RealityNATS Connect Live | NATS & Augmented Reality
NATS Connect Live | NATS & Augmented Reality
 
OSCON 2019 | Time to Think Different
OSCON 2019 | Time to Think DifferentOSCON 2019 | Time to Think Different
OSCON 2019 | Time to Think Different
 
Serverless for the Cloud Native Era with Fission
Serverless for the Cloud Native Era with FissionServerless for the Cloud Native Era with Fission
Serverless for the Cloud Native Era with Fission
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices Architectures
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices NATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices
 
Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATS
 
How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the Internet How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the Internet
 
How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine Learning How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine Learning
 

Kürzlich hochgeladen

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 

Kürzlich hochgeladen (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 

Microservices Meetup San Francisco - August 2017 Talk on NATS

  • 1. Simplified Messaging for Microservices with NATS Waldemar Quevedo / SF Microservices Meetup / August 2017 @wallyqs 1 . 1
  • 2. About this talk What is NATS Design from NATS Building systems with NATS 2 . 1
  • 3. What is NATS? High Performance Messaging System Created by First written in in 2010 Originally built for Cloud Foundry Rewritten in in 2012 Much better performance Open Source, MIT License Derek Collison Ruby Go https://github.com/nats-io 3 . 1
  • 4. NATS v1.0.0 milestone reached 4 . 1
  • 5. What is NATS useful for? Used in production by thousands of users for… Building Microservices Control Planes Internal communication among components Service Discovery Low Latency Request Response RPC Fire and Forget PubSub 5 . 1
  • 6. Acts as an always available dial-tone 6 . 1
  • 8. single byte message Around 10M messages/second 8 . 1
  • 9. Better benchmarks From 's awesome blog (he is now part of the NATS team too ) (2014) @tyler_treat http://bravenewgeek.com/dissecting-message-queues/ 9 . 1
  • 11. NATS = Performance + Simplicity 11 . 1
  • 12. Design from NATS Design constrained to keep it as operationally simple and reliable as possible while still being both performant and scalable. 12 . 1
  • 13. Simple & Lightweight Design TCP/IP based Plain Text protocol with few commands Easy to use API Small binary of ~7MB Little config Clustering for HA (full mesh topology) Just fire and forget, no built-in persistence At-most-once delivery guarantees 13 . 1
  • 14. NATS Streaming For at-least-once delivery check (also OSS, MIT License). It is a layer on top of NATS core which enhances it with message redelivery features and persistence. NATS Streaming https://github.com/nats-io/nats-streaming-server 14 . 1
  • 15. The NATS Protocol Client -> Server | PUB | SUB | UNSUB | CONNECT | Client <- Server | INFO | MSG | -ERR | +OK | Client <-> Server | PING | PONG | 15 . 1
  • 16. Simple Protocol == Simple Clients 16 . 1
  • 17. Given the protocol is simple, NATS clients libraries tend to have a very small footprint as well. 17 . 1
  • 19. Go (canonical implementation) nc, err := nats.Connect() // ... nc.Subscribe("hello", func(m *nats.Msg){ fmt.Printf("[Received] %s", m.Data) }) nc.Publish("hello", []byte("world")) 19 . 1
  • 20. Ruby (Eventmachine & Pure Ruby) require 'nats/client' NATS.start do |nc| nc.subscribe("hello") do |msg| puts "[Received] #{msg}" end nc.publish("hello", "world") end 20 . 1
  • 21. Python (Asyncio) yield from nc.connect() @asyncio.coroutine def handler(msg): print("[Received] {data}".format( data=msg.data.decode())) # Coroutine based subscriber yield from nc.subscribe("foo", cb=handler) yield from nc.publish("foo", "bar") 21 . 1
  • 22. Node.js var nats = require('nats').connect(); // Simple Publisher nats.publish('foo', 'Hello World!'); // Simple Subscriber nats.subscribe('foo', function(msg) { console.log('[Received] ' + msg); }); 22 . 1
  • 23. C natsConnection_Publish(nc,"foo",data,5); natsConnection_Subscribe(&sub,nc,"foo",onMsg, NULL); void onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure) { printf("[Received] %.*sn", natsMsg_GetData(msg)); // ... } 23 . 1
  • 24. C# using (ISyncSubscription s = c.SubscribeSync("foo")) { for (int i = 0; i < 10; i++) { Msg m = s.NextMessage(); System.Console.WriteLine("[Received] " + m); } } 24 . 1
  • 25. Java // Simple Publisher nc.publish("foo", "Hello World".getBytes()); // Simple Async Subscriber nc.subscribe("foo", m -> { System.out.println("[Received] %sn", new String(m.getData())); }); 25 . 1
  • 26. Community contributing as well C C# Java Python NGINX Go Node.js Elixir Ruby PHP Erlang Rust Haskell Scala Perl ( italics → community contributed) 26 . 1
  • 27. Asynchronous IO Note: Most clients have asynchronous behavior nc, err := nats.Connect() // ... nc.Subscribe("hello", func(m *nats.Msg){ fmt.Printf("[Received] %s", m.Data) }) for i := 0; i < 1000; i ++ { nc.Publish("hello", []byte("world")) } // No guarantees of having sent the bytes yet! // They may still just be in the flushing queue. 27 . 1
  • 28. Asynchronous IO In order to guarantee that the published messages have been processed by the server, we can do an extra ping/pong to confirm they were consumed: Then flush the buffer and wait for PONG from server nc.Subscribe("hello", func(m *nats.Msg){ fmt.Printf("[Received] %s", m.Data) }) for i := 0; i < 1000; i ++ { nc.Publish("hello", []byte("world")) } // Do a PING/PONG roundtrip with the server. nc.Flush() SUB hello 1rnPUB hello 5rnworldrn..PINGrn 28 . 1
  • 29. Asynchronous IO Worst way of measuring NATS performance nc, _ := nats.Connect(nats.DefaultURL) msg := []byte("hi") nc.Subscribe("hello", func(_ *nats.Msg) {}) for i := 0; i < 100000000; i++ { nc.Publish("hello", msg) } 29 . 1
  • 31. The client is a slow consumer since it is not consuming the messages which the server is sending fast enough. Whenever the server cannot flush bytes to a client fast enough, it will disconnect the client from the system as this consuming pace could affect the whole service and rest of the clients. NATS Server is protecting itself 31 . 1
  • 32. NATS = Performance + Simplicity + Resiliency 32 . 1
  • 33. Also included Subject routing with wildcards Authorization Distribution queue groups for balancing Cluster mode for high availability Auto discovery of topology Secure TLS connections with certificates /varz monitoring endpoint used by Configuration reload (New in v1.0.0) Send signal to reload settings in conf file nats-top 33 . 1
  • 34. Subjects Routing Wildcards: * e.g. subscribe to all NATS requests being made on the demo site: SUB foo.*.bar 90 PUB foo.hello.bar 2 hi MSG foo.hello.bar 90 2 hi telnet demo.nats.io 4222 INFO {"auth_required":false,"version":"0.9.4",...} SUB _INBOX.* 99 MSG _INBOX.ioL1Ws5aZZf5fyeF6sAdjw 99 11 I can help! 34 . 1
  • 35. Subjects Routing Full wildcard: > Subscribe to all subjects and see whole traffic going through the server: SUB hello.> 90 PUB hello.world.again 2 hi MSG hello.world.again 90 2 hi telnet demo.nats.io 4222 INFO {"auth_required":false,"version":"0.9.4",...} sub > 1 +OK 35 . 1
  • 36. Subjects Authorization Clients are not allowed to publish on _SYS for example: PUB _SYS.foo 2 hi -ERR 'Permissions Violation for Publish to "_SYS.foo"' 36 . 1
  • 37. Subjects Authorization Can customize disallowing pub/sub on certain subjects via server config too: authorization { admin = { publish = ">", subscribe = ">" } requestor = { publish = ["req.foo", "req.bar"] subscribe = "_INBOX.*" } users = [ {user: alice, password: foo, permissions: $admin} {user: bob, password: bar, permissions: $requestor} ] } 37 . 1
  • 38. Building systems with NATS 38 . 1
  • 39. Scenario Service A needs to talk to services B and C 39 . 1
  • 41. Communicating within a distributed system Just use HTTP everywhere? Use some form of point to point RPC? What about service discovery and load balancing? What if sub ms latency performance is required? 41 . 1
  • 42. Communicating through NATS Using NATS for internal communication 42 . 1
  • 43. HA with NATS cluster Avoid SPOF on NATS by assembling a full mesh cluster 43 . 1
  • 44. HA with NATS cluster Clients reconnect logic is triggered 44 . 1
  • 45. HA with NATS cluster Connecting to a NATS cluster of 2 nodes explicitly Bonus: Cluster topology can be discovered dynamically too! srvs := "nats://10.240.0.11:4222,nats://10.240.0.21:4223" nc, _ := nats.Connect(srvs) 45 . 1
  • 46. We can start with a single node… 46 . 1
  • 47. Then have new nodes join the cluster… 47 . 1
  • 48. As new nodes join, server announces INFO to clients. 48 . 1
  • 49. Clients auto reconfigure to be aware of new nodes. 49 . 1
  • 50. Clients auto reconfigure to be aware of new nodes. 50 . 1
  • 52. On failure, clients reconnect to an available node. 52 . 1
  • 53. We can start with a single node… 53 . 1
  • 54. Then have new nodes join the cluster… 54 . 1
  • 55. As new nodes join, server announces INFO to clients. 55 . 1
  • 56. Clients auto reconfigure to be aware of new nodes. 56 . 1
  • 57. Clients auto reconfigure to be aware of new nodes. 57 . 1
  • 59. On failure, clients reconnect to an available node. 59 . 1
  • 61. Heartbeats For announcing liveness, services could publish heartbeats 61 . 1
  • 62. Heartbeats → Discovery Heartbeats can help too for discovering services via wildcard subscriptions. nc, _ := nats.Connect(nats.DefaultURL) // SUB service.*.heartbeats 1rn nc.Subscribe("service.*.heartbeats", func(m *nats.Msg) { // Heartbeat from service received }) 62 . 1
  • 63. Distribution Queues Balance work among nodes randomly 63 . 1
  • 64. Distribution Queues Balance work among nodes randomly 64 . 1
  • 65. Distribution Queues Balance work among nodes randomly 65 . 1
  • 66. Distribution Queues Service A workers subscribe to service.A and create workers distribution queue group for balancing the work. nc, _ := nats.Connect(nats.DefaultURL) // SUB service.A workers 1rn nc.QueueSubscribe("service.A", "workers", func(m *nats.Msg) { nc.Publish(m.Reply, []byte("hi!")) }) 66 . 1
  • 67. Distribution Queues Note: NATS does not assume the audience! 67 . 1
  • 68. Distribution Queues All interested subscribers receive the message 68 . 1
  • 69. Lowest latency response Service A communicating with fastest node from Service B 69 . 1
  • 70. Lowest latency response Service A communicating with fastest node from Service B 70 . 1
  • 71. Lowest latency response NATS requests were designed exactly for this nc, _ := nats.Connect(nats.DefaultURL) ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond) defer cancel() msg, err := nc.RequestWithContext(ctx, "service.B", []byte("help")) if err == nil { fmt.Println(string(msg.Data)) // => sure! } nc, _ := nats.Connect(nats.DefaultURL) nc.Subscribe("service.B", func(m *nats.Msg) { nc.Publish(m.Reply, []byte("sure!")) }) 71 . 1
  • 72. Handling a NATS timeout Note: Making a request involves establishing a client timeout. This needs special handling! ctx, cancel := context.WithTimeout(context.Background(), 250*time.Millisecond) defer cancel() _, err := nc.RequestWithContext(ctx, "service.A", []byte("help")) fmt.Println(err) // => context deadline exceeded 72 . 1
  • 73. Handling a NATS timeout NATS is fire and forget, reason for which a client times out could be many things: No one was connected at that time service unavailable Service is actually still processing the request service took too long Service was processing the request but crashed service error 73 . 1
  • 74. Confirm availability of service node with request Each service node could have its own inbox A request is sent to service.B to get a single response, which will then reply with its own inbox, (no payload needed). If there is not a fast reply before client times out, then most likely the service is unavailable for us at that time. If there is a response, then use that inbox in a request SUB _INBOX.123available 90 PUB _INBOX.123available _INBOX.456helpplease... 74 . 1
  • 76. NATS is a simple, fast and reliable solution for the internal communication of a distributed system. It chooses simplicity and reliability over anything else. 76 . 1
  • 77. NATS Streaming FAQ Clustering is coming… 77 . 1
  • 78. NATS Office Hours Active discussion in the newly launched community meetings. 78 . 1
  • 79. Questions? / Play with the demo site! telnet demo.nats.io 4222 github.com/nats-io @nats_io 79 . 1