the 3 models in the nginx microservices reference architecture

40
Three Models in the NGINX Microservices Reference Architecture February 8, 2017

Upload: nginx-inc

Post on 11-Apr-2017

266 views

Category:

Software


1 download

TRANSCRIPT

Page 1: The 3 Models in the NGINX Microservices Reference Architecture

Three Models in the NGINX Microservices Reference Architecture

February 8, 2017

Page 2: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Who Are We?

Chris StetsonChief Architect

Formerly:- Vice President, Technology, Razorfish- Vice President, West Coast, Huge

Floyd SmithTechnical Marketing Writer

Formerly:- Apple, Alta Vista, Google, and more- Author of multiple books on

technology

Page 3: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Agenda

• NGINX Plus• The Big Shift• The Networking Problem

• Service Discovery• Load Balancing• Secure & Fast Intercommunication

• Architectures• Issues

Page 4: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Who Are You?Job TitlesAnalyst ArchitectCEO, CIO, CTOConsultantcool guyCloud Architect, EngineerDeveloperDevOpsEngineerIT Lead, ManagerSecurity ArchitectSystems AnalystTech Lead

Organization Types

AirlinesComputer technologyConsultancyEcommerceFinanceFreelanceGovernmentHigher educationMobile phonesNetworking technologyPressSaaSTelecoms

Reasons for Attending“Build ms platforms”

“Client proposals”“Compare the three models to our solution”“Create API Gateway”“Developing microservices”“DevOps”“Microservices strategies”“Migrate from F5”“Move from .NET” “Move from Apache”“Moving from monolith”“Playing with microservices”

Page 5: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

NGINX Plus

Page 6: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

About NGINX, Inc.

• Founded in 2011, and NGINX Plus first released in 2013

• VC-backed by enterprise software industry leaders

• Offices in San Francisco, Sunnyvale, Cork, Cambridge, and Moscow

• 1,000+ commercial customers• 100+ employees

Page 7: The 3 Models in the NGINX Microservices Reference Architecture

>300 million

total sitesrunning on NGINX

7Source: Netcraft June 2016 Web Server Survey

Page 8: The 3 Models in the NGINX Microservices Reference Architecture

>50%of the top 100,000busiest websites

8Source: W3Techs Web Technology Survey

Page 9: The 3 Models in the NGINX Microservices Reference Architecture

>40%of sites on AWS

9Source: SumoLogic

Page 10: The 3 Models in the NGINX Microservices Reference Architecture

10

Page 11: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

OPEN SOURCE PLUSFEATURES

REQUEST ROUTING COMPRESSION LOAD BALANCING APP HEALTH MONITORING GUI VISUALIZATION

SSL EMBEDDED SCRIPT LANGUAGE EDGE CACHE MEDIA STREAMING MONITORING ANALYTICS CONFIGURATION RESTFUL API

What’s Inside NGINX Plus?

11

Page 12: The 3 Models in the NGINX Microservices Reference Architecture

Internet

Web ServerServe content from disk

Application GatewayFastCGI, uWSGI, Passenger…

Reverse ProxyCaching, load balancing…

HTTP traffic

Where NGINX Plus Fits

Page 13: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Public/Private/Hybrid CloudBare Metal Containers

13

NGINX Plus Works in All Environments

Page 14: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

NGINX and Microservices

• Two-thirds of surveyed developers using or investigating microservices

• Microservices is #1 topic on our website• Chris Richardson series,

Introduction to Microservices• Chris Stetson series, NGINX MRA• MRA Training• …and much more; contact Sales for free

evaluation

Page 15: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

The Big Shift

Page 16: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Architectural Changes: Monolith to Microservices 1

Page 17: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Architectural Changes: Monolith to Microservices 2

Page 18: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

An Anecdote

Page 19: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

The Tight Loop Problem• REST calls• 1000s of requests• Looped data

Page 20: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Mitigation• Group requests• Cache data• Optimize the network

Page 21: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

NGINX Microservices

Page 22: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Microservices Reference Architecture• Docker containers• Polyglot services• Design incorporates

Twelve-Factor App principles

Page 23: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

The Networking

Problem

Page 24: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Service Discovery• Services needs to know

where other services are• Service registries work in

many different ways• Register and read service

information

Page 25: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Load Balancing

• High-quality load balancing

• Developer configurable

Page 26: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Secure & Fast Communication• Encryption at the

transmission layer is becoming standard

• SSL/TLS communication is slow

• Encryption is CPU-intensive

Page 27: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Solution• Service discovery• Robust load balancing• Fast encryption

Page 28: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Network Architectures

Page 29: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Proxy Model• Inbound traffic is

managed through a reverse proxy/load balancer

• Services are left to themselves to connect to each other…

• …often through round-robin DNS

Page 30: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Proxy Model• Focus on Internet traffic• A shock absorber for your app• Dynamic connectivity

Page 31: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Router Mesh Model• Inbound routing through

reverse proxy• Centralized load

balancing through a separate load-balancing service

• Deis Router works like this

Page 32: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Circuit Breakers• Active health checks• Retry • Caching

Page 33: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Router Mesh• Robust service discovery• Advanced load balancing• Circuit breaker pattern

Page 34: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Interprocess Communication• Routing is done at the

container level• Services connect to each

other as needed• NGINX Plus acts as the

forward and reverse proxy for all requests

Page 35: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Normal Process• DNS service discovery• Relies on round-robin

DNS• Each request creates a

new SSL/TLS connection, which fully implemented requires 9 requests

Page 36: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Detail• NGINX Plus runs in each

container• Application code talks to

NGINX Plus locally• NGINX Plus talks to

NGINX Plus• NGINX Plus queries the

service registry

Page 37: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Circuit Breaker Plus• Active health checks• Retry • Caching

Page 38: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Fabric Model• Robust service discovery• Advanced load balancing• Circuit breaker pattern• Persistent SSL Network

Page 39: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

NGINX and Microservices

• Two-thirds of surveyed developers using or investigating microservices

• Microservices is #1 topic on our website• Chris Richardson series,

Introduction to Microservices• Chris Stetson series, NGINX MRA• MRA Training• …and much more; contact Sales for free

evaluation

Page 40: The 3 Models in the NGINX Microservices Reference Architecture

MORE INFORMATION AT NGINX.COM

Questions