SlideShare a Scribd company logo
Microservices
TECH9810 - System Architectures
Microservices
● Microservices are small-scale, stateless, services
that have a single responsibility. They are
combined to create applications.
● They are completely independent with their own
database and UI management code.
Microservices
● Software products that use micro services have a
microservices architecture.
● If you need to create cloud-based software
products that are adaptable, scaleable and
resilient then design them around a microservices
architecture.
Microservices (Example)
● Let’s look at an example:
● TU Dublin registration, where users provide
information about their identity, security
information, mobile phone number and email
address.
Microservices (Example)
● Authentication using UID/password.
● Two-factor authentication using code sent to
mobile phone.
● User information management e.g. change
password or mobile phone number.
● Reset forgotten password.
Microservices (Example)
● Each of these features could be implemented as
a separate service that uses a central shared
database to hold authentication information.
Microservices (Example)
● However, these features are too large to be
microservices. To identify the microservices that
might be used in the authentication system, you
need to break down the coarse-grain features into
more detailed functions.
Microservices (Example)
Microservices Characteristics
Microservices Characteristics
● Self-Contained
● Microservices do not have external dependencies.
They manage their own data and implement their own
user interface.
Microservices Characteristics
● Lightweight
● Microservices communicate using lightweight
protocols, so that service communication overheads
are low.
Microservices Characteristics
● Implementation Independent
● Microservices may be implemented using different
programming languages and may use different
technologies (e.g., different types of database) in their
implementation.
Microservices Characteristics
● Independently Deployable
● Each microservice runs in its own process and is
independently deployable, using automated systems.
Microservices Characteristics
● Business-oriented
● Microservices should implement business capabilities
and needs, rather than simply provide a technical
service.
Microservices Guidelines
Microservices Guidelines
● Balance fine-grain functionality and system
performance
○ Single-function services mean that changes are limited
to fewer services but require service communications
to implement user functionality. This slows down a
system because of the need for each service to bundle
and unbundle messages sent from other services.
Microservices Guidelines
● Follow the ‘common closure principle’
○ Elements of a system that are likely to be
changed at the same time should be located
within the same service. Most new and
changed requirements should therefore only
affect a single service.
Microservices Guidelines
● Associate services with business capabilities
○ A business capability is a discrete area of
business functionality that is the responsibility
of an individual or a group. You should identify
the services that are required to support each
business capability.
Microservices Guidelines
● Design services so that they only have access to
the data that they need
○ If there is an overlap between the data used by
different services, you need a mechanism to
propagate data changes to all services using
the same data.
The Good, the Bad, and
the Interesting of
Microservices
THE GOOD
Microservices: Benefits
● Self-Contained
● Microservices are self-contained and run
in separate processes.
22
Microservices: Benefits
● Independence
● In cloud-based systems, each
microservice may be deployed in its own
container. This means a microservice
can be stopped and restarted without
affecting other parts of the system.
23
Microservices: Benefits
● Scalable
● If the demand on a service increases,
service replicas can be quickly created
and deployed. These do not require a
more powerful server so ‘scaling-out’ is,
typically, cheaper than ‘scaling up’.
24
Microservices: Benefits
● Non-monolithic
● It is possible to change or upgrade each
service individually rather than
upgrading in the entire application.
25
Microservices: Benefits
● Organic Development
● Microservices allows us to develop an
application which is organic (an
application which latterly upgrades by
adding more functions or modules) in
nature.
26
THE BAD
Microservices: Weaknesses
● Complexity
● Microservices has all the associated
complexities of the distributed system.
28
Microservices: Weaknesses
● Communication Issues
● There is a higher chance of failure
during communication between different
services.
29
Microservices: Weaknesses
● Management
● Difficult to manage a large number of
services.
30
Microservices: Weaknesses
● Network Issues
● The developer needs to solve the
problem, such as network latency and
load balancing.
31
Microservices: Weaknesses
● Distributed Testing
● Complex testing over a distributed
environment.
32
THE INTERESTING
Microservices: Interesting
● How small is too small?
● It's received wisdom that if you are an enterprise, then
microservices means breaking up your large, monolithic
applications into smaller, discrete functions and technical
services. How small? A microservice should have been
architected to focus on doing one task, and doing it well.
How long would it take to re-implement if you tore it
down? A few days or weeks? If the idea of starting again
scares you, then your microservice is too big.
34
Microservices: Interesting
● It’s a distributed architecture!
● Microservices are a distributed architecture and, as such,
must be able to communicate over a larger area—across
data centers, servers, clusters, and meshes. They must
run across networks of varying quality and across
different hardware. This will inevitably mean challenges
in terms of performance, availability, concurrence,
latency, and reliability.
35
Microservices: Interesting
● “Bounded Context”
● Breaking up monolithic applications into smaller sets of
services will require communications between those
services to operate in a federated way. This will breed
increased network traffic and necessitate more detailed
management. You can reduce communications and
complexity by grouping services around a problem
domain.
36
Microservices: Interesting
● Autonomy
● Microservices should be architected to be autonomous,
able to operate and be maintained without relying on
other microservices. If they can operate independently of
each other, they will neither be derailed by problems or
performance issues in another microservice nor act as a
point of failure. All this adds up to performance,
scalability, and elasticity.
37
Introduction to Microservices

