Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Load Balancing Apps in Docker Swarm with NGINX

On-demand webinar recording: http://bit.ly/2mRjk2g

Docker and other container technologies continue to gain in popularity. We recently surveyed the broad community of NGINX and NGINX Plus users and found that two-thirds of organizations are either investigating containers, using them in development, or using them in production. Why? Because abstracting your applications from the underlying infrastructure makes developing, distributing, and running software simpler, faster, and more robust than ever before.

But when you move from running your app in a development environment to deploying containers in production, you face new challenges – such as how to effectively run and scale an application across multiple hosts with the performance and uptime that your customers demand.

The latest Docker release, 1.12, supports multihost container orchestration, which simplifies deployment and management of containers across a cluster of Docker hosts. In a complex environment like this, load balancing plays an essential part in delivering your container-based application with reliability and high performance.

Join us in this webinar to learn:
* The basic built-in load balancing options available in Docker Swarm Mode
* The pros and cons of moving to an advanced load balancer like NGINX
* How to integrate NGINX and NGINX Plus with Swarm Mode to provide an advanced load-balancing solution for a cluster with orchestration
* How to scale your Docker-based application with Swarm Mode and NGINX Plus

  • Be the first to comment

Load Balancing Apps in Docker Swarm with NGINX

  1. 1. Load Balancing Apps in Docker Swarm with NGINX August 3, 2016
  2. 2. Rick Nelson Head of Pre-sales at NGINX, Inc. Formerly: - Riverbed, Zeus, VMware, BEA and more Michael Pleshakov Platform Integration Engineer at NGINX, Inc.
  3. 3. What’s New With Docker? Docker Version 1.12
  4. 4. Docker Swarm • A clustering and scheduling tool for containers • Easily spreads containers across a cluster of Docker hosts
  5. 5. Swarm Mode Combines Docker hosts into a swarm: • Fault tolerant • Self healing • Decentralized
  6. 6. Additional Features • Easier Swarm cluster setup • Cryptographic node identity • Every node identified by a key • SSL/TLS between nodes
  7. 7. Additional Features • Service API • Scaling • Rolling updates • Health checks
  8. 8. Networking and Load Balancing • Cluster-wide overlay network • DNS-based service discovery • Built-in load balancing
  9. 9. Docker Swarm Architecture
  10. 10. Docker Swarm – Networking
  11. 11. Docker Swarm – Built-In Load Balancing
  12. 12. 12 Swarm Demo
  13. 13. Why Another Load Balancer? • SSL termination • Content-based routing • Access control and authorization • Rewrites and redirects
  14. 14. NGINX F/OSS Adds • SSL termination • Content-based routing • Access control and auth • Rewrites and redirects • Advanced LB algorithms • Multiprotocol support • Advanced logging • Limits • Scripting • Security
  15. 15. Docker Swarm – NGINX F/OSS External Client Requests
  16. 16. 16 NGINX F/OSS Swarm Demo
  17. 17. NGINX Plus The supported commercial version of NGINX
  18. 18. NGINX Plus Based on NGINX F/OSS
  19. 19. NGINX Plus Adds enterprise-grade load balancing features
  20. 20. NGINX Plus An application delivery controller (ADC)
  21. 21. OPEN SOURCE PLUS FEATURES REQUEST ROUTING COMPRESSION LOAD BALANCING APP HEALTH MONITORING EDGE CACHE MEDIA STREAMING MONITORING ANALYTICS What’s Inside NGINX Plus? GUI VISUALIZATION CONFIGURATION RESTFUL APISSL EMBEDDED SCRIPT LANGUAGE
  22. 22. What’s Been Added in NGINX Plus? • Active health checks
  23. 23. NGINX Plus – Active Health Checks Sophisticated, app-specific health checks Detect application failures, orchestrate upgrades Internet Server 1 is failing Servers 2 and 3 are active
  24. 24. What’s Been Added in NGINX Plus? • Session persistence
  25. 25. NGINX Plus – Session Persistence - Draining Internet Server 1 is draining Sessions (orange) against server 1 are allowed to complete. New sessions are directed to servers 2 and 3 Servers 2 and 3 are active
  26. 26. What’s Been Added in NGINX Plus? • Dynamic reconfiguration
  27. 27. NGINX Plus – Dynamic Reconfiguration http { resolver 192.168.0.2; upstream backends1 { zone backends1 64k; server api.u.com resolve; } upstream backends2 { zone backends2 64k; server 192.168.100.10; server 192.168.100.11; } server { . . . location /upstream_conf { upstream_conf; } . . . } } DNS Changes in DNS can dynamically update NGINX Plus’ load-balancing configuration API Upstream_conf API is a simple HTTP API to control configuration
  28. 28. What’s Been Added in NGINX Plus? • Live activity monitoring
  29. 29. NGINX Plus – Live Activity Monitoring
  30. 30. Docker Swarm – NGINX F/OSS External Client Requests
  31. 31. Docker Swarm – NGINX Plus External Client Requests
  32. 32. 32 NGINX Plus Swarm Demo Part 1
  33. 33. NGINX Plus Swarm Mode Demo
  34. 34. 34 NGINX Plus Swarm Demo Part 2
  35. 35. Load-Balancing Models There are different options for deploying a load balancer in a microservices environment
  36. 36. • 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
  37. 37. Docker Swarm – NGINX F/OSS External Client Requests
  38. 38. Docker Swarm – NGINX F/OSS Internal Service-to-Service Requests
  39. 39. • Router Mesh Model • Inbound routing through reverse proxy • Centralized load balancing through a separate load-balancing service • Marathon LB and Deis Router work like this
  40. 40. • Fabric Model • 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 • NGINX Plus caches SSL sessions
  41. 41. Summary The new orchestration features in Docker v1.12 are powerful
  42. 42. Summary Open source NGINX provides a more advanced load balancing solution
  43. 43. Summary NGINX Plus brings enterprise grade load balancing
  44. 44. Q & A
  45. 45. 1. Docker Swarm 2. NGINX Plus and Docker 3. DNS Service Discovery with NGINX 4. The Fabric Model Resources

×