SlideShare a Scribd company logo
1 of 36
The Rise of
Microservices:
Containers and
Orchestration
Andrew Morgan (andrew.morgan@mongodb.com)
26th September 2016
Agenda
1. Why Microservices
2. What are Microservices
3. Best practices
4. Containers
5. Orchestration
6. MongoDB & Microservices
7. Business benefits
8. When to use Microservices
9. Use Cases
10.Resources
Microservices - The Attraction
Web
Scale
Speed
Iterate
Agile
ReactIsolate
Maintain
Empower
1990s & Earlier
Monolithic
Cross-Team
Tight Coupling
Small
Change
Huge
Impact
System
Retests
2000s
SOA
Coordination
Looser Coupling
System Retests
2010s
Microservices
Decoupled
Independent Dev
Isolated Impact
Microservices Example
Twitter
IngestGoogle+
Ingest
Snapchat
Ingest
Facebook
Ingest
Feed
merge
Microservices Example
Twitter
Ingest
Snapchat
Ingest
Facebook
Ingest
Feed
merge
Microservices Example
Twitter
Ingest
Snapchat
Ingest
Facebook
Ingest
Feed
merge
Microservices Example
Twitter
IngestWhatsapp
Ingest
Snapchat
Ingest
Facebook
Ingest
Feed
merge
Microservices Example
Twitter
IngestWhatsapp
Ingest
Snapchat
Ingest
Facebook
Ingest
Feed
merge
Snapchat
IngestSnapchat
IngestSnapchat
IngestSnapchat
Ingest
Alternate Microservices Example
Conway’s Law
"Any organization that designs a system will
inevitably produce a design whose structure
is a copy of the organization's
communication structure.”
– Melvin Conway
Development Teams
Containers – Powering Microservices
Real world shipping containers
• Same container efficiently transports goods by
road, rail, and sea
• Contents remain untouched through all those
environments; no repacking needed
• Ubiquitous and standardized
• Simple to use – open, fill, close
• Contents of each container safe from the others
• Know how much space the container consumes
Containers – Powering Microservices
Software containers
• Build an image containing the full application stack
only once
• Spin up many containers from the same image in
multiple environments
– Laptop, data center, cloud
– Development, QA, production, support
• Simple to use & efficient
• Contents of each container isolated from the others
– Storage, memory, namespace
• Constrain resources available to each container
– Storage, memory, CPU, IO
VM VMVM
VMs Containers
Bare Metal
Host Operating System
Hypervisor
Guest OS
Libraries
Apps
Service
Guest OS
Libraries
Apps
Service
Guest OS
Libraries
Apps
Service
Container ContainerContainer
Bare Metal
Host Operating System
Docker Engine
Libraries
Libraries
Apps
Libraries
Apps
Service ServiceService
Docker
The most popular container technology
• Simple to use and has a rich ecosystem
• 100,000+ images available from Docker Hub
– Including mongo hub.docker.com/_/mongo/
– Syncs with GitHub projects
• Define new images built upon base images
• Define interfaces between containers
• LINUX, (and now) Windows, and OS X
• Runs on bare metal, VMs, and cloud. Cloud
providers supply the Docker infrastructure (e.g.
Google Container Engine)
docker run -d mongo
Containers and Microservices
Microservices built by combining multiple
containers
• Build sophisticated services from many small,
focused processes (containers)
– Well defined APIs between components
– Each component can use different libraries,
middleware & programming languages
• Modular, decoupled architecture simplifies
maintenance and enables reuse
• Fault tolerant
• Scalable
Cmglee
Connecting the Microservices –Apache Kafka
Orchestration
Automated deployment, connecting, and
maintenance of multiple containers
• Provision hosts
• Instantiate containers
• Reschedule failed containers
• Link containers through defined interfaces
• Expose services to the outside world
• Scale out and back in
Orchestration – Kubernetes
Created by Google, feature-rich and widely
adopted
• Automated container deployment and ‘replication’
• On-line scale out/in
• Rolling upgrades
• HA – automatic rescheduling of failed containers
• Exposure of network ports to external apps
• Load balancing over groups of containers
providing a service
• Provided as a service by Google Compute Engine
Orchestration – Apache Mesos
Designed to scale to 10,000s of physical
servers; used by Twitter, Airbnb & Apple
• Developer writes code to turn application into a
framework to run on Mesos
• Less feature rich than Kubernetes; considers many
functions such as load balancing, rescheduling,
and scaling to be a higher level function
– Project exists to run Kubernetes as a Mesos
framework
• Foundation for distributed systems
– Apache Aurora, Chronos, Marathon
Choosing an Orchestration Framework
Factors to consider…
• Integration with existing DevOps frameworks?
• Number of hosts?
• Bare metal, VMs, or cloud deployment?
• Automated High Availability?
• Grouping and load balancing?
• Existing skills?
• Install your own orchestration framework or use as
a service?
Security
Containers provide opportunities to improve
security
• Containers provide isolation; resources can only
be accessed from outside through explicitly
provided APIs
• Resources can be rationed
• A container’s role can be very narrow – remove
anything not required
• Images and containers should be kept current;
rolling upgrades with Kubernetes or Aurora
• Typically log into container as root so restrict
access
Orchestrating MongoDB
Orchestrating MongoDB containers requires
special treatment as it’s a distributed,
stateful application…
• State should survive rescheduling; use
Kubernetes’ persistent volumes abstraction
• Replica Set members must communicate with
each other; expose external IP addresses/ports
which survive rescheduling
• Replica Set must be initialized from exactly one
member
• MongoDB must still be monitored and backed up –
MongoDB Cloud Manager
ReplicationControler
name: mongo-rc-europe
labels: [name: mongo-europe]
replicas: 1
selector: [name: mongo -node]
Volume
name:
mongo-persistent-storage
pdName: mongodb-disk-europe
mongodb-
disk-europe
Container
name: mongo-node
image: mongo
command: mongod –replSet my_replica_set
containerPort: 27017
volumeMounts:
name: mongo-persistent-storage
mountPath: /data/db
Pod
labels: [name: mongo-node]
Service: LoadBalancer
name: mongo-svc-europe
labels: [name: mongo-svc-europe]
ports: [port: 27017, targetPort: 27017]]
selector: [name: mongo-node]
ReplicationControler
name: mongo-rc-asia
labels: [name: mongo-asia]
replicas: 1
selector: [name: mongo -node]
Volume
name:
mongo-persistent-storage
pdName: mongodb-disk-asia
mongodb-
disk-asia
Container
name: mongo-node
image: mongo
command: mongod –replSet my_replica_set
containerPort: 27017
volumeMounts:
name: mongo-persistent-storage
mountPath: /data/db
Pod
labels: [name: mongo-node]
Service: LoadBalancer
name: mongo-svc-asia
labels: [name: mongo-svc-asia]
ports: [port: 27017, targetPort: 27017]]
selector: [name: mongo-node]
ReplicationControler
name: mongo-rc-us
labels: [name: mongo-us]
replicas: 1
selector: [name: mongo -node]
Volume
name:
mongo-persistent-storage
pdName: mongodb-disk-us
mongodb-
disk-us
Container
name: mongo-node
image: mongo
command: mongod –replSet my_replica_set
containerPort: 27017
volumeMounts:
name: mongo-persistent-storage
mountPath: /data/db
Pod
labels: [name: mongo-node]
Service: LoadBalancer
name: mongo-svc-us
labels: [name: mongo-svc-us]
ports: [port: 27017, targetPort: 27017]]
selector: [name: mongo-node]
BenefitsCD
Scale
Test
Isolate
Perform
Available
TTM
Org
Cost
When to use Containers & Microservices
Why MongoDB is a good fit for Microservices
Flexible data
model
Redundancy
Monitoring
&
automation
Scalability
Simplicity
MongoDB & Microservices in the Wild
Resources
• Case Study – FuboTV
https://www.mongodb.com/blog/post/leaf-in-the-wild-leading-
soccer-streaming-service-fubotv-scales-its-business-with-
mongodb-docker-containers-and-kubernetes
• Case Study – Square Enix
https://www.mongodb.com/blog/post/leaf-in-the-wild-square-
enix-scales-tomb-raider-hitman-absolution-deus-ex-and-
more-on-mongodb
• “Enabling Microservices – Containers &
Orchestration Explained” white paper
https://www.mongodb.com/collateral/microservices-
containers-and-orchestration-explained
• “Microservices: The Evolution of Building Modern
Applications” white paper
https://www.mongodb.com/collateral/microservices-the-
evolution-of-building-modern-applications
MongoDBEurope2016
Old Billingsgate, London
15th November
mongodb.com/europe
andrewmorgan20 – 20% discount

