SlideShare a Scribd company logo
1 of 22
Download to read offline
Implementing Microservices
with NATS
Agenda
● Microservices
● NATS
● Aytra
● Aytra + NATS
● Houston
Microservices
Microservices
Microservices - What?
● Micro benefits
○ Flexibility
○ Availability
○ Security
● Monolithic benefit
○ speed?
● Micro challenge
○ message passing
Microservices - Why?
● Scale application components independently
● Roll out features or experiments more freely
● Faster iteration
● Be aware of challenges
○ API interfaces
○ Communication
○ Latency
○ Tooling
NATS
NATS
NATS - What?
● The glue for your microservices
● Cloud-native messaging platform
● Highly performant
● Extremely lightweight
● Very flexible
NATS - Why?
● Compared to HTTP
○ Built in service discovery
○ Built in load balancer
○ Simpler & Faster
● Compared to other message queues
○ Simpler to implement and operate
○ Faster
● More complex use cases
○ Message/event persistence
○ At-least-once-delivery
○ Message Replay
Aytra - Application Management Platform
Aytra - Background
● Pivoted from a Cloud Management Platform
● Monolithic Java app
● Now has 20+ microservices written in Golang, Node-js and Java
● Team with < 5 developers
● Container based application
● CI/CD pipeline for microservices
+
Aytra + NATS - Overview
● Different use cases
○ Two services need to exchange data and NATS is replacing HTTP
○ Event driven components
○ Notification
● NATS proxies
○ HTTP
○ WebSocket
○ Third party services
● Strategies
○ Request/Reply with timeout pattern for microservices that need to exchange data
■ Avoid the callback hell
○ NATS streaming for services that only publish data
Aytra + NATS
Aytra + NATS
● Guidelines for subject names
○ Service name
○ Version
○ Resource info
○ Param data
● GET /api/service/v1/resource/{id} -> service.v1.get.resource.*
● Internal subjects
○ service.v1.priv.resource.internal.action
● Queue groups
● Data format
○ JSON
○ ProtoBuf?
Aytra + NATS - Tooling
● Official NATS clients
● NATS exporter for monitor
● HTTP to NATS proxy
● Distributed tracing?
● Houston
Houston
Houston
Houston - Overview
● What?
○ Helper built around the NATS official clients
○ Provide boilerplates to wire microservices together
● Why
○ Abstract the communication framework from the microservices
■ Easier to update
■ Easier to create new microservices
○ Ensure all microservices implement the same messaging pattern
■ Current support for Golang, Java and Nodejs
Houston - Example
func AuthMiddleware(p *Passenger, elem reflect.Value) (*houston.ErrorBody){
return nil
}
func LoggerMiddleware(p *Passenger, elem reflect.Value) (*houston.ErrorBody){
return nil
}
rocket := houston.Rocket{
Route: "service.v1.put.person.*",
Params: houston.Params{{Index: 4, Name: "Id"},},
Group: "service",
Middleware: houston.Middlewares{LoggerMiddleware, AuthMiddleware},
Callback: func(p *person) (*houston.ErrorBody) {
fmt.Printf("Trying to update person with id %dn", p.Id)
return nil
}
}
controlTower.Build(rocket)
● Middleware chaining
● Parameter mapping
● Error handling
● HTTP like data model
Resources
● Houston
○ Golang: https://bitbucket.org/aytra/houston-go
● NATS Streaming
○ http://nats.io/documentation/streaming/nats-streaming-intro/
● NATS-HTTP Proxy
○ https://github.com/sohlich/nats-proxy
● NATS exporter
○ https://github.com/markuslindenberg/nats_exporter
Thank you
Questions?
diogogmt.com
@diogogmt

More Related Content

What's hot

promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...Tokuhiro Matsuno
 
Flink powered stream processing platform at Pinterest
Flink powered stream processing platform at PinterestFlink powered stream processing platform at Pinterest
Flink powered stream processing platform at PinterestFlink Forward
 
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATSDeploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATSNATS
 
