connecting your apps with docker and nginx

41
Connecting Your Applications with Docker and NGINX

Upload: nginx-inc

Post on 16-Apr-2017

976 views

Category:

Software


1 download

TRANSCRIPT

Connecting Your Applications with Docker and NGINX

April 7, 2016

The way it was . . . and often still is

The Monolithic Architecture:•To scale, you must scale the entire monolith•All services are written in the same language using the same framework•Changing one service means rebuilding, retesting, and redeploying the entire monolith•Multiple changes at once – argh!•Release cycles tend to be long

The Monolithic Architecture

The Monolithic Architecture

The Microservices Architecture:•Enables continuous delivery, rapid deployment, and elasticity•To scale, you can scale each service independently•Services can be written in different languages using different frameworks•Each service can be changed, tested, and built independently•Release cycles can be dramatically shortened

The Microservices Architecture

NGINX Plus•Can cache static and dynamic content•Adds flexibility to your monolithic architecture and helps you bridge to a microservices architecture•Acts as an HTTP router inspecting requests and deciding how each one should be satisfied

more information at nginx.com

Features:•Load Balancing•Application Acceleration•SSL and SPDY termination•Bandwidth Management•Content-based Routing•Request Manipulation•Response Rewriting•Authentication•Web Serving•Video Delivery•Mail Proxy•GeoLocation

NGINX

The Microservices Architecture

NGINX Plus and Microservices:•Fit together naturally and are easily integrated with container environments and DevOps tools•Run inside or outside the microservices environment•Provides a single, stable entry point while containers are deployed and destroyed behind it

Microservices Architecture with NGINX Plus

Docker:A great platform for running microservices in containers

Static website Web frontend User DB Queue Analytics DB

Development VM

QA server Public Cloud Contributor’s laptop

Production ClusterCustomer Data

Center

Docker is a Shipping Container System for Code

Static website

Web frontend

Background workers

User DB

Analytics DB

Queue

Development VM QA Server Single Prod

ServerOnsite Cluster

Public Cloud

Contributor’s laptop

Customer Servers

Docker Eliminates the Matrix from Hell

Results

18

Results

19

• Deploy once a day instead of once a month

• Much shorter time to market

• Resource usage improved too (2x-10x)

• Freedom: move containers around(colo-to-cloud, cloud-to-cloud, cloud-to-colo, ...)

Results

ING Delivers Value to Customers Faster

• Before Docker– 9+ months to deploy to

production– Poorly rated applications– Redundant processes and apps

• After Docker– Ready to deploy in 15 minutes– 1,500 deployments per week– 180 DevOps teams– CD pipeline transformed in 4 mos

20

“Docker gives us more speed and speed for us is a huge measure of our

transformation. 

Getting value to the customers faster, that’s where Docker helps us.”

Henk Kolk, Chief Architect, ING

ING Delivers Value to Customers Faster

BBC News Cuts CI Job Time over 60%

• Before Docker– Long wait times: 30+ min to schedule and 30+ min a single CI job– Jobs run sequentially vs. in parallel, resulting in more waiting if a job failed– Workaround process to address unavailable tooling added days to job

time

•After Docker– Eliminate wait time to schedule– Reduce job time to 10 minutes– More jobs run daily in parallel– Eliminate work around– Standardization with Flexibility

BBC News Cuts CI Job Time over 60%

Deploying Microservices:•To unlock the potential of microservices you must embrace containers (ie Docker), cloud, and DevOps (ie NGINX)•Managing containers becomes non-trivial

Container Orchestration

MORE INFORMATION AT NGINX.COM

https://twitter.com/mhausenblas/status/698159874488844288

MORE INFORMATION AT NGINX.COM

MORE INFORMATION AT NGINX.COM

Scheduling

MORE INFORMATION AT NGINX.COM

Service Discovery

MORE INFORMATION AT NGINX.COM

Container Orchestration Landscape

MORE INFORMATION AT NGINX.COM

Container Orchestration Landscape

Immutable Infrastructure

MORE INFORMATION AT NGINX.COM

Context

Programmable infrastructure is the concept of applying methods and tooling established in software development onto the management of IT infrastructure. This includes but is not limited to: automation, versioning, APIs, immutability and agile techniques.

MORE INFORMATION AT NGINX.COM

Why immutability?

• Iterate faster• Increase human fault tolerance• Simplified operations

MORE INFORMATION AT NGINX.COM

MORE INFORMATION AT NGINX.COM

Tooling

• Provisioning/Host OS• Container Runtime• Load balancing• Logging• Monitoring

MORE INFORMATION AT NGINX.COM

Tooling

• Container orchestration• Networking• Artifact (container image) repositories• Secrets management• Handling stateful services

MORE INFORMATION AT NGINX.COM

http://p24e.io

MORE INFORMATION AT NGINX.COM

https://www.nginx.com/resources/library/docker-networking/

Q&A

Results

39

Blog:

•Refactoring a Monolith into Microservices (#7 in 7-part series)

•Deploying NGINX and NGINX Plus with Docker

•Make your Containers Production-Ready - O’Reilly Ebook

Webinars:

•Building Applications With Microservices and Docker

•NGINX & Docker: Ask Me Anything

•Bringing Kubernetes to the Edge with NGINX Plus

•Scaling Microservices with NGINX, Docker, and Mesos

Resources - NGINX

Conclusion

nginx.com > free trialhttps://mesosphere.com/product/

Cached