20
16 Powering Microservices & Sockets using Nginx and Kubernetes Lee Calcote Yogi Porla http://calcotestudios.com/nginx16

Powering Microservices & Sockets using Nginx and Kubernetes

Embed Size (px)

Citation preview

Page 1: Powering Microservices & Sockets using Nginx and Kubernetes

16

PoweringMicroservices &Sockets usingNginx andKubernetes

Lee CalcoteYogi Porla

http://calcotestudios.com/nginx16

Page 2: Powering Microservices & Sockets using Nginx and Kubernetes

Lee Calcote

linkedin.com/in/leecalcote

@lcalcote

blog.gingergeek.com

[email protected]

clouds, containers, infrastructure,applications and their management

Free ebookPreorderAvailable

Page 3: Powering Microservices & Sockets using Nginx and Kubernetes

Our AppA 1GB jar

Page 4: Powering Microservices & Sockets using Nginx and Kubernetes

Case Studyis an IDE for game developers - created by gamedevelopment studio based inAustin (MaxPlay) - creates a real-time,collaborative gamedevelopment engine

@lcalcote

“google docsfor game

development”

Page 5: Powering Microservices & Sockets using Nginx and Kubernetes

Vert.x

Our Bloat-a-lith

@lcalcote

EventBus Handler

Persistence Verticle

SockJS

Analytics

Analytics UI

HazelcastGridConnection

Telemetry

Telemetry Analysis

Projects, Streams,

Users, Sessions,

Tenants

 

Kafka Producer

Platform Client

Producer

Spark, RGCE NetworkLoad Balancer Kafka

Rendering Engines

Platform Publishing

Tool

Game Analysis

Single instance

Page 6: Powering Microservices & Sockets using Nginx and Kubernetes

App is Reactive

Deals with sockets

Limited resources

Culture / DevOps / Cloud Maturity

Support containers and VMs

Propagation of huge data sets

@lcalcote

The Challenge

On-the-fly intelligent rendering

Distribution of content

Extremely low latency for Reactive services

Blocking vs non-blocking

On-premises telemetry collection and

analytics

Page 7: Powering Microservices & Sockets using Nginx and Kubernetes

Shaping Up

Page 8: Powering Microservices & Sockets using Nginx and Kubernetes

Characteristics ofMicroservices

small, autonomous services that work together.

how small is small?

  

independent, autonomous service

self-contained functional unit

@lcalcote

Who has a system that istoo big and that you’d

like to break down?Can a small team manage it?

More moving partsincreases complexity.

Can you make a change to aservice and deploy it by itself

without changing anything else?

Page 9: Powering Microservices & Sockets using Nginx and Kubernetes

Faster delivery, rolling updatesHorizontal scale out on-demand;

on an individual service basis

Modular architectureEasy integration and deploymentsService isolation, resilience and fail-safe recovery

@lcalcote

Benefits of Microservices- a quick review

Democratization of language and technology choice

Page 10: Powering Microservices & Sockets using Nginx and Kubernetes

Kubernetes & Nginx

to the Rescue

@lcalcote

Page 11: Powering Microservices & Sockets using Nginx and Kubernetes

Our Microbloat v1

@lcalcote

Analytics UI

Authentication

Telemetry

Telemetry Analysis

Spark, R

Kafka

Rendering Engines

Platform Publishing

Tool

Game Analysis

Masteretcd

Authorization

Locking

Authorization

Projects

AuthorizationAuthorization

kube-proxy kube-proxy

SockJS

Authorization

kube-proxy

Node Node

Node

kube-api, etc.

Page 12: Powering Microservices & Sockets using Nginx and Kubernetes

ComparingServices

(not shoes)

Page 15: Powering Microservices & Sockets using Nginx and Kubernetes

Why Nginx

Hybrid needs

On-premises and Google Cloud Platform 

Consistent administration and capabilities

central load balancing and proxy platform 

Support for VM and container-based technologies withminimal configuration change Deeper feature set available as services/team matures

use as an Application Delivery Controller

@lcalcote

Platform independence

Page 16: Powering Microservices & Sockets using Nginx and Kubernetes

Microbloat v2Going deeper with Nginx & Kubernetes

Service Discovery with Nginx PlusNeed for locating service instances instantly without reconfiguring

On-the-fly Reconfiguration API

Work with etcd

As an ingress controller in Kubernetes SSL termination

Path-based rules

Multiple host names

@lcalcote

Page 17: Powering Microservices & Sockets using Nginx and Kubernetes

@lcalcote

Common Administration

w/Nginx Plus

App

App App

Page 18: Powering Microservices & Sockets using Nginx and Kubernetes

GSLB & Content Cachingw/Nginx Plus

@lcalcote

App

App

AppGeoDNS

USRegions

Session Persistence and Sticky Routing help inperformance of request routing and localized contentContent Caching provides faster retrieval of dataPerformance, reliability and availability

GlobalRegions

Page 19: Powering Microservices & Sockets using Nginx and Kubernetes

A/B Testing Using Nginx

@lcalcote

Requests

App v0.1 

App v0.2 

90% of requests go to v0.1

10% of requests go to v0.2

Page 20: Powering Microservices & Sockets using Nginx and Kubernetes

Lee Calcote

linkedin.com/in/leecalcote

@lcalcote

blog.gingergeek.com

[email protected]

clouds, containers, infrastructure,applications and their management

Questions?