NATS Streaming - an alternative to Apache Kafka?
NATS Streaming - an alternative to Apache Kafka?NATS Streaming - an alternative to Apache Kafka?
NATS Streaming - an alternative to Apache Kafka?Anton Zadorozhniy
 
RethinkConn 2022!
RethinkConn 2022!RethinkConn 2022!
RethinkConn 2022!NATS
 
Redis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedRedis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedAllen Terleto
 
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
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaArvind Kumar G.S
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeFlink Forward
 
Combining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityCombining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityElasticsearch
 
Near real-time statistical modeling and anomaly detection using Flink!
Near real-time statistical modeling and anomaly detection using Flink!Near real-time statistical modeling and anomaly detection using Flink!
Near real-time statistical modeling and anomaly detection using Flink!Flink Forward
 
Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlJiangjie Qin
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With PrometheusKnoldus Inc.
 
gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!Alex Borysov
 
Introduction to gRPC
Introduction to gRPCIntroduction to gRPC
Introduction to gRPCPrakash Divy
 
Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...
Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...
Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...confluent
 
Monitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialMonitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialTim Vaillancourt
 

What's hot (20)

promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
 
Flink powered stream processing platform at Pinterest
Flink powered stream processing platform at PinterestFlink powered stream processing platform at Pinterest
Flink powered stream processing platform at Pinterest
 
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATSDeploy Secure and Scalable Services Across Kubernetes Clusters with NATS
Deploy Secure and Scalable Services Across Kubernetes Clusters with NATS
 
NATS Streaming - an alternative to Apache Kafka?
NATS Streaming - an alternative to Apache Kafka?NATS Streaming - an alternative to Apache Kafka?
NATS Streaming - an alternative to Apache Kafka?
 
RethinkConn 2022!
RethinkConn 2022!RethinkConn 2022!
RethinkConn 2022!
 
Redis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns SimplifiedRedis and Kafka - Advanced Microservices Design Patterns Simplified
Redis and Kafka - Advanced Microservices Design Patterns Simplified
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 
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
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Autoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive ModeAutoscaling Flink with Reactive Mode
Autoscaling Flink with Reactive Mode
 
Combining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observabilityCombining logs, metrics, and traces for unified observability
Combining logs, metrics, and traces for unified observability
 
Near real-time statistical modeling and anomaly detection using Flink!
Near real-time statistical modeling and anomaly detection using Flink!Near real-time statistical modeling and anomaly detection using Flink!
Near real-time statistical modeling and anomaly detection using Flink!
 
Introduction to Kafka Cruise Control
Introduction to Kafka Cruise ControlIntroduction to Kafka Cruise Control
Introduction to Kafka Cruise Control
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!gRPC vs REST: let the battle begin!
gRPC vs REST: let the battle begin!
 
Introduction to gRPC
Introduction to gRPCIntroduction to gRPC
Introduction to gRPC
 
Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...
Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...
Eventing Things - A Netflix Original! (Nitin Sharma, Netflix) Kafka Summit SF...
 
Monitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialMonitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_Tutorial
 
Building microservices with grpc
Building microservices with grpcBuilding microservices with grpc
Building microservices with grpc
 
Nginx
NginxNginx
Nginx
 

Viewers also liked

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
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Apcera
 
How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the InternetHow Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the InternetApcera
 
Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSApcera
 
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
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by natsRaul Perez
 
NATS - A new nervous system for distributed cloud platforms
NATS - A new nervous system for distributed cloud platformsNATS - A new nervous system for distributed cloud platforms
NATS - A new nervous system for distributed cloud platformsDerek Collison
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network IssuesApcera
 
The Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, Kafka
The Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, KafkaThe Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, Kafka
The Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, KafkaAll Things Open
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupApcera
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingApcera
 
IT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps BehindIT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps BehindApcera
 
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldPolicy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldApcera
 