More Related Content

What's hot

MongoDB Europe 2016 - Deploying MongoDB on NetApp storage
MongoDB Europe 2016 - Deploying MongoDB on NetApp storageMongoDB Europe 2016 - Deploying MongoDB on NetApp storage
MongoDB Europe 2016 - Deploying MongoDB on NetApp storageMongoDB
 
Microservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka EcosystemMicroservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka Ecosystemconfluent
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Lucas Jellema
 
MongoDB Europe 2016 - Ops Manager and Cloud Manager
MongoDB Europe 2016 - Ops Manager and Cloud ManagerMongoDB Europe 2016 - Ops Manager and Cloud Manager
MongoDB Europe 2016 - Ops Manager and Cloud ManagerMongoDB
 
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?MongoDB
 
How We Fixed Our MongoDB Problems
How We Fixed Our MongoDB Problems How We Fixed Our MongoDB Problems
How We Fixed Our MongoDB Problems MongoDB
 
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...Scaling a backend for a big data and blockchain environment by Rafael Ríos at...
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...Big Data Spain
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading StrategiesMongoDB
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Guido Schmutz
 
Bridging Your Business Across the Enterprise and Cloud with MongoDB and NetApp
Bridging Your Business Across the Enterprise and Cloud with MongoDB and NetAppBridging Your Business Across the Enterprise and Cloud with MongoDB and NetApp
Bridging Your Business Across the Enterprise and Cloud with MongoDB and NetAppMongoDB
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingAraf Karsh Hamid
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with DockerMariaDB plc
 
