Welcome to Tech Talks! Atlanta, Georgia Roger Cheeks May 2, 2018
Empowers the creators of the new Digital Worlds
4 High Performance Webserver and Reverse Proxy Web Server
5 Flawless Application Delivery for the Modern Web Load Balancer Content Cache Web Server Monitoring & Management Security Controls
NGINX Application Platform 6 A suite of technologies to develop and deliver digital experiences that span from legacy, monolithic apps to modern, microservices apps.
Monolith ● The way we’ve been doing things ● Single codebase ● Long deployment process ○ Testing dependencies ○ Rolling restarts of servers ○ Traffic rerouting
NGINX for Microservices 8 NGINX helps ensure microservices are: • Connected • Served • Authenticated • Secured • Cached • Load Balanced • Scaled
Proxy Model ● Load Balances requests to services ● Analogous to connectivity for a horizontally scaled monolith ● Services are left to communicate with each other ● Acts as an entry point for monolith migration ● Lays the foundation for building a service mesh
Router Mesh ● Standalone NGINX Plus instance which acts as a traffic manager ● Provides service discovery via DNS SRV records ● Load balances to instances of services ● NGINX Plus provides active health checks allowing for circuit breaker functionality
Fabric Model ● NGINX Plus exists as a sidecar within the same container as the service ● NGINX Plus and the app communicate only on localhost ● Instances of NGINX Plus communicate directly with each other ● Incorporates all the features of the Router Mesh and adds persistent SSL connections
Persistent SSL Connections ● An SSL handshake requires as few as seven steps or as many as 10 ● NGINX Plus uses a keepalive mechanism to persist connections between instances ● The number of handshakes is greatly reduced, thereby decreasing overall latency while maintaining encrypted transmission 1 SYN > 2 < SYN/ACK 3 ACK > 4 ClientHello > 5 < ServerHello < Certificate < ServerKeyExchange < ServerHelloDone 6 ClientKeyExchange > ChangeCipherSpec >ClientFinished > 7 < ChangeCipherSpec < ServerFinished
The Migration Path
Benefits of Kubernetes
15 Kubernetes is system for automating deployment, scaling, and management of containerized applications
Kubernetes makes ops easy… • Run anywhere • Rolling updates • Fault Tolerant • Horizontally scalable • Simple Load Balancing • YAML… and more! 16
17 • Limited to layer 4 only load balancing • Round robin only • No security features • No persistence, SNI, or other advanced features • Production Applications need advanced load balancing consider using an Ingress controller so you can bring your own! Built-in simple load balancing
Why use an Ingress?
19 Ingress • Kubernetes resource • Benefits • Externally reachable URLs • Advanced L7 Load Balancing • SSL/TLS • SNI (hostname based routing) • Security features
20 Ingress Example – Basic
21 Ingress Example – URL based routing
22 Ingress Example – Host based routing
23 Ingress Example – SSL offloading
Deploying NGINX Plus as an Ingress Controller
NGINX Plus 25 NGINX Plus • Load balancing w/ SSL/TLS termination • WebSocket and HTTP/2 support • Layer 7 Routing / Modification • Session persistence • JWT authentication • 24/7 support, no additional cost • Advanced Monitoring… and more!
26 NGINX Plus Ingress Controller • Runs in a container • Well designed, fast and efficient golang script under the hood • Community driven codebase • Available for NGINX and NGINX Plus https://github.com/nginxinc/kubernetes-ingress
27 NGINX Plus Ingress Controller
Configuring NGINX Plus without Ingress
29 Data store + template • Register services with a data store (aka etcd or consul) • Template the NGINX configuration and manage NGINX service via CLI (confd or consul template) datastore Services (containers) NGINX Open Source
30 We love APIs! • Services availability is managed by kubernetes and available via API • Orchestration script can be in any language • NGINX Plus upstreams managed dynamically without configuration reload Services (containers) NGINX Plus API Kubernetes API Orchestration (script)
31 Service Discovery ;D • Built in DNS resolver • Control over TTL • Easily Integrates with existing DNS based service discovery tools
32 My demo today… • URL based routing • Hostname based routing • SSL termination at LB • Support for scaling of replicas at LB via dynamic reconfiguration • Available on github within the Ingress Controller repository ../examples/complete-example/
33 Café Simulation • Café themed application • Two services (URL routing) ◦ /Tea ◦ /Coffee
Demo
Get a NGINX Plus developer license now! Link: https://www.nginx.com/developer-license PW: k8sontop18
Roger Cheeks roger.cheeks@nginx.com Thank You! Learn more at nginx.com

