Introduction to
Microservices
Microservices
Agenda
● What are Microservices?
● Monolith vs Microservices
● Characteristics of a Microservice Architecture
● Microservices Ecosystem
● Challenges
What are Microservices?
“Microservices architecture is an approach to application development in
which a large application is built as a suite of modular services. Each module
supports a specific business goal and uses a simple, well-defined interface
to communicate with other sets of services”
These services are built around business capabilities and independently
deployable by fully automated deployment machinery. There is a bare
minimum of centralized management of these services, which may be written
in different programming languages and use different data storage
technologies
Microservices Are..
● Highly maintainable and testable
● Loosely coupled
● Independently deployable
● Organized around business capabilities
● Owned by a small team
Monolith vs Microservices
Monolith VS Microservices
Characteristics of a Microservice
Architecture
Componentization via Services
● Component is a unit of software that is independently replaceable and
upgradeable
● One main reason for using services as components (rather than libraries)
is that services are independently deployable.
● Each Service talks to other services using well defined (public) API
Organized around Business Capabilities
Smart endpoints and dumb pipes
● Applications built from microservices aim to be as decoupled and as
cohesive as possible
● Receiving a request, applying logic as appropriate and producing a
response
● RESTish protocols rather than complex protocols.
● The infrastructure chosen is typically dumb (dumb as in acts as a message
router only) - simple implementations such as RabbitMQ or ZeroMQ
Decentralized Governance
● Not every problem is a nail and not every solution a hammer
● Using the right tool for the job
● Choose the best Technology/Language suited for each service
Decentralized Data Management
Infrastructure Automation
● Scale up/down at will
● Faster deployment cycles
● Resilient & Highly Available
Design for failure
● Applications need to be designed so that they can tolerate the failure of
services
● Detect the failures quickly and, if possible, automatically restore service
Microservices Ecosystem
Microservices Ecosystem
Load balancer : Distribute the incoming load among many instances of
Microservices
Microservices Ecosystem
Service Discovery server : Instead of manually keeping track of what
microservices that are deployed currently and on what hosts and ports we
need service discovery functionality that allows, through an API, microservices
to self-register at startup.
Microservices Ecosystem
API Gateway :
● Insulates the clients from how the application is partitioned into microservices
● Insulates the clients from the problem of determining the locations of service instances
● Provides the optimal API for each client
Microservices Ecosystem
Central Configuration server : Instead of a local configuration per deployed
unit (i.e. microservice) we need a centralized management of configuration.
Monitoring : When there are “lots” of microservices in your ecosystem
monitoring becomes essential.
Containerization : Intentional containerization of single services or processes
makes it very simple to manage and update these services
Centralized log analysis : Since a transaction will consist of several
microservice calls log aggregation and central analysis is important.
Circuit Breaker : To avoid the chain of failures problem we need to apply the
Circuit Breaker pattern.
Microservices Ecosystem - Circuit Breaker
Architecture View
Challenges
● Inter‑process communication (via network)
● Distributed transactions
● Large number of services
● Requires more automation
Further Reading
● https://medium.com/platform-engineer/microservices-design-guide-eca0
b799a7e8
● https://medium.com/swlh/handling-transactions-in-the-microservice-worl
d-c77b275813e0
●
Thank You !
youtube.com/KuppiyaSL

Introduction to Microservices.pdf

  • 1.
  • 2.
    Agenda ● What areMicroservices? ● Monolith vs Microservices ● Characteristics of a Microservice Architecture ● Microservices Ecosystem ● Challenges
  • 3.
    What are Microservices? “Microservicesarchitecture is an approach to application development in which a large application is built as a suite of modular services. Each module supports a specific business goal and uses a simple, well-defined interface to communicate with other sets of services” These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies
  • 4.
    Microservices Are.. ● Highlymaintainable and testable ● Loosely coupled ● Independently deployable ● Organized around business capabilities ● Owned by a small team
  • 5.
  • 6.
  • 7.
    Characteristics of aMicroservice Architecture
  • 8.
    Componentization via Services ●Component is a unit of software that is independently replaceable and upgradeable ● One main reason for using services as components (rather than libraries) is that services are independently deployable. ● Each Service talks to other services using well defined (public) API
  • 9.
  • 10.
    Smart endpoints anddumb pipes ● Applications built from microservices aim to be as decoupled and as cohesive as possible ● Receiving a request, applying logic as appropriate and producing a response ● RESTish protocols rather than complex protocols. ● The infrastructure chosen is typically dumb (dumb as in acts as a message router only) - simple implementations such as RabbitMQ or ZeroMQ
  • 11.
    Decentralized Governance ● Notevery problem is a nail and not every solution a hammer ● Using the right tool for the job ● Choose the best Technology/Language suited for each service
  • 12.
  • 13.
    Infrastructure Automation ● Scaleup/down at will ● Faster deployment cycles ● Resilient & Highly Available
  • 14.
    Design for failure ●Applications need to be designed so that they can tolerate the failure of services ● Detect the failures quickly and, if possible, automatically restore service
  • 15.
  • 16.
    Microservices Ecosystem Load balancer: Distribute the incoming load among many instances of Microservices
  • 17.
    Microservices Ecosystem Service Discoveryserver : Instead of manually keeping track of what microservices that are deployed currently and on what hosts and ports we need service discovery functionality that allows, through an API, microservices to self-register at startup.
  • 18.
    Microservices Ecosystem API Gateway: ● Insulates the clients from how the application is partitioned into microservices ● Insulates the clients from the problem of determining the locations of service instances ● Provides the optimal API for each client
  • 19.
    Microservices Ecosystem Central Configurationserver : Instead of a local configuration per deployed unit (i.e. microservice) we need a centralized management of configuration. Monitoring : When there are “lots” of microservices in your ecosystem monitoring becomes essential. Containerization : Intentional containerization of single services or processes makes it very simple to manage and update these services Centralized log analysis : Since a transaction will consist of several microservice calls log aggregation and central analysis is important. Circuit Breaker : To avoid the chain of failures problem we need to apply the Circuit Breaker pattern.
  • 20.
  • 21.
  • 22.
    Challenges ● Inter‑process communication(via network) ● Distributed transactions ● Large number of services ● Requires more automation
  • 23.
    Further Reading ● https://medium.com/platform-engineer/microservices-design-guide-eca0 b799a7e8 ●https://medium.com/swlh/handling-transactions-in-the-microservice-worl d-c77b275813e0 ●
  • 24.