These slides are from the technical webinar on June 14th, 2017. The corresponding video/talk is available on YouTube here: https://youtu.be/47U7LyXYMCk
3. NATS is messaging made for developers who want to spend more time
developing applications than worrying about a messaging system.
High-Performance
Always on and available
Extremely lightweight
Easy to use
At Most Once (NATS) or At Least Once Delivery (NATS Streaming)
Common Messaging Pattern Support
Cloud Native
What is NATS?
4. Created by
Derek Collison
Founder and CEO at Apcera
๏ CTO, Chief Architect at VMware
๏ Architected CloudFoundry
๏ Technical Director at Google
๏ SVP and Chief Architect at TIBCO
Background
Derek has been building Messaging Systems and Solutions
> 20yrs
Highly Experienced Messaging Team
Engaged User Community
5. ๏ Performance
๏ Simplicity
‣ Single binary server
‣ No external dependencies
‣ Text-based protocol! Many client languages!
(http://nats.io/documentation/internals/nats-protocol/)
๏ Availability over anything
๏ Small footprint & embeddable
๏ Just what you need, and none of what you don’t
NATS DNA
6. ๏ IoT Messaging
๏ High Fan-out Messaging
๏ Mobile and Big Data
๏ Microservices transport
๏ Service Discovery
๏ Replacing legacy messaging systems
Some ways NATS is being used by developers
7. NATS Streaming is a data streaming system powered by
NATS
â—Ź At-least-once delivery
â—Ź Rate matching per subscriber
â—Ź Replay by time or seqno offset
â—Ź Last/initial value
â—Ź Durable subscribers
â—Ź Fault Tolerant Configurations
â—Ź Partitioning (scalability)
NATS Streaming
9. ๏ Each server monitored independently
๏ Enable the monitor port through the command line or
configuration file
๏ Poll an endpoint for metrics
‣ http://localhost:8222/varz
‣ http://localhost:8222/connz
‣ http://localhost:8222/subsz
‣ http://localhost:8222/routez
๏ Simplicity allows for building complex tooling
Monitoring NATS Servers
10. ๏ Server monitoring information is JSON formatted
๏ {
"server_id": "50ZxyFovAF9nnJSwlihuKN",
"version": "0.9.6",
"go": "go1.8.1",
"addr": "0.0.0.0",
….
}
NATS Server Monitoring Data
14. NATS with Prometheus and Grafana
Browser Prometheus
Server
NATS
Prometheus
Exporter
NATS
Server
NATS
Prometheus
Exporter
NATS
Server
15. â—Ź Ensure each NATS server is using a monitoring port
â—‹ gnatsd -m 8222
â—Ź Start one instance of the NATS Prometheus exporter for
each NATS server
â—‹ Prometheus recommended configuration
â—‹ Default exporter port is 7777, set via command line
parameter.
â—‹ prometheus-nats-exporter -varz
http://localhost:8222
Step 1: Configure NATS Prometheus Exporter
16. â—Ź The minimal configuration is to simply add targets to
the prometheus configuration file for each NATS
Prometheus Exporter
â—‹ static_configs:
- targets: ['localhost:7777']
â—Ź Additional re-labeling and rules can be setup through
Prometheus
â—Ź Configure Alerting rules and setup Prometheus Alert
Manager
Step 2: Configure Prometheus
17. â—Ź Setup Grafana, add authorization as necessary
â—Ź Setup the Prometheus Data source
Step 3: Configure Grafana
18. â—Ź Import the NATS dashboard
â—‹ Use grafana-nats-dash.json from
nats-io/prometheus-nats-exporter repository
â—‹ Import from Grafana
â– https://grafana.com/dashboards/2279
â—Ź Associate the Prometheus data source with the dashboard
â—Ź Start monitoring! (Default is http://localhost:3000)
Step 3: Configure Grafana - continued
19. NATS with Prometheus and Grafana
https://github.com/nats-io/prometheus-nats-exporter
21. Colin Sullivan
colin@nats.io
Twitter: @ColinSullivan01
Github: ColinSullivan1
Check out NATS at www.nats.io, and see dozens of excellent blog
posts from the development community on www.nats.io/blog
Join the community! http://www.nats.io/community/
Thank You!