Kubernetes, The Day After
Kubernetes, The Day AfterKubernetes, The Day After
Kubernetes, The Day AfterApcera
 
Why Enterprises Are Embracing the Cloud
Why Enterprises Are Embracing the CloudWhy Enterprises Are Embracing the Cloud
Why Enterprises Are Embracing the CloudRandy Shoup
 
High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014Derek Collison
 
An Actor Model in Go
An Actor Model in GoAn Actor Model in Go
An Actor Model in GoWeaveworks
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesApcera
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice ArchitectureRich Lee
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesAngelos Kapsimanis
 

Viewers also liked (20)

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
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
How Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the InternetHow Greta uses NATS to revolutionize data distribution on the Internet
How Greta uses NATS to revolutionize data distribution on the Internet
 
Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATS
 
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
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by nats
 
NATS - A new nervous system for distributed cloud platforms
NATS - A new nervous system for distributed cloud platformsNATS - A new nervous system for distributed cloud platforms
NATS - A new nervous system for distributed cloud platforms
 
Debugging Network Issues
Debugging Network IssuesDebugging Network Issues
Debugging Network Issues
 
The Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, Kafka
The Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, KafkaThe Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, Kafka
The Current Messaging Landscape: RabbitMQ, ZeroMQ, nsq, Kafka
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with Messaging
 
IT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps BehindIT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
IT Modernization Doesn’t Mean You Leave Your Legacy Apps Behind
 
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldPolicy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
 
Kubernetes, The Day After
Kubernetes, The Day AfterKubernetes, The Day After
Kubernetes, The Day After
 
Why Enterprises Are Embracing the Cloud
Why Enterprises Are Embracing the CloudWhy Enterprises Are Embracing the Cloud
Why Enterprises Are Embracing the Cloud
 
High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014High Performance Systems in Go - GopherCon 2014
High Performance Systems in Go - GopherCon 2014
 
An Actor Model in Go
An Actor Model in GoAn Actor Model in Go
An Actor Model in Go
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices Architectures
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Software Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based ArchitecturesSoftware Architectures, Week 3 - Microservice-based Architectures
Software Architectures, Week 3 - Microservice-based Architectures
 

Similar to Implementing Microservices with NATS

NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureMRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureNGINX, Inc.
 
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEANGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEANGINX, Inc.
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for MicroservicesNGINX, Inc.
 
NetflixOSS Meetup S6E1 - Titus & Containers
NetflixOSS Meetup S6E1 - Titus & ContainersNetflixOSS Meetup S6E1 - Titus & Containers
NetflixOSS Meetup S6E1 - Titus & Containersaspyker
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthNicolas Brousse
 
Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)NGINX, Inc.
 
Microservices with NGINX pdf
Microservices with NGINX pdfMicroservices with NGINX pdf
Microservices with NGINX pdfKatherine Bagood
 
Automating using Ansible
Automating using AnsibleAutomating using Ansible
Automating using AnsibleAlok Patra
 
Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2NGINX, Inc.
 
From monolith to microservices
From monolith to microservicesFrom monolith to microservices
From monolith to microservicesTransferWiseSG
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Deepu K Sasidharan
 
Devoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipsterDevoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipsterJulien Dubois
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016aspyker
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Sharma Podila
 
Designing microservices platforms with nats
Designing microservices platforms with natsDesigning microservices platforms with nats
Designing microservices platforms with natsChanaka Fernando
 
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...InfluxData
 

Similar to Implementing Microservices with NATS (20)

NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureMRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
 
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEANGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
NGINX Microservices Reference Architecture: What’s in Store for 2019 – EMEA
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for Microservices
 
Kubernetes + netflix oss
Kubernetes + netflix ossKubernetes + netflix oss
Kubernetes + netflix oss
 