More Related Content

PDF
Decoding Monolithic vs. Microservices: Which Architecture Fits Your Project?
PPT
What is Microservices
PDF
Microservices: Detailed Guide
PPTX
Microservice Architecture Software Architecture Microservice Design Pattern
PDF
Microservices.pdf
PDF
Introduction to Microservices Architecture - SECCOMP 2020
PPTX
6. Microservices architecture.pptx
PPTX
Software Architectures, Week 3 - Microservice-based Architectures
Decoding Monolithic vs. Microservices: Which Architecture Fits Your Project?
What is Microservices
Microservices: Detailed Guide
Microservice Architecture Software Architecture Microservice Design Pattern
Microservices.pdf
Introduction to Microservices Architecture - SECCOMP 2020
6. Microservices architecture.pptx
Software Architectures, Week 3 - Microservice-based Architectures

Similar to Introduction to Microservices (20)

PPTX
AppDev with Microservices
PPTX
PPTX
MicroserviceArchitecture in detail over Monolith.
PDF
Microservices Tutorial for Beginners | All You Need to Get Started
PDF
DEVNET-1142 Decomposing Monolithic Applications to Microservices
PDF
bsc comp scienceINTRODUCTION TO CLOUD COMPUTING_final.pdf
PDF
Microservices: an introduction
PDF
Pitfalls & Challenges Faced During a Microservices Architecture Implementation
PPTX
1 (1).pptx
ODP
Monolithic to Microservices Architecture - STM 6
PPTX
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
PDF
Introduction to Microservices.pdf
PPTX
Unit No. II Architecture.pptx Cloud Microservices & Application
PDF
Designing microservices platforms with nats
PPTX
Microservices
PDF
Reactive - Is it really a Magic Pill?
PDF
Unlocking the Future of Software Development with Microservices Architecture.pdf
PDF
Diving Into Reactive Microservices
PDF
Surviving microservices
PDF
Guide to Spring Boot Microservices Essentials
AppDev with Microservices
MicroserviceArchitecture in detail over Monolith.
Microservices Tutorial for Beginners | All You Need to Get Started
DEVNET-1142 Decomposing Monolithic Applications to Microservices
bsc comp scienceINTRODUCTION TO CLOUD COMPUTING_final.pdf
Microservices: an introduction
Pitfalls & Challenges Faced During a Microservices Architecture Implementation
1 (1).pptx
Monolithic to Microservices Architecture - STM 6
NextStep Boston 2018 - Monoliths or Microservices, Francisco Menezes
Introduction to Microservices.pdf
Unit No. II Architecture.pptx Cloud Microservices & Application
Designing microservices platforms with nats
Microservices
Reactive - Is it really a Magic Pill?
Unlocking the Future of Software Development with Microservices Architecture.pdf
Diving Into Reactive Microservices
Surviving microservices
Guide to Spring Boot Microservices Essentials
Ad

More from Damian T. Gordon (20)