Kubernetes and the NGINX Plus Ingress Controller

  • 1.
    Welcome to TechTalks! Atlanta, Georgia Roger Cheeks May 2, 2018
  • 2.
    Empowers the creatorsof the new Digital Worlds
  • 4.
    4 High Performance Webserverand Reverse Proxy Web Server
  • 5.
    5 Flawless Application Deliveryfor the Modern Web Load Balancer Content Cache Web Server Monitoring & Management Security Controls
  • 6.
    NGINX Application Platform 6 A suite of technologiesto develop and deliver digital experiences that span from legacy, monolithic apps to modern, microservices apps.
  • 7.
    Monolith ● The waywe’ve been doing things ● Single codebase ● Long deployment process ○ Testing dependencies ○ Rolling restarts of servers ○ Traffic rerouting
  • 8.
    NGINX for Microservices 8 NGINXhelps ensure microservices are: • Connected • Served • Authenticated • Secured • Cached • Load Balanced • Scaled
  • 9.
    Proxy Model ● LoadBalances requests to services ● Analogous to connectivity for a horizontally scaled monolith ● Services are left to communicate with each other ● Acts as an entry point for monolith migration ● Lays the foundation for building a service mesh
  • 10.
    Router Mesh ● StandaloneNGINX Plus instance which acts as a traffic manager ● Provides service discovery via DNS SRV records ● Load balances to instances of services ● NGINX Plus provides active health checks allowing for circuit breaker functionality
  • 11.
    Fabric Model ● NGINXPlus exists as a sidecar within the same container as the service ● NGINX Plus and the app communicate only on localhost ● Instances of NGINX Plus communicate directly with each other ● Incorporates all the features of the Router Mesh and adds persistent SSL connections
  • 12.
    Persistent SSL Connections ●An SSL handshake requires as few as seven steps or as many as 10 ● NGINX Plus uses a keepalive mechanism to persist connections between instances ● The number of handshakes is greatly reduced, thereby decreasing overall latency while maintaining encrypted transmission 1 SYN > 2 < SYN/ACK 3 ACK > 4 ClientHello > 5 < ServerHello < Certificate < ServerKeyExchange < ServerHelloDone 6 ClientKeyExchange > ChangeCipherSpec >ClientFinished > 7 < ChangeCipherSpec < ServerFinished
  • 13.
  • 14.
  • 15.
    15 Kubernetes is systemfor automating deployment, scaling, and management of containerized applications
  • 16.
    Kubernetes makes opseasy… • Run anywhere • Rolling updates • Fault Tolerant • Horizontally scalable • Simple Load Balancing • YAML… and more! 16
  • 17.
    17 • Limited tolayer 4 only load balancing • Round robin only • No security features • No persistence, SNI, or other advanced features • Production Applications need advanced load balancing consider using an Ingress controller so you can bring your own! Built-in simple load balancing
  • 18.
    Why use anIngress?
  • 19.
    19 Ingress • Kubernetes resource •Benefits • Externally reachable URLs • Advanced L7 Load Balancing • SSL/TLS • SNI (hostname based routing) • Security features
  • 20.
  • 21.
    21 Ingress Example –URL based routing
  • 22.
    22 Ingress Example –Host based routing
  • 23.
    23 Ingress Example –SSL offloading
  • 24.
    Deploying NGINX Plusas an Ingress Controller
  • 25.
    NGINX Plus 25 NGINX Plus •Load balancing w/ SSL/TLS termination • WebSocket and HTTP/2 support • Layer 7 Routing / Modification • Session persistence • JWT authentication • 24/7 support, no additional cost • Advanced Monitoring… and more!
  • 26.
    26 NGINX Plus IngressController • Runs in a container • Well designed, fast and efficient golang script under the hood • Community driven codebase • Available for NGINX and NGINX Plus https://github.com/nginxinc/kubernetes-ingress
  • 27.
  • 28.
    Configuring NGINX Pluswithout Ingress
  • 29.
    29 Data store +template • Register services with a data store (aka etcd or consul) • Template the NGINX configuration and manage NGINX service via CLI (confd or consul template) datastore Services (containers) NGINX Open Source
  • 30.
    30 We love APIs! •Services availability is managed by kubernetes and available via API • Orchestration script can be in any language • NGINX Plus upstreams managed dynamically without configuration reload Services (containers) NGINX Plus API Kubernetes API Orchestration (script)
  • 31.
    31 Service Discovery ;D •Built in DNS resolver • Control over TTL • Easily Integrates with existing DNS based service discovery tools
  • 32.
    32 My demo today… •URL based routing • Hostname based routing • SSL termination at LB • Support for scaling of replicas at LB via dynamic reconfiguration • Available on github within the Ingress Controller repository ../examples/complete-example/
  • 33.
    33 Café Simulation • Caféthemed application • Two services (URL routing) ◦ /Tea ◦ /Coffee
  • 34.
  • 35.
    Get a NGINXPlus developer license now! Link: https://www.nginx.com/developer-license PW: k8sontop18
  • 36.