SlideShare une entreprise Scribd logo
1  sur  41
Interconnecting containers at
scale with NGINX
@sarahnovotny
#dockercon
Building a great application
is only half the battle,
delivering the application
is the other half.
MORE INFORMATION AT NGINX.COM
Microservices
1)
The good
things
MORE INFORMATION AT NGINX.COM
Microservices + containers
The Microservices Architecture:
Enables continuous delivery,
rapid deployment and elasticity
MORE INFORMATION AT NGINX.COM
The Microservices Architecture:
To scale, you can scale each
service independently
MORE INFORMATION AT NGINX.COM
The Microservices Architecture:
Services can be written in
different languages using
different frameworks
MORE INFORMATION AT NGINX.COM
Making Changes:
Each service can be changed,
tested and built independently
MORE INFORMATION AT NGINX.COM
Making Changes:
Release cycles can be
dramatically shortened
MORE INFORMATION AT NGINX.COM
Deploying Microservices:
To unlock the potential of
microservices you must
embrace containers, cloud and
DevOps
2)
The bad things
The Microservices Architecture:
Services can be written in
different languages using
different frameworks
Making Changes:
Release cycles can be
dramatically shortened
Complexity:
To unlock the potential of
microservices you must
embrace containers, cloud and
DevOps
MORE INFORMATION AT NGINX.COM
Here be dragons
3)
How can
NGINX help?
Performance
is user experience.
Our users are our
community of developers,
devops, sysadmins, cloud
engineers & network
admins
NGINX as your stevedores:
Acts as a HTTP router
inspecting requests and
deciding how each one should
be satisfied
ste·ve·dore
ˈstēvəˌdôr/
noun
noun: stevedore; plural noun: stevedores
a person employed, or a contractor engaged,
at a dock to load and unload cargo from ships.
The Microservices Architecture
The Microservices Architecture
Docker orchestration
many options vying
(and then there’s service
discovery)
2013 --bloody edge
2014 --roll your own
2015 --lots of options
2016 --convergence?
MORE INFORMATION AT NGINX.COM
docker-compose
MORE INFORMATION AT NGINX.COM
This .yml file builds –
Consul for service
discovery
Registrator
tutum/hello-world
Google/golang-hello
& NGINX Plus
MORE INFORMATION AT NGINX.COM
$ sarah@ubuntu:~/service-discovery$ more docker-compose.yml
nginx:
build: ./nginxplus
links:
- consul
ports:
- "9050:80"
- "8080:8080"
consul:
command: -server -bootstrap -advertise 10.0.2.15
image: progrium/consul:latest
ports:
- "8300:8300"
- "8400:8400"
- "8500:8500"
- "8600:53/udp”
MORE INFORMATION AT NGINX.COM
registrator:
command: consul://consul:8500
image: progrium/registrator:latest
links:
- consul
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
service1:
image: tutum/hello-world:latest
environment:
SERVICE_80_NAME: http
SERVICE_NAME: service1
SERVICE_TAGS: production
ports:
- "80"
MORE INFORMATION AT NGINX.COM
service2:
image: google/golang-hello:latest
environment:
SERVICE_80_NAME: http
SERVICE_NAME: service2
SERVICE_TAGS: production
ports:
- "8080"
sarah@ubuntu:~/service-discovery$
MORE INFORMATION AT NGINX.COM
sarah@ubuntu:~/service-discovery$ docker-compose build
consul uses an image, skipping
Building nginx...
Step 0 : FROM ubuntu:14.04
---> 6d4946999d4f
Step 1 : MAINTAINER NGINX Docker Maintainers "docker-maint@nginx.com"
---> Using cache
---> 339d0f20dc6e
…
sarah@ubuntu:~/service-discovery$ docker-compose up -d
Recreating servicediscovery_consul_1...
Recreating servicediscovery_nginx_1...
Recreating servicediscovery_registrator_1...
Recreating servicediscovery_service1_6...
Recreating servicediscovery_service2_1...
sarah@ubuntu:~/service-discovery$
MORE INFORMATION AT NGINX.COM
MORE INFORMATION AT NGINX.COM
MORE INFORMATION AT NGINX.COM
sarah@ubuntu:~/service-discovery/nginxplus$ more nginx.conf
{{range services}} {{$name := .Name}} {{range $tag, $service := service .Name |
byTag}} {{if eq $tag "production"}}
upstream {{$name}} {
zone upstream-{{$name}} 64k;
least_conn;
{{range $service}}server {{.Address}}:{{.Port}} max_fails=3 fail_timeout=60
weight=1 slow_start=60;
{{else}}server 127.0.0.1:65535; # force a 502{{end}}
} {{end}} {{end}} {{end}}
<snip>
MORE INFORMATION AT NGINX.COM
sarah@ubuntu:~/service-discovery$ docker-compose scale service1=5
Creating servicediscovery_service1_2...
Creating servicediscovery_service1_3...
Creating servicediscovery_service1_4...
Creating servicediscovery_service1_5...
Starting servicediscovery_service1_2...
Starting servicediscovery_service1_3...
Starting servicediscovery_service1_4...
Starting servicediscovery_service1_5...
MORE INFORMATION AT NGINX.COM
MORE INFORMATION AT NGINX.COM
The Microservices Architecture
MORE INFORMATION AT NGINX.COM
Visit our kiosk
tomorrow to go
through this
demo
It was based on a blog post for
bellycard by @shanesveller
And built by @fymemon
Thank you
@sarahnovotny
#dockercon