PPTX
Introduction to Prompts and Prompt Engineering
PPTX
Introduction to Vibe Coding and Vibe Engineering
PPTX
TRIZ: Theory of Inventive Problem Solving
PPTX
Some Ethical Considerations of AI and GenAI
PPTX
Some Common Errors that Generative AI Produces
PPTX
The Use of Data and Datasets in Data Science
PPTX
A History of Different Versions of Microsoft Windows
PPTX
Writing an Abstract: A Question-based Approach
PPTX
Using GenAI for Universal Design for Learning
DOC
A CheckSheet for Inclusive Software Design
PPTX
A History of Versions of the Apple MacOS
PPTX
68 Ways that Data Science and AI can help address the UN Sustainability Goals
PPTX
Copyright and Creative Commons Considerations
PPTX
Exam Preparation: Some Ideas and Suggestions
PPTX
Studying and Notetaking: Some Suggestions
PPTX
The Growth Mindset: Explanations and Activities
PPTX
Hyperparameter Tuning in Neural Networks
PPTX
Early 20th Century Modern Art: Movements and Artists
PPTX
An Introduction to Generative Artificial Intelligence
PPTX
An Introduction to Green Computing with a fun quiz.
Introduction to Prompts and Prompt Engineering
Introduction to Vibe Coding and Vibe Engineering
TRIZ: Theory of Inventive Problem Solving
Some Ethical Considerations of AI and GenAI
Some Common Errors that Generative AI Produces
The Use of Data and Datasets in Data Science
A History of Different Versions of Microsoft Windows
Writing an Abstract: A Question-based Approach
Using GenAI for Universal Design for Learning
A CheckSheet for Inclusive Software Design
A History of Versions of the Apple MacOS
68 Ways that Data Science and AI can help address the UN Sustainability Goals
Copyright and Creative Commons Considerations
Exam Preparation: Some Ideas and Suggestions
Studying and Notetaking: Some Suggestions
The Growth Mindset: Explanations and Activities
Hyperparameter Tuning in Neural Networks
Early 20th Century Modern Art: Movements and Artists
An Introduction to Generative Artificial Intelligence
An Introduction to Green Computing with a fun quiz.
Ad

Recently uploaded (20)

PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
master seminar digital applications in india
PDF
Computing-Curriculum for Schools in Ghana
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
RMMM.pdf make it easy to upload and study
PDF
Classroom Observation Tools for Teachers
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
O7-L3 Supply Chain Operations - ICLT Program
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Cell Structure & Organelles in detailed.
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
master seminar digital applications in india
Computing-Curriculum for Schools in Ghana
Basic Mud Logging Guide for educational purpose
Renaissance Architecture: A Journey from Faith to Humanism
RMMM.pdf make it easy to upload and study
Classroom Observation Tools for Teachers
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Supply Chain Operations Speaking Notes -ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf

Introduction to Microservices

  • 2. Microservices ● Microservices are small-scale, stateless, services that have a single responsibility. They are combined to create applications. ● They are completely independent with their own database and UI management code.
  • 3. Microservices ● Software products that use micro services have a microservices architecture. ● If you need to create cloud-based software products that are adaptable, scaleable and resilient then design them around a microservices architecture.
  • 4. Microservices (Example) ● Let’s look at an example: ● TU Dublin registration, where users provide information about their identity, security information, mobile phone number and email address.
  • 5. Microservices (Example) ● Authentication using UID/password. ● Two-factor authentication using code sent to mobile phone. ● User information management e.g. change password or mobile phone number. ● Reset forgotten password.
  • 6. Microservices (Example) ● Each of these features could be implemented as a separate service that uses a central shared database to hold authentication information.
  • 7. Microservices (Example) ● However, these features are too large to be microservices. To identify the microservices that might be used in the authentication system, you need to break down the coarse-grain features into more detailed functions.
  • 10. Microservices Characteristics ● Self-Contained ● Microservices do not have external dependencies. They manage their own data and implement their own user interface.
  • 11. Microservices Characteristics ● Lightweight ● Microservices communicate using lightweight protocols, so that service communication overheads are low.
  • 12. Microservices Characteristics ● Implementation Independent ● Microservices may be implemented using different programming languages and may use different technologies (e.g., different types of database) in their implementation.
  • 13. Microservices Characteristics ● Independently Deployable ● Each microservice runs in its own process and is independently deployable, using automated systems.
  • 14. Microservices Characteristics ● Business-oriented ● Microservices should implement business capabilities and needs, rather than simply provide a technical service.
  • 16. Microservices Guidelines ● Balance fine-grain functionality and system performance ○ Single-function services mean that changes are limited to fewer services but require service communications to implement user functionality. This slows down a system because of the need for each service to bundle and unbundle messages sent from other services.
  • 17. Microservices Guidelines ● Follow the ‘common closure principle’ ○ Elements of a system that are likely to be changed at the same time should be located within the same service. Most new and changed requirements should therefore only affect a single service.
  • 18. Microservices Guidelines ● Associate services with business capabilities ○ A business capability is a discrete area of business functionality that is the responsibility of an individual or a group. You should identify the services that are required to support each business capability.
  • 19. Microservices Guidelines ● Design services so that they only have access to the data that they need ○ If there is an overlap between the data used by different services, you need a mechanism to propagate data changes to all services using the same data.
  • 20. The Good, the Bad, and the Interesting of Microservices
  • 22. Microservices: Benefits ● Self-Contained ● Microservices are self-contained and run in separate processes. 22
  • 23. Microservices: Benefits ● Independence ● In cloud-based systems, each microservice may be deployed in its own container. This means a microservice can be stopped and restarted without affecting other parts of the system. 23
  • 24. Microservices: Benefits ● Scalable ● If the demand on a service increases, service replicas can be quickly created and deployed. These do not require a more powerful server so ‘scaling-out’ is, typically, cheaper than ‘scaling up’. 24
  • 25. Microservices: Benefits ● Non-monolithic ● It is possible to change or upgrade each service individually rather than upgrading in the entire application. 25
  • 26. Microservices: Benefits ● Organic Development ● Microservices allows us to develop an application which is organic (an application which latterly upgrades by adding more functions or modules) in nature. 26
  • 28. Microservices: Weaknesses ● Complexity ● Microservices has all the associated complexities of the distributed system. 28
  • 29. Microservices: Weaknesses ● Communication Issues ● There is a higher chance of failure during communication between different services. 29
  • 30. Microservices: Weaknesses ● Management ● Difficult to manage a large number of services. 30
  • 31. Microservices: Weaknesses ● Network Issues ● The developer needs to solve the problem, such as network latency and load balancing. 31
  • 32. Microservices: Weaknesses ● Distributed Testing ● Complex testing over a distributed environment. 32
  • 34. Microservices: Interesting ● How small is too small? ● It's received wisdom that if you are an enterprise, then microservices means breaking up your large, monolithic applications into smaller, discrete functions and technical services. How small? A microservice should have been architected to focus on doing one task, and doing it well. How long would it take to re-implement if you tore it down? A few days or weeks? If the idea of starting again scares you, then your microservice is too big. 34
  • 35. Microservices: Interesting ● It’s a distributed architecture! ● Microservices are a distributed architecture and, as such, must be able to communicate over a larger area—across data centers, servers, clusters, and meshes. They must run across networks of varying quality and across different hardware. This will inevitably mean challenges in terms of performance, availability, concurrence, latency, and reliability. 35
  • 36. Microservices: Interesting ● “Bounded Context” ● Breaking up monolithic applications into smaller sets of services will require communications between those services to operate in a federated way. This will breed increased network traffic and necessitate more detailed management. You can reduce communications and complexity by grouping services around a problem domain. 36
  • 37. Microservices: Interesting ● Autonomy ● Microservices should be architected to be autonomous, able to operate and be maintained without relying on other microservices. If they can operate independently of each other, they will neither be derailed by problems or performance issues in another microservice nor act as a point of failure. All this adds up to performance, scalability, and elasticity. 37

Editor's Notes

  • #36: Distributed, therefore, means building an architecture for an application or service that caters to the kinds of variables that can slow performance, reduce availability, and introduce latency. For example, it might mean building an architecture that relies on smaller volumes of data being transported during a transaction, that sees data cached locally, or that relies on stateless transactions. It might mean streamlining the number of service calls needed to complete a transaction. It could entail load balancing, especially if workloads fluctuate according to demand at given times of a day or during an event. On top of architecture comes the need for monitoring and management—using tools to ensure your application or service hits the required service levels and provides warnings when it doesn't.
  • #37: This is an idea from Eric Evans, defined as "bounded context," in his book Domain Driven Design. In this approach, particular terms, definitions, and rules related to each other are applied consistently. Lack of consistency is an issue that can, and has, frustrated IT projects long before cloud. It can, for example, be a lack of consistency in project definitions or data in different systems that mean the same thing but are described differently and must be translated or required a schema registry. In the cloud, microservices that are aligned around a problem—within that bounded context—will mean fewer interfaces and chatty interactions.