2. Browser
Load
Balancer
Data Access
Service
Shipping Services
StoreFront UI
Account Services
Cart Services
DB
Monolithic Architecture
Monolithic architecture is the traditional unified model for the design of a software
program.Monolithic software is designed to be self-contained; components of
the program are interconnected and interdependent rather than loosely coupled
as is the case with modular software programs.
3. Browser
Load
Balancer StoreFront UI
Account ServicesLoad
Balancer DB
Cart ServicesLoad
Balancer DB
Shipping ServicesLoad
Balancer DB
Microservices Architecture
Microservices is a specialization and
implementation approach for service-
oriented architectures (SOA) used to build
flexible, independentlydeployablesoftware
systems.
5. Virtual Machines and Containers
Virtual machines include the application,
the necessary binaries and libraries, and an
entire guest operating system -- all of which
can amount to tens of GBs.
Containers include the application and all of
its dependencies --but share the kernel with
other containers, runningas isolated
processes in user space on the host operating
system.
6. Container Advantages
• Rapid Development
– Containers include the run-time
requirements of the application
• Portability - Servers/Cloud
• Lightweight Foot Print
– Size, Resources
• Sharing and Collaboration
of Images
– Docker Hub
• Application Isolation
– Run in own space
Container Challenges
• Resource and State
Management
– What happens if a host has a trouble?
– How to keep them running?
– How to manage multiple hosts?
• Data and Network
Management
– Volumes
– Subnets
• Monitoring
– Identify container failures
• Service Discovery
– How to avoid port conflicts?
• Deployment
– Co-ordination among multiple services
7. Refactoring to Microservices
• Strategy 1 – Stop Digging
– The Law of Holes says that whenever you are in a hole you should stop digging. This
means that when you are implementing new functionality you should not add more
code to the monolith. Instead, the big idea with this strategy is to put that new code in a
standalonemicroservice.
• Strategy 2 – Split Frontend and Backend
– A strategy that shrinks the monolithic application is to split the presentation layer from
the business logic and data access layers.
– Instead of packaging all of your related WARs in one EAR, split them up into
independentWARs
• Strategy 3 – Extract Services
– A large, complex monolithic application consists of tens or hundreds of modules, all of
which are candidates for extraction.
– Existing REST/JMS/SOAP/EJB services
– Simple Servlet/JSP interfaces
• Strategy 4 – Data Services
– Isolated islands of data, De-normalize
8. Container Software
• Docker
• CoreOS Rocket
• Canonical LXD
• Spoonium
• Flockport
• Solaris Zones (2004)
Cloud Providers
• Amazon Web Services
• Microsoft Azure
• Digital Ocean
• Exoscale
• Google Compute Engine
• OpenStack
• Rackspace
• IBM Softlayer
9. • Etcd
o Service discovery / Globally distributed key-value store
• Consul
o Service discovery / Globally distributed key-value store
• Zookeeper
o Service discovery / Globally distributed key-value store
• Crypt
o Project to encrypt etcd entries
• Confd
o Watches key-value store for changes and triggers
reconfiguration of services with new values
Service Discovery Tools
10. • Flannel
o Overlay network providing each host with a separate subnet.
• Weave
o Overlay network portraying all containers on a single network.
• Pipework
o Advanced networking toolkit for arbitrarily advanced
networking configurations.
Docker Networking Tools
• Dynatrace
o High level metrics
• Datadog
o Monitor infrastructure, track metrics, events
• SignalFx
o Real time analysis with low latency
• Sysdig
o Monitoring microservices, sits at OS level
• New Relic
o Application and server centric
Monitoring Tools
11. • AWS ECS
o Scheduler and Cluster Management
• Fleet
o Scheduler and Cluster management tool.
• Marathon
o Scheduler and Service management tool.
• Docker Swarm
o Scheduler and Service management tool.
• Mesos
o Host abstraction service that consolidates host
resources for the scheduler.
• Kubernetes
o Advanced scheduler capable of managing container groups.
• Compose
o Container orchestration tool for creating container groups.
Container Management Tools