Contenu connexe

Tendances

Tendances (20)

NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best Practices
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to Nginx
 
From pets to cattle - powered by CoreOS, docker, Mesos & nginx
From pets to cattle - powered by CoreOS, docker, Mesos & nginxFrom pets to cattle - powered by CoreOS, docker, Mesos & nginx
From pets to cattle - powered by CoreOS, docker, Mesos & nginx
 
Nginx Essential
Nginx EssentialNginx Essential
Nginx Essential
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
NGINX Ingress Controller for Kubernetes
NGINX Ingress Controller for KubernetesNGINX Ingress Controller for Kubernetes
NGINX Ingress Controller for Kubernetes
 
What's New in NGINX Plus R12?
What's New in NGINX Plus R12? What's New in NGINX Plus R12?
What's New in NGINX Plus R12?
 
NGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX: High Performance Load Balancing
NGINX: High Performance Load Balancing
 
NGINX: Basics and Best Practices EMEA
NGINX: Basics and Best Practices EMEANGINX: Basics and Best Practices EMEA
NGINX: Basics and Best Practices EMEA
 
High Availability Content Caching with NGINX
High Availability Content Caching with NGINXHigh Availability Content Caching with NGINX
High Availability Content Caching with NGINX
 
NGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA BroadcastNGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA Broadcast
 
NGINX ADC: Basics and Best Practices
NGINX ADC: Basics and Best PracticesNGINX ADC: Basics and Best Practices
NGINX ADC: Basics and Best Practices
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0
What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0
What’s New in NGINX Ingress Controller for Kubernetes Release 1.5.0
 
NGINX ADC: Basics and Best Practices – EMEA
NGINX ADC: Basics and Best Practices – EMEANGINX ADC: Basics and Best Practices – EMEA
NGINX ADC: Basics and Best Practices – EMEA
 
The 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference ArchitectureThe 3 Models in the NGINX Microservices Reference Architecture
The 3 Models in the NGINX Microservices Reference Architecture
 
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyNginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
 
Maximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXMaximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINX
 
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference ArchitectureMRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
MRA AMA Part 10: Kubernetes and the Microservices Reference Architecture
 
Delivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINXDelivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINX
 

Similaire à Interconnecting containers at scale #Dockercon

DockerCon SF 2015: Interconnecting Containers at Scale w/ NGINX
DockerCon SF 2015: Interconnecting Containers at Scale w/ NGINXDockerCon SF 2015: Interconnecting Containers at Scale w/ NGINX
DockerCon SF 2015: Interconnecting Containers at Scale w/ NGINX
Docker, Inc.
 

Similaire à Interconnecting containers at scale #Dockercon (20)

DockerCon SF 2015: Interconnecting Containers at Scale w/ NGINX
DockerCon SF 2015: Interconnecting Containers at Scale w/ NGINXDockerCon SF 2015: Interconnecting Containers at Scale w/ NGINX
DockerCon SF 2015: Interconnecting Containers at Scale w/ NGINX
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-IT
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPS
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with Docker
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
 
Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016
 
0507 057 01 98 * Adana Klima Tamir Servisi
0507 057 01 98 * Adana Klima Tamir Servisi0507 057 01 98 * Adana Klima Tamir Servisi
0507 057 01 98 * Adana Klima Tamir Servisi
 
Zero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with KubernetesZero-downtime deployment of Micro-services with Kubernetes
Zero-downtime deployment of Micro-services with Kubernetes
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
 
DCEU 18: Docker Container Networking
DCEU 18: Docker Container NetworkingDCEU 18: Docker Container Networking
DCEU 18: Docker Container Networking
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Connect Everything with NATS - Cloud Expo Europe
Connect Everything with NATS - Cloud Expo EuropeConnect Everything with NATS - Cloud Expo Europe
Connect Everything with NATS - Cloud Expo Europe
 
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
Docker Timisoara: Dockercon19 recap slides, 23 may 2019Docker Timisoara: Dockercon19 recap slides, 23 may 2019
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
 
The Future of Web Application Architectures
The Future of Web Application ArchitecturesThe Future of Web Application Architectures
The Future of Web Application Architectures
 
Docker Platform and Ecosystem
Docker Platform and EcosystemDocker Platform and Ecosystem
Docker Platform and Ecosystem
 
Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
 

Plus de sarahnovotny

Plus de sarahnovotny (13)

NGINX 101 - now with more Docker
NGINX 101 - now with more DockerNGINX 101 - now with more Docker
NGINX 101 - now with more Docker
 
Building a Learning Culture
Building a Learning CultureBuilding a Learning Culture
Building a Learning Culture
 
