A short presentation describing microservices and their value as well as how to implement a microservices architecture with Docker containers. The presentation includes a review of the new open-source Amalgam8 polygot microservices framework.
Cloud-Native Applications with Microservices and Containers
1. Daniel Berg・ danberg@us.ibm.com ・ @dancberg
IBM Distinguished Engineer, Cloud Platform
June 2016
Cloud-Native Applications
Microservices implemented with Containers
2. IBM Confidential
An engineering approach focused on
decomposing an application into single-function
modules with well defined interfaces which are
independently deployed and operated by a small
team who owns the entire lifecycle of the
service.
Microservices accelerate delivery by minimizing
communication and coordination between
people while reducing the scope and risk of
change.
Microservices
Jason McGee, IBM Fellow and VP, CTO Cloud Platform
5. Evolution to a Microservices Architecture
Platform-enabled Microservices
Services
Tier
Cloud
Service
Cloud
Service
Cloud
Services
Edge Proxy
Application selection Version & Instance selection Admission Control
Service
Discovery
Active
Deploy
Build
Service
Repository
Container Service
Micro
ServiceMicro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Micro
Service
Service Proxy
Version & Instance selection
Admission Control
Auto
Scaler
6. • Failures WILL happen
• Their root causes can be complex
and affect different number of users
• Reduce the likelihood of correlated
failures
• Recover quickly
• Proactive detection of problems
before they happen
Causes for failures
Datacenter
Server Rack
Server
Virtual Server
Code
Request
12. References
Driving innovation
within an enterprise
acting like a startup
Patterns for building
resilient and robust
applications
Administrating
cloud native
applications
A view into the
cultural challenges
of adopting DevOps
and best practices
Coupling and cohesion are terms which occur together very frequently. Coupling refers to the interdependencies between modules, while cohesion describes how related are the functions within a single module. Low cohesion implies that a given module performs tasks which are not very related to each other and hence can create problems as the module becomes large.
A component exhibits high cohesion when all its functions/methods are strongly related in terms of function
https://en.wikipedia.org/wiki/Cohesion_(computer_science)
Two components are loosely coupled, when changes in one never or rarely necessitate a change in the other
https://en.wikipedia.org/wiki/Coupling_(computer_programming)
“Low coupling often correlates with high cohesion, and vice versa. Low coupling is often a sign of a well-structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability and maintainability.”
Auto Scaler
Auto scaler provides primarily auto recovery of desired group size for each service
Must be AZ/Pod aware
Integrated with Service Endpoint service
Edge Routing
External traffic always enters the edge route tier
Handles A/B routing, canary testing, and version routing
Handles rate limiting, throttling, and filtering
Does NOT route intra-service traffic
Service Tier
Microservices implemented inside Docker containers
Connected to the auto scaler
Service Endpoints
Service Endpoint service provides location, health, and status of all service instances to router
Provides control of version selection
Updated by auto scaler and services
Service Ops Console
Provides management control for the application & components
Deployment Version control, update, etc.
Mid-Tier Routing
Handles all internal routing
Provides same controls as edge router
Image Build & Repository
Automation of the build pipeline
Supports automated deploy and update
Integrates with container service & repository
Container Service
Runtime hosting of a collection of containers on shared infrastructure
Implements resource isolation controls
Amalgam8 is an open-source platform that simplifies integration of polyglot microservices. Inspired by AirBnB’s Smartstack, Amalgam8 decouples service registration, discovery and client-side load balancing from your application logic. It provides a centralized command center to configure routing of requests across an entire set of microservices, transform in-flight requests, and more.
Amalgam8 simplifies microservice integration tasks and enables you to focus on the DevOps functions such as canary testing, A/B testing, red/black deployments, systematic resilience testing, etc. You can use the Amalgam8 platform with popular container runtimes like Kubernetes, Marathon/Mesos, VMs, or your favorite PaaS environment such as IBM Bluemix, Google Cloud, Azure, etc