MongoDB Atlas
MongoDB AtlasMongoDB Atlas
MongoDB AtlasMongoDB
 
Webinar: Simplifying the Database Experience with MongoDB Atlas
Webinar: Simplifying the Database Experience with MongoDB AtlasWebinar: Simplifying the Database Experience with MongoDB Atlas
Webinar: Simplifying the Database Experience with MongoDB AtlasMongoDB
 
What's new in MariaDB AX webinar
What's new in MariaDB AX webinarWhat's new in MariaDB AX webinar
What's new in MariaDB AX webinarMariaDB plc
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka EcosystemGuido Schmutz
 
MongoDB Europe 2016 - MongoDB Atlas
MongoDB Europe 2016 - MongoDB AtlasMongoDB Europe 2016 - MongoDB Atlas
MongoDB Europe 2016 - MongoDB AtlasMongoDB
 
Making Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, Confluent
Making Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, ConfluentMaking Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, Confluent
Making Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, ConfluentHostedbyConfluent
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleMariaDB plc
 

What's hot (20)

MongoDB Europe 2016 - Deploying MongoDB on NetApp storage
MongoDB Europe 2016 - Deploying MongoDB on NetApp storageMongoDB Europe 2016 - Deploying MongoDB on NetApp storage
MongoDB Europe 2016 - Deploying MongoDB on NetApp storage
 
Microservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka EcosystemMicroservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka Ecosystem
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 
MongoDB Europe 2016 - Ops Manager and Cloud Manager
MongoDB Europe 2016 - Ops Manager and Cloud ManagerMongoDB Europe 2016 - Ops Manager and Cloud Manager
MongoDB Europe 2016 - Ops Manager and Cloud Manager
 
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
MongoDB Europe 2016 - Star in a Reasonably Priced Car - Which Driver is Best?
 
How We Fixed Our MongoDB Problems
How We Fixed Our MongoDB Problems How We Fixed Our MongoDB Problems
How We Fixed Our MongoDB Problems
 
Novinky v Oracle Database 18c
Novinky v Oracle Database 18cNovinky v Oracle Database 18c
Novinky v Oracle Database 18c
 
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...Scaling a backend for a big data and blockchain environment by Rafael Ríos at...
Scaling a backend for a big data and blockchain environment by Rafael Ríos at...
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading Strategies
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Bridging Your Business Across the Enterprise and Cloud with MongoDB and NetApp
Bridging Your Business Across the Enterprise and Cloud with MongoDB and NetAppBridging Your Business Across the Enterprise and Cloud with MongoDB and NetApp
Bridging Your Business Across the Enterprise and Cloud with MongoDB and NetApp
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
MongoDB Atlas
MongoDB AtlasMongoDB Atlas
MongoDB Atlas
 
Webinar: Simplifying the Database Experience with MongoDB Atlas
Webinar: Simplifying the Database Experience with MongoDB AtlasWebinar: Simplifying the Database Experience with MongoDB Atlas
Webinar: Simplifying the Database Experience with MongoDB Atlas
 
What's new in MariaDB AX webinar
What's new in MariaDB AX webinarWhat's new in MariaDB AX webinar
What's new in MariaDB AX webinar
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
 
MongoDB Europe 2016 - MongoDB Atlas
MongoDB Europe 2016 - MongoDB AtlasMongoDB Europe 2016 - MongoDB Atlas
MongoDB Europe 2016 - MongoDB Atlas
 
Making Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, Confluent
Making Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, ConfluentMaking Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, Confluent
Making Kafka Cloud Native | Jay Kreps, Co-Founder & CEO, Confluent
 