NetflixOSS Meetup S6E1 - Titus & Containers
NetflixOSS Meetup S6E1 - Titus & ContainersNetflixOSS Meetup S6E1 - Titus & Containers
NetflixOSS Meetup S6E1 - Titus & Containers
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)Using an API Gateway for Microservices (APAC Webinar)
Using an API Gateway for Microservices (APAC Webinar)
 
Microservices with NGINX pdf
Microservices with NGINX pdfMicroservices with NGINX pdf
Microservices with NGINX pdf
 
Automating using Ansible
Automating using AnsibleAutomating using Ansible
Automating using Ansible
 
Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2Introducing the Microservices Reference Architecture Version 1.2
Introducing the Microservices Reference Architecture Version 1.2
 
From monolith to microservices
From monolith to microservicesFrom monolith to microservices
From monolith to microservices
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017
 
Devoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipsterDevoxx Belgium 2017 - easy microservices with JHipster
Devoxx Belgium 2017 - easy microservices with JHipster
 
Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016Netflix Container Scheduling and Execution - QCon New York 2016
Netflix Container Scheduling and Execution - QCon New York 2016
 
Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016Scheduling a fuller house - Talk at QCon NY 2016
Scheduling a fuller house - Talk at QCon NY 2016
 
Netty training
Netty trainingNetty training
Netty training
 
Designing microservices platforms with nats
Designing microservices platforms with natsDesigning microservices platforms with nats
Designing microservices platforms with nats
 
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
How Sysbee Manages Infrastructures and Provides Advanced Monitoring by Using ...
 
Netty training
Netty trainingNetty training
Netty training
 

More from Apcera

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
 
How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine LearningHow Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine LearningApcera
 
Modernizing IT in the Platform Era
Modernizing IT in the Platform EraModernizing IT in the Platform Era
Modernizing IT in the Platform EraApcera
 
NATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupNATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupApcera
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupSimple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupApcera
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyApcera
 
Securing the Cloud Native Stack
Securing the Cloud Native StackSecuring the Cloud Native Stack
Securing the Cloud Native StackApcera
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustApcera
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016Apcera
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesIntegration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesApcera
 
NATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsNATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsApcera
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826Apcera
 
Microservices: Notes From The Field
Microservices: Notes From The FieldMicroservices: Notes From The Field
Microservices: Notes From The FieldApcera
 
Docker + App Container = ocp
Docker + App Container = ocpDocker + App Container = ocp
Docker + App Container = ocpApcera
 
Apcera: Agility and Security in Docker Delivery
Apcera: Agility and Security in Docker DeliveryApcera: Agility and Security in Docker Delivery
Apcera: Agility and Security in Docker DeliveryApcera
 
Delivering Policy & Trust to the Hybrid Cloud
Delivering Policy & Trust to the Hybrid CloudDelivering Policy & Trust to the Hybrid Cloud
Delivering Policy & Trust to the Hybrid CloudApcera
 

More from Apcera (16)

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
 
How Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine LearningHow Clarifai uses NATS and Kubernetes for Machine Learning
How Clarifai uses NATS and Kubernetes for Machine Learning
 
Modernizing IT in the Platform Era
Modernizing IT in the Platform EraModernizing IT in the Platform Era
Modernizing IT in the Platform Era
 
NATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupNATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder Meetup
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupSimple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
 
Securing the Cloud Native Stack
Securing the Cloud Native StackSecuring the Cloud Native Stack
Securing the Cloud Native Stack
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and Trust
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesIntegration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices Architectures
 
NATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsNATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed Systems
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826
 
Microservices: Notes From The Field
Microservices: Notes From The FieldMicroservices: Notes From The Field
Microservices: Notes From The Field
 
Docker + App Container = ocp
Docker + App Container = ocpDocker + App Container = ocp
Docker + App Container = ocp
 
Apcera: Agility and Security in Docker Delivery
Apcera: Agility and Security in Docker DeliveryApcera: Agility and Security in Docker Delivery
Apcera: Agility and Security in Docker Delivery
 
