16

Powering Microservices & Sockets using Nginx and Kubernetes

Lee Calcote

Yogi Porla

Lee Calcote

clouds, containers, infrastructure,

applications and their management

Free ebook

Preorder Available

Our App

A 1GB jar

Case Study

is an IDE for game developers

 - created by game development studio based in Austin (MaxPlay)

 - creates a real-time, collaborative game development engine

“google docs for game development”

Our Bloat-a-lith

EventBus Handler

Persistence Verticle

Vert.x

SockJS

Analytics

Analytics UI

Hazelcast

GridConnection

Telemetry

Telemetry Analysis

Projects, Streams,

Users, Sessions, Tenants

 

Kafka Producer

Platform Client Producer

Spark, R

GCE Network

Load Balancer

Kafka

Rendering Engines

Platform Publishing Tool

Game Analysis

Single instance

  • App is Reactive

  • Deals with sockets

  • Limited resources

  • Culture / DevOps / Cloud Maturity

  • Support containers and VMs

  • Propagation of huge data sets

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

Shaping Up

Characteristics of Microservices

small, autonomous services that work together.

  • ​how small is small?

 

 

​independent, autonomous service

  • self-contained functional unit

Who has a system that is too big and that you’d like to break down?

Can a small team manage it?

More moving parts increases complexity.

Can you make a change to a service and deploy it by itself without changing anything else?

  • Faster delivery, rolling updates

  • Horizontal scale out on-demand;

    • on an individual service basis

  • Modular architecture

  • Easy integration and deployments

  • Service isolation, resilience and fail-safe recovery

Benefits of Microservices

- a quick review

Democratization of language and technology choice

Kubernetes & Nginx

to the Rescue

Our Microbloat v1

Analytics UI

Authentication

Telemetry

Telemetry Analysis

Spark, R

Kafka

Rendering Engines

Platform Publishing Tool

Game Analysis

Master

etcd

Authorization

Locking

Authorization

Projects

Authorization

Authorization

kube-proxy

kube-proxy

SockJS

Authorization

kube-proxy

Node

Node

Node

kube-api, etc.

Comparing Services

(not shoes)

SSL Termination

Kubernetes 1.3

No

Swarm 1.12

No

Mesos+Marathon

Yes

ELB Classic

Yes

ELB L7

Yes

Beanstalk

Yes (EC2)

IOT

Yes

ECS

Yes (EC2)

Lambda

?

Container Orchestrators

Clouds

AWS

Azure

GCP

Load-Balancer

No

App Gateway

Yes

Container Service

?

Cloud LB (HTTP)

Yes (beta)

Cloud LB (Network)

Yes (beta)

GKE

No

Link

SSL Proxy

SSL Proxy

Websocket Support

Kubernetes 1.3

No

Swarm 1.12

No

Mesos+Marathon

Yes

ELB Classic

Yes

ELB L7

Yes

Beanstalk

Yes

IOT

Yes

ECS

Yes

Lambda

Yes

Container Orchestrators

Clouds

AWS

Azure

GCP

Load-Balancer

No

App Gateway

Yes

Container Service

?

Cloud LB (HTTP)

No

Cloud LB (Network)

Yes

GKE

No

Link

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 with minimal configuration change
     

  • Deeper feature set available as services/team matures

    • use as an ​Application Delivery Controller

  • Platform independence

Microbloat v2

Going deeper with Nginx & Kubernetes

  • Service Discovery with Nginx Plus

    • Need 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

Common Administration

w/Nginx Plus

App

App

App

GSLB & Content Caching w/Nginx Plus

App

App

App

GeoDNS

US Regions

    • Session Persistence and Sticky Routing help in performance of request routing and localized content

    • Content Caching provides faster retrieval of data

    • Performance, reliability and availability

Global Regions

A/B Testing Using Nginx

Requests

App v0.1

 

App v0.2

 

90% of requests go to v0.1

10% of requests go to v0.2

Lee Calcote

clouds, containers, infrastructure,

applications and their management

Questions?