How to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScaleHow to Manage Scale-Out Environments with MariaDB MaxScale
How to Manage Scale-Out Environments with MariaDB MaxScale
 

Similar to The rise of microservices - containers and orchestration

The Rise of Microservices - Containers and Orchestration
The Rise of Microservices - Containers and OrchestrationThe Rise of Microservices - Containers and Orchestration
The Rise of Microservices - Containers and OrchestrationMongoDB
 
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBWebinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBMongoDB
 
Mastering MongoDB on Kubernetes, the power of operators
Mastering MongoDB on Kubernetes, the power of operators Mastering MongoDB on Kubernetes, the power of operators
Mastering MongoDB on Kubernetes, the power of operators DoKC
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectPatrick Chanezon
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBMongoDB
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBMongoDB
 
Microservices: Living Large in Your Castle Made of Sand
Microservices: Living Large in Your Castle Made of SandMicroservices: Living Large in Your Castle Made of Sand
Microservices: Living Large in Your Castle Made of SandMongoDB
 
CMPE282_009994036_PROJECT_REPORT
CMPE282_009994036_PROJECT_REPORTCMPE282_009994036_PROJECT_REPORT
CMPE282_009994036_PROJECT_REPORTSandyarathi Das
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Mario Ishara Fernando
 
Kubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQKubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQRahul Malhotra
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101Vishwas N
 
(SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
 (SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ... (SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
(SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...Priyanka Aash
 
From CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CIFrom CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CIDenis Izmaylov
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesVishal Biyani
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerWeb à Québec
 
Container Shangri-La Attaining the Promise of Container Paradise
Container Shangri-La Attaining the Promise of Container ParadiseContainer Shangri-La Attaining the Promise of Container Paradise
Container Shangri-La Attaining the Promise of Container ParadiseXebiaLabs
 
Netflix and Containers: Not A Stranger Thing
Netflix and Containers:  Not A Stranger ThingNetflix and Containers:  Not A Stranger Thing
Netflix and Containers: Not A Stranger Thingaspyker
 
Netflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger ThingsNetflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger ThingsAll Things Open
 
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 2017Patrick Chanezon
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014Hojoong Kim
 

Similar to The rise of microservices - containers and orchestration (20)

The Rise of Microservices - Containers and Orchestration
The Rise of Microservices - Containers and OrchestrationThe Rise of Microservices - Containers and Orchestration
The Rise of Microservices - Containers and Orchestration
 
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDBWebinar: Enabling Microservices with Containers, Orchestration, and MongoDB
Webinar: Enabling Microservices with Containers, Orchestration, and MongoDB
 
Mastering MongoDB on Kubernetes, the power of operators
Mastering MongoDB on Kubernetes, the power of operators Mastering MongoDB on Kubernetes, the power of operators
Mastering MongoDB on Kubernetes, the power of operators
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
 
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDBPowering Microservices with Docker, Kubernetes, Kafka, & MongoDB
Powering Microservices with Docker, Kubernetes, Kafka, & MongoDB
 
Microservices: Living Large in Your Castle Made of Sand
Microservices: Living Large in Your Castle Made of SandMicroservices: Living Large in Your Castle Made of Sand
Microservices: Living Large in Your Castle Made of Sand
 
CMPE282_009994036_PROJECT_REPORT
CMPE282_009994036_PROJECT_REPORTCMPE282_009994036_PROJECT_REPORT
CMPE282_009994036_PROJECT_REPORT
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
 
Kubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQKubernetes: https://youtu.be/KnjnQj-FvfQ
Kubernetes: https://youtu.be/KnjnQj-FvfQ
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
(SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
 (SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ... (SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
(SACON) Anand Tapikar - Attack vectors of Kubernetes infra. Are we on right ...
 
From CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CIFrom CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CI
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Container Shangri-La Attaining the Promise of Container Paradise
Container Shangri-La Attaining the Promise of Container ParadiseContainer Shangri-La Attaining the Promise of Container Paradise
Container Shangri-La Attaining the Promise of Container Paradise
 
Netflix and Containers: Not A Stranger Thing
Netflix and Containers:  Not A Stranger ThingNetflix and Containers:  Not A Stranger Thing
Netflix and Containers: Not A Stranger Thing
 
Netflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger ThingsNetflix and Containers: Not Stranger Things
Netflix and Containers: Not Stranger Things
 
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
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 

More from Andrew Morgan

PistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for AnalyticsPistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for AnalyticsAndrew Morgan
 
Joins and Other MongoDB 3.2 Aggregation Enhancements
Joins and Other MongoDB 3.2 Aggregation EnhancementsJoins and Other MongoDB 3.2 Aggregation Enhancements
Joins and Other MongoDB 3.2 Aggregation EnhancementsAndrew Morgan
 
Document validation in MongoDB 3.2
Document validation in MongoDB 3.2Document validation in MongoDB 3.2
Document validation in MongoDB 3.2Andrew Morgan
 
What's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsWhat's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsAndrew Morgan
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarAndrew Morgan
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsAndrew Morgan
 
MySQL Replication: What’s New in MySQL 5.7 and Beyond
MySQL Replication: What’s New in MySQL 5.7 and BeyondMySQL Replication: What’s New in MySQL 5.7 and Beyond
MySQL Replication: What’s New in MySQL 5.7 and BeyondAndrew Morgan
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLAndrew Morgan
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsAndrew Morgan
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013Andrew Morgan
 
NoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worldsNoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worldsAndrew Morgan
 
Mysql cluster introduction
Mysql cluster introductionMysql cluster introduction
Mysql cluster introductionAndrew Morgan
 
Developing high-throughput services with no sql ap-is to innodb and mysql clu...
Developing high-throughput services with no sql ap-is to innodb and mysql clu...Developing high-throughput services with no sql ap-is to innodb and mysql clu...
Developing high-throughput services with no sql ap-is to innodb and mysql clu...Andrew Morgan
 

More from Andrew Morgan (13)

PistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for AnalyticsPistonHead's use of MongoDB for Analytics
PistonHead's use of MongoDB for Analytics
 
Joins and Other MongoDB 3.2 Aggregation Enhancements
Joins and Other MongoDB 3.2 Aggregation EnhancementsJoins and Other MongoDB 3.2 Aggregation Enhancements
Joins and Other MongoDB 3.2 Aggregation Enhancements
 
Document validation in MongoDB 3.2
Document validation in MongoDB 3.2Document validation in MongoDB 3.2
Document validation in MongoDB 3.2
 
What's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar chartsWhat's new in MySQL Cluster 7.4 webinar charts
What's new in MySQL Cluster 7.4 webinar charts
 
MySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinarMySQL High Availability Solutions - Feb 2015 webinar
MySQL High Availability Solutions - Feb 2015 webinar
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
 
MySQL Replication: What’s New in MySQL 5.7 and Beyond
MySQL Replication: What’s New in MySQL 5.7 and BeyondMySQL Replication: What’s New in MySQL 5.7 and Beyond
MySQL Replication: What’s New in MySQL 5.7 and Beyond
 
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQLNoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
 
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
NoSQL & SQL - Best of both worlds - BarCamp Berkshire 2013
 
NoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worldsNoSQL and SQL - blending the best of both worlds
NoSQL and SQL - blending the best of both worlds
 
Mysql cluster introduction
Mysql cluster introductionMysql cluster introduction
Mysql cluster introduction
 
Developing high-throughput services with no sql ap-is to innodb and mysql clu...
Developing high-throughput services with no sql ap-is to innodb and mysql clu...Developing high-throughput services with no sql ap-is to innodb and mysql clu...
Developing high-throughput services with no sql ap-is to innodb and mysql clu...
 

Recently uploaded

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 

Recently uploaded (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

The rise of microservices - containers and orchestration

  • 1. The Rise of Microservices: Containers and Orchestration Andrew Morgan (andrew.morgan@mongodb.com) 26th September 2016
  • 2. Agenda 1. Why Microservices 2. What are Microservices 3. Best practices 4. Containers 5. Orchestration 6. MongoDB & Microservices 7. Business benefits 8. When to use Microservices 9. Use Cases 10.Resources
  • 3. Microservices - The Attraction Web Scale Speed Iterate Agile ReactIsolate Maintain Empower
  • 4. 1990s & Earlier Monolithic Cross-Team Tight Coupling Small Change Huge Impact System Retests
  • 13. Conway’s Law "Any organization that designs a system will inevitably produce a design whose structure is a copy of the organization's communication structure.” – Melvin Conway
  • 15. Containers – Powering Microservices Real world shipping containers • Same container efficiently transports goods by road, rail, and sea • Contents remain untouched through all those environments; no repacking needed • Ubiquitous and standardized • Simple to use – open, fill, close • Contents of each container safe from the others • Know how much space the container consumes
  • 16. Containers – Powering Microservices Software containers • Build an image containing the full application stack only once • Spin up many containers from the same image in multiple environments – Laptop, data center, cloud – Development, QA, production, support • Simple to use & efficient • Contents of each container isolated from the others – Storage, memory, namespace • Constrain resources available to each container – Storage, memory, CPU, IO
  • 17. VM VMVM VMs Containers Bare Metal Host Operating System Hypervisor Guest OS Libraries Apps Service Guest OS Libraries Apps Service Guest OS Libraries Apps Service Container ContainerContainer Bare Metal Host Operating System Docker Engine Libraries Libraries Apps Libraries Apps Service ServiceService
  • 18. Docker The most popular container technology • Simple to use and has a rich ecosystem • 100,000+ images available from Docker Hub – Including mongo hub.docker.com/_/mongo/ – Syncs with GitHub projects • Define new images built upon base images • Define interfaces between containers • LINUX, (and now) Windows, and OS X • Runs on bare metal, VMs, and cloud. Cloud providers supply the Docker infrastructure (e.g. Google Container Engine)
  • 19. docker run -d mongo
  • 20.
  • 21.
  • 22. Containers and Microservices Microservices built by combining multiple containers • Build sophisticated services from many small, focused processes (containers) – Well defined APIs between components – Each component can use different libraries, middleware & programming languages • Modular, decoupled architecture simplifies maintenance and enables reuse • Fault tolerant • Scalable Cmglee
  • 23. Connecting the Microservices –Apache Kafka
  • 24. Orchestration Automated deployment, connecting, and maintenance of multiple containers • Provision hosts • Instantiate containers • Reschedule failed containers • Link containers through defined interfaces • Expose services to the outside world • Scale out and back in
  • 25. Orchestration – Kubernetes Created by Google, feature-rich and widely adopted • Automated container deployment and ‘replication’ • On-line scale out/in • Rolling upgrades • HA – automatic rescheduling of failed containers • Exposure of network ports to external apps • Load balancing over groups of containers providing a service • Provided as a service by Google Compute Engine
  • 26. Orchestration – Apache Mesos Designed to scale to 10,000s of physical servers; used by Twitter, Airbnb & Apple • Developer writes code to turn application into a framework to run on Mesos • Less feature rich than Kubernetes; considers many functions such as load balancing, rescheduling, and scaling to be a higher level function – Project exists to run Kubernetes as a Mesos framework • Foundation for distributed systems – Apache Aurora, Chronos, Marathon
  • 27. Choosing an Orchestration Framework Factors to consider… • Integration with existing DevOps frameworks? • Number of hosts? • Bare metal, VMs, or cloud deployment? • Automated High Availability? • Grouping and load balancing? • Existing skills? • Install your own orchestration framework or use as a service?
  • 28. Security Containers provide opportunities to improve security • Containers provide isolation; resources can only be accessed from outside through explicitly provided APIs • Resources can be rationed • A container’s role can be very narrow – remove anything not required • Images and containers should be kept current; rolling upgrades with Kubernetes or Aurora • Typically log into container as root so restrict access
  • 29. Orchestrating MongoDB Orchestrating MongoDB containers requires special treatment as it’s a distributed, stateful application… • State should survive rescheduling; use Kubernetes’ persistent volumes abstraction • Replica Set members must communicate with each other; expose external IP addresses/ports which survive rescheduling • Replica Set must be initialized from exactly one member • MongoDB must still be monitored and backed up – MongoDB Cloud Manager
  • 30. ReplicationControler name: mongo-rc-europe labels: [name: mongo-europe] replicas: 1 selector: [name: mongo -node] Volume name: mongo-persistent-storage pdName: mongodb-disk-europe mongodb- disk-europe Container name: mongo-node image: mongo command: mongod –replSet my_replica_set containerPort: 27017 volumeMounts: name: mongo-persistent-storage mountPath: /data/db Pod labels: [name: mongo-node] Service: LoadBalancer name: mongo-svc-europe labels: [name: mongo-svc-europe] ports: [port: 27017, targetPort: 27017]] selector: [name: mongo-node] ReplicationControler name: mongo-rc-asia labels: [name: mongo-asia] replicas: 1 selector: [name: mongo -node] Volume name: mongo-persistent-storage pdName: mongodb-disk-asia mongodb- disk-asia Container name: mongo-node image: mongo command: mongod –replSet my_replica_set containerPort: 27017 volumeMounts: name: mongo-persistent-storage mountPath: /data/db Pod labels: [name: mongo-node] Service: LoadBalancer name: mongo-svc-asia labels: [name: mongo-svc-asia] ports: [port: 27017, targetPort: 27017]] selector: [name: mongo-node] ReplicationControler name: mongo-rc-us labels: [name: mongo-us] replicas: 1 selector: [name: mongo -node] Volume name: mongo-persistent-storage pdName: mongodb-disk-us mongodb- disk-us Container name: mongo-node image: mongo command: mongod –replSet my_replica_set containerPort: 27017 volumeMounts: name: mongo-persistent-storage mountPath: /data/db Pod labels: [name: mongo-node] Service: LoadBalancer name: mongo-svc-us labels: [name: mongo-svc-us] ports: [port: 27017, targetPort: 27017]] selector: [name: mongo-node]
  • 32. When to use Containers & Microservices
  • 33. Why MongoDB is a good fit for Microservices Flexible data model Redundancy Monitoring & automation Scalability Simplicity
  • 34. MongoDB & Microservices in the Wild
  • 35. Resources • Case Study – FuboTV https://www.mongodb.com/blog/post/leaf-in-the-wild-leading- soccer-streaming-service-fubotv-scales-its-business-with- mongodb-docker-containers-and-kubernetes • Case Study – Square Enix https://www.mongodb.com/blog/post/leaf-in-the-wild-square- enix-scales-tomb-raider-hitman-absolution-deus-ex-and- more-on-mongodb • “Enabling Microservices – Containers & Orchestration Explained” white paper https://www.mongodb.com/collateral/microservices- containers-and-orchestration-explained • “Microservices: The Evolution of Building Modern Applications” white paper https://www.mongodb.com/collateral/microservices-the- evolution-of-building-modern-applications
  • 36. MongoDBEurope2016 Old Billingsgate, London 15th November mongodb.com/europe andrewmorgan20 – 20% discount

Editor's Notes

  1. Microservices were pioneered in the web and then mobile App worlds; at one time called micro-web-services. Now other enterprises are looking for the same benefits. Microservice architectures implement applications as a series of small, self-contained, loosely coupled software components. Each has a specific and well understood role. Benefits of microservices: - Development Speed - Rapid Iteration Evolve quickly, continuous deployment Isolate impact of changes to existing functions or just add a new one Reactive development Maintainable Independent, empowered work teams
  2. Monolith is like Spaghetti Changing anything impacts everything else. <= 1990s Pre-SOA (monolithic) Tight coupling For a monolith to change, all must agree on each change. Each change has unanticipated effects requiring careful testing beforehand
  3. Service Oriented Architecture is like a Pie Easier to remove or change a piece but still need to make sure that it fits back together properly 2000s Traditional SOA Looser coupling Elements in SOA are developed more autonomously but must be coordinated with others to fit into the overall design SOA was billed as a way of delivering code re-use but people ended up designing for efficiency instead.
  4. Microservices are like Cupcakes Can add new ones with different flavors, remove ones that you no longer need, add more pink ones if there’s greater demand Developers can create and activate new microservices without prior coordination with others. Their adherence to MSA principles makes continuous delivery of new or modified services possible Greater modularity, looser coupling. Started in the web and mobile app world, moving to Enterprise. Big in media and startups Plan for flexibility rather than reuse
  5. Each of the ovals represents a microservice. Each source of social media feeds has its own microservice which is specialised in interfacing with the relevant API. Each of those microservices passes messages to the ‘feed merge’ microservice which can then make them available for further microservices to work with. Communication between the microservices is over the network – they can be local to the same machine or distributed. Best practice is for each microservice to be stateless and to have its own database or schema
  6. Individual microservices can be updated in isolation or even removed if their role is no longer needed
  7. When a new role (or even a change to an existing one) appears, best practice is to implement a new microservice rather than extending an existing one.
  8. When a new role (or even a change to an existing one) appears, best practice is to implement a new microservice rather than extending an existing one.
  9. Microservices allow scale-out. Each type of microservice can be scaled independently – add extra instances just for the functions that are being overworked. Multiple instances of each service can provide High Availability
  10. An alternate view is that each microservice is much larger – in this case User Account, Product Catalog, Inventory & Order. The key is to do what makes sense for your enterprise: which pieces need scaling independently, which would you like to upgrade independently, how does it fit into your organisation? Functions are decoupled into four separate services (separate WAR files) and organized by business boundaries Web pages, Classes, Config files to a service are grouped together Services can evolve and iterate independently as each team can develop, test, and deploy code separately Best practice is for each microservice to have its own database.
  11. Melvin Edward Conway is a computer scientist, computer programmer, and hacker who coined what's now known as Conway's Law in 1967. -Organizations design systems which copy the organization -If the parts of the organization do not closely reflect the essential parts of the product, or if the relationship between organizations do not reflect relationship between product parts, than the project will be in trouble -Make sure the organization is compatible with the product architecture
  12. Best practice is for each microservice to be small enough that a single developer should be able to understand its entire codebase (think in hundreds rather than 10,000s of lines of code. The code for a microservice should be owned by the organization responsible for that function; for example the marketing development team should own the microservice responsible for sending nurture track emails. Netflix was one of the pioneers of Micrservices with their ”Cloud Native” approach – it was really all about being able to scale their development organisation.
  13. To do useful work, microservices need a way of communicating – Apache Kafka Kafka provides a flexible, scalable, and reliable method to distribute streams of event data from one or more **producers** to one or more **consumers**. Examples of **events** (or **messages**) include: A periodic sensor reading such as the current temperature A user adding an item to the shopping cart in an online store A Tweet being sent with a specific hashtag A log entry generated for each click in a web application Streams of Kafka events are organized into **topics**. A producer chooses a topic to send a given event to and consumers select which topics they pull events from. For example, a financial application could pull NYSE stock trades from one topic, and company financial announcements from another in order to look for trading opportunities. Kafka actually stores all of the messages that it passes around – this makes it ideal for production microservice deployments A microservice can be upgraded and then catch up on everything it missed Or even apply its updated business logic to the full history of events A new microservice can be added and it can be brought up to speed with everything that’s gone before If one service is generating more work than another can keep up with then Kafka operates as a buffer
  14. [Apache Aurora](http://aurora.apache.org/) – a highly scalable service scheduler for long-running services and `cron` jobs; it's used by Twitter. Aurora extends Mesos by adding rolling updates, service registration, and resource quotas. [Chronos](https://github.com/mesos/chronos) – a fault tolerant service scheduler, to be used as a replacement for `cron`, to orchestrate scheduled jobs within Mesos. [Marathon](https://mesosphere.github.io/marathon/) – a simple to use service scheduler; it builds upon Mesos and Chronos by ensuring that two Chronos instances are running.
  15. Key Message here: Containers were originally assumed to be stateless but there’s now a demand for running DBs in a container. Kubernetes has been adding some features to help (e.g. persistent volumes) Still some gotchas for MongoDB but we have a white paper explaining exactly how to build and deploy a replica set with Docker and Kubernetes
  16. Because we’re using external IP addresses, we can instead create the replica set with nodes in different regions
  17. DevOps & Continuous Delivery Low impact & risk; update one container at a time Replicating environments Instantiate clones for development, QA, production, support… Scalability Add and remove containers based on demand Accurate Testing Confident your stack exactly matches what’s in production Isolation Safely run multiple environments on the same hosts Performance Minimal impact from container overhead High Availability Redundancy from multiple containers fulfilling a role Faster Time to Market Organisational alignment Cost reduction More efficient use of infrastructure
  18. Fast is more important than elegant. Change in the application’s functionality and usage is frequent. Change occurs at different rates within the application, so functional isolation and simple integration are more important than module cohesiveness. Functionality is easily separated into simple, isolatable components. When you have the developer/DevOps skillsets. Where development org boundaries match service boundaries. Don’t forget that you’re building a distributed system -> complexity but there are precedents to read up on. One argument is that you shouldn’t bother with microservices unless you need either: - Scale your team - Design for change Sagrada Familia – designed by Gaudi; construction started on March 19, 1882. Expected to be finished in 2026.
  19. Flexible data model Fits in with the need to be agile Monitoring & automation You have lots of moving parts in a microservice architecture – need to monitor and automate as much as possible Redundancy MongoDB replica sets -> can perform online upgrades and easily cope with rescheduling Scalability MongoDB sharding lets your database scale just as easily as your stateless microservices Remember web-scale? Best practice for each service to have its own schema or database; MongoDB’s simplicity helps
  20. GAP moved their purchase order system from a monolith architecture to microservices. Due to MongoDB’s flexible schema, it took just 75 days to build the new system. When requirements changed and they had to add new types of purchase orders, it took days instead of months. FuboTV is a North American soccer streaming service. Using Microservices with Kubernetes, Docker & MongoDB. Isolation means that they can use a single cluster of machines (in Google Cloud) for dev, QA & production. Very birsty application – scalability lets them handle 100x increases in traffic. Otto – the key was to have an architecture that fits with their organization. Microservices empower loosely couple development teams (business, project management, IT). This is all enabling Fast test & deployment + Iterative, Continuous Delivery Backcountry.com is an online specialty retailer that sells outdoor clothing and gear. The driver to Microservices for them was a growing, distributed development team. As more and more developers joined and made contributions to the code, the schemas became convoluted and harder to maintain; contributing to 20% of the Scrum backlog. Taking advantage of MongoDB’s flexible data model, Backcountry was able to iterate faster, reduce development time, and mitigate technical debt.