0 to enterprise
0 to enterprise0 to enterprise
0 to enterprise
 
Lessons Learned and Best Practices for Game Development in the Cloud
Lessons Learned and Best Practices for Game Development in the CloudLessons Learned and Best Practices for Game Development in the Cloud
Lessons Learned and Best Practices for Game Development in the Cloud
 
people hacking: opensource biz etiquette
people hacking: opensource biz etiquettepeople hacking: opensource biz etiquette
people hacking: opensource biz etiquette
 
IRL: How Geeks Undermine Their Presentations & Conversations With Body Language
IRL: How Geeks Undermine Their Presentations & Conversations With Body LanguageIRL: How Geeks Undermine Their Presentations & Conversations With Body Language
IRL: How Geeks Undermine Their Presentations & Conversations With Body Language
 
geek_lifestyle
geek_lifestylegeek_lifestyle
geek_lifestyle
 
all data everywhere
all data everywhereall data everywhere
all data everywhere
 
you know databases, how hard can MySQL be?
you know databases, how hard can MySQL be?you know databases, how hard can MySQL be?
you know databases, how hard can MySQL be?
 
nursing for future transhumanist
nursing for future transhumanistnursing for future transhumanist
nursing for future transhumanist
 
Scaling my sql_in_3d
Scaling my sql_in_3dScaling my sql_in_3d
Scaling my sql_in_3d
 
IGNITE MySQL - Backups Don't Make Me Money
IGNITE MySQL - Backups Don't Make Me MoneyIGNITE MySQL - Backups Don't Make Me Money
IGNITE MySQL - Backups Don't Make Me Money
 
5 things MySql
5 things MySql5 things MySql
5 things MySql
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Interconnecting containers at scale #Dockercon

Notes de l'éditeur

  1. We’ve all heard the hype about microservices and how they make the world a better place for developers
  2. And now, since the services are independent, they can be written in different languages using different frameworks. So you gain the flexibility to choose the right tools for each service.
  3. And another big advantage is that changes can also be made independently. As long as the interfaces don’t change you are free to roll out new versions of a service without having to worry about impacting other services.
  4. The ease of making changes and deploying microservices allows you to dramatically reduce your release cycles and achieve rapid deployment or continuous delivery.
  5. Once you have decided to take advantage of the benefits of a microservices architecture you need to decide how you will deploy the services. It should come as no surprise that with microservices being a very new way of doing things, you will want to look to new tools to deploy them. To take full advantage you will want to embrace containers, cloud and DevOps. The rise of containerization has provided an ideal platform for hosting microservices. Containers are much lighter weight then full virtualization allowing you to achieve a far higher density with the same amount of resources and they are much more DevOps friendly, allowing services to be more easily created and scaled.
  6. But, with these positives come some of the very same facts reframed as negatives.
  7. And now, since the services are independent, they can be written in different languages using different frameworks. So you gain the flexibility to choose the right tools for each service.
  8. The ease of making changes and deploying microservices allows you to dramatically reduce your release cycles and achieve rapid deployment or continuous delivery.
  9. Once you have decided to take advantage of the benefits of a microservices architecture you need to decide how you will deploy the services. It should come as no surprise that with microservices being a very new way of doing things, you will want to look to new tools to deploy them. To take full advantage you will want to embrace containers, cloud and DevOps. The rise of containerization has provided an ideal platform for hosting microservices. Containers are much lighter weight then full virtualization allowing you to achieve a far higher density with the same amount of resources and they are much more DevOps friendly, allowing services to be more easily created and scaled.
  10. But, with these positives come some of the very same facts reframed as negatives.
  11. NGINX Plus can act as an HTTP router. It can handle a large number of incoming requests, inspecting each one and making sure they get to the correct service. And it supports scaling service instances up and down and making sure to only send requests to healthy instances by actively checking the health of each service instance.
  12. In reality, microservices architectures look more like this. Here we show an aggregation layer at the front. This layer takes single service requests and makes multiple service requests, aggregating the responses before returning to the client. This is especially useful for mobile apps. Because of the lower bandwidth and higher latency of mobile device,s bundling multiple requests can have a large impact on performance, but aggregation can also be used for non-mobile applications. Then once the aggregation layer makes its service requests, each service can make requests to other services.
  13. Since the aggregation layer and the services layer can scale independently, you need something to distribute the traffic. And this is where NGINX comes in. It can handle the client requests to the aggregation layer, load balancing them across the available aggregation servers, and then handling the request from the aggregation layer to the services and also the requests from one service to another. In all cases making sure to route traffic to healthy services, using the NGINX Plus health checks. Allowing services to be easily scaled using tools like docker-compose, kubernetes, swarm, NGINX Plus dynamic configuration API,and other automation infrastructures allowing for intelligent routing based on factors such as URL’s, headers, and letting you do A/B testing, etc.
  14. There are many tools vying for a place in the container orchestration ecosystem. Kubernetes, mesos, docker compose, swarm …
  15. There are many tools vying for a place in the container orchestration ecosystem. Kubernetes, mesos, docker compose, swarm …
  16. The big trick in all of the managing complexity is going from one to many