Delivering Policy & Trust to the Hybrid Cloud
Delivering Policy & Trust to the Hybrid CloudDelivering Policy & Trust to the Hybrid Cloud
Delivering Policy & Trust to the Hybrid Cloud
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Implementing Microservices with NATS

  • 2. Agenda ● Microservices ● NATS ● Aytra ● Aytra + NATS ● Houston
  • 4. Microservices - What? ● Micro benefits ○ Flexibility ○ Availability ○ Security ● Monolithic benefit ○ speed? ● Micro challenge ○ message passing
  • 5. Microservices - Why? ● Scale application components independently ● Roll out features or experiments more freely ● Faster iteration ● Be aware of challenges ○ API interfaces ○ Communication ○ Latency ○ Tooling
  • 7. NATS - What? ● The glue for your microservices ● Cloud-native messaging platform ● Highly performant ● Extremely lightweight ● Very flexible
  • 8. NATS - Why? ● Compared to HTTP ○ Built in service discovery ○ Built in load balancer ○ Simpler & Faster ● Compared to other message queues ○ Simpler to implement and operate ○ Faster ● More complex use cases ○ Message/event persistence ○ At-least-once-delivery ○ Message Replay
  • 9.
  • 10. Aytra - Application Management Platform
  • 11. Aytra - Background ● Pivoted from a Cloud Management Platform ● Monolithic Java app ● Now has 20+ microservices written in Golang, Node-js and Java ● Team with < 5 developers ● Container based application ● CI/CD pipeline for microservices
  • 12. +
  • 13. Aytra + NATS - Overview
  • 14. ● Different use cases ○ Two services need to exchange data and NATS is replacing HTTP ○ Event driven components ○ Notification ● NATS proxies ○ HTTP ○ WebSocket ○ Third party services ● Strategies ○ Request/Reply with timeout pattern for microservices that need to exchange data ■ Avoid the callback hell ○ NATS streaming for services that only publish data Aytra + NATS
  • 15. Aytra + NATS ● Guidelines for subject names ○ Service name ○ Version ○ Resource info ○ Param data ● GET /api/service/v1/resource/{id} -> service.v1.get.resource.* ● Internal subjects ○ service.v1.priv.resource.internal.action ● Queue groups ● Data format ○ JSON ○ ProtoBuf?
  • 16. Aytra + NATS - Tooling ● Official NATS clients ● NATS exporter for monitor ● HTTP to NATS proxy ● Distributed tracing? ● Houston
  • 18. Houston - Overview ● What? ○ Helper built around the NATS official clients ○ Provide boilerplates to wire microservices together ● Why ○ Abstract the communication framework from the microservices ■ Easier to update ■ Easier to create new microservices ○ Ensure all microservices implement the same messaging pattern ■ Current support for Golang, Java and Nodejs
  • 19. Houston - Example func AuthMiddleware(p *Passenger, elem reflect.Value) (*houston.ErrorBody){ return nil } func LoggerMiddleware(p *Passenger, elem reflect.Value) (*houston.ErrorBody){ return nil } rocket := houston.Rocket{ Route: "service.v1.put.person.*", Params: houston.Params{{Index: 4, Name: "Id"},}, Group: "service", Middleware: houston.Middlewares{LoggerMiddleware, AuthMiddleware}, Callback: func(p *person) (*houston.ErrorBody) { fmt.Printf("Trying to update person with id %dn", p.Id) return nil } } controlTower.Build(rocket) ● Middleware chaining ● Parameter mapping ● Error handling ● HTTP like data model
  • 20. Resources ● Houston ○ Golang: https://bitbucket.org/aytra/houston-go ● NATS Streaming ○ http://nats.io/documentation/streaming/nats-streaming-intro/ ● NATS-HTTP Proxy ○ https://github.com/sohlich/nats-proxy ● NATS exporter ○ https://github.com/markuslindenberg/nats_exporter