Podcast
Questions and Answers
Which of the following best describes the primary shift in focus when moving from traditional eServices to REST architectural style?
Which of the following best describes the primary shift in focus when moving from traditional eServices to REST architectural style?
- From interface-centric design to an emphasis on communication and protocols. (correct)
- From resource-oriented conversation to an emphasis on interface definition.
- From focusing on proprietary protocols to relying exclusively on TCP/IP.
- From prioritizing communication protocols to emphasizing interfaces.
A development team is tasked with updating a core library used by multiple microservices. What potential challenge should they anticipate, based on the principles of microservices architecture?
A development team is tasked with updating a core library used by multiple microservices. What potential challenge should they anticipate, based on the principles of microservices architecture?
- Potential impact on multiple independent services, requiring careful testing and deployment strategies to mitigate risks. (correct)
- The need for coordination with other teams to ensure compatibility and avoid breaking changes, emphasizing tight coupling.
- Ensuring that all microservices can be updated simultaneously to maintain system consistency.
- Increased reliance on ESBs to manage dependencies, increasing complexity of the update process.
An organization is transitioning from a monolithic application to a microservices architecture. What is a key consideration regarding database management in the new architecture?
An organization is transitioning from a monolithic application to a microservices architecture. What is a key consideration regarding database management in the new architecture?
- Using distributed transactions to maintain data consistency across services.
- Ensuring every service can directly access all the data in the legacy monolithic database
- Each microservice should have distinct schema to follow single responsibility principle. (correct)
- Enforcing a single, enterprise-wide data model across all microservices.
In a microservices architecture, what is the primary role of an API Gateway?
In a microservices architecture, what is the primary role of an API Gateway?
A company is considering adopting microservices. What should they consider regarding team structure, based on microservices principles?
A company is considering adopting microservices. What should they consider regarding team structure, based on microservices principles?
An organization is decomposing a monolithic application into microservices. What strategy can help identify service boundaries based on business needs?
An organization is decomposing a monolithic application into microservices. What strategy can help identify service boundaries based on business needs?
While microservices offer many advantages, what is a key challenge introduced by this architectural style?
While microservices offer many advantages, what is a key challenge introduced by this architectural style?
What does 'Single Responsibility Principle' mean in the context of microservices design?
What does 'Single Responsibility Principle' mean in the context of microservices design?
Which of the following is a significant advantage of microservices concerning technology choices?
Which of the following is a significant advantage of microservices concerning technology choices?
An organization wants to improve the resilience of their application. How can microservices architecture contribute to this goal?
An organization wants to improve the resilience of their application. How can microservices architecture contribute to this goal?
In Y-axis scaling, how is an application scaled?
In Y-axis scaling, how is an application scaled?
What is a key consideration when implementing changes that span multiple microservices?
What is a key consideration when implementing changes that span multiple microservices?
What is a major difference in deployment strategy between a monolithic application and a microservices-based application?
What is a major difference in deployment strategy between a monolithic application and a microservices-based application?
What is a common approach to automating the deployment of microservices?
What is a common approach to automating the deployment of microservices?
What is meant by Permissionless Innovation in the context of microservices?
What is meant by Permissionless Innovation in the context of microservices?
What is a key goal of leveraging a microservices architecture with regards to system failures?
What is a key goal of leveraging a microservices architecture with regards to system failures?
Which of the following is a key advice given by Martin Fowler regarding the adoption of microservices?
Which of the following is a key advice given by Martin Fowler regarding the adoption of microservices?
What is meant by the term pattern in software architecture?
What is meant by the term pattern in software architecture?
In pattern structure, what does the 'Forces' section describe?
In pattern structure, what does the 'Forces' section describe?
Which of the following is a type of relationship between patterns?
Which of the following is a type of relationship between patterns?
Which of the following concerns does application infrastructure patterns deal with?
Which of the following concerns does application infrastructure patterns deal with?
Consider the context of hexagonal architecture style, which of the following is true?
Consider the context of hexagonal architecture style, which of the following is true?
Which of the following best describes the key difference between Monolithic architecture and Micorservice architecture?
Which of the following best describes the key difference between Monolithic architecture and Micorservice architecture?
According to the material, what is the description of a service in context of Microservices Architecture?
According to the material, what is the description of a service in context of Microservices Architecture?
Which the following best describes the bounded context in DDD?
Which the following best describes the bounded context in DDD?
In order to organize services, what are the main strategies?
In order to organize services, what are the main strategies?
Which of the following is an example of synchronous Inter-Process Communication?
Which of the following is an example of synchronous Inter-Process Communication?
Which of the following is a functionality to protect the system?
Which of the following is a functionality to protect the system?
What async message contains?
What async message contains?
Which the following of communication async pattern?
Which the following of communication async pattern?
What's are the type of message channels?
What's are the type of message channels?
When transitioning from a monolithic application to a microservices architecture, which aspect requires the MOST significant change in approach?
When transitioning from a monolithic application to a microservices architecture, which aspect requires the MOST significant change in approach?
In the context of database architecture, why are distributed transactions generally discouraged in microservices?
In the context of database architecture, why are distributed transactions generally discouraged in microservices?
What is the main reason for designing microservices according to business capabilities?
What is the main reason for designing microservices according to business capabilities?
How does the concept of 'bounded context' from Domain-Driven Design (DDD) relate to microservices?
How does the concept of 'bounded context' from Domain-Driven Design (DDD) relate to microservices?
What is one of key principle to ensure a robust microservice?
What is one of key principle to ensure a robust microservice?
All true about Circuit Breaker pattern, EXCEPT?
All true about Circuit Breaker pattern, EXCEPT?
In a microservices architecture, how does the 'Inter-Process Communication' (IPC) typically occur?
In a microservices architecture, how does the 'Inter-Process Communication' (IPC) typically occur?
When designing microservices based on business capabilities, what is a crucial aspect to consider?
When designing microservices based on business capabilities, what is a crucial aspect to consider?
What is the primary goal of 'permissionless innovation' in the context of microservices?
What is the primary goal of 'permissionless innovation' in the context of microservices?
When a system is described as having a 'single responsibility', what does this typically mean for microservices?
When a system is described as having a 'single responsibility', what does this typically mean for microservices?
How does the concept of 'bounded context' in Domain-Driven Design (DDD) relate to the design of microservices?
How does the concept of 'bounded context' in Domain-Driven Design (DDD) relate to the design of microservices?
Which of the following is a key benefit directly resulting from the independent deployability of microservices?
Which of the following is a key benefit directly resulting from the independent deployability of microservices?
What is the primary purpose of 'service discovery' in a microservices architecture?
What is the primary purpose of 'service discovery' in a microservices architecture?
In the context of microservices, what does 'evolutionary design' emphasize?
In the context of microservices, what does 'evolutionary design' emphasize?
When is it appropriate to consider microservices architecture, according to Martin Fowler's recommendation?
When is it appropriate to consider microservices architecture, according to Martin Fowler's recommendation?
What is a major challenge introduced by the partitioned database architecture often used with microservices?
What is a major challenge introduced by the partitioned database architecture often used with microservices?
What does the concept of 'forces' refer to within the structure of a software pattern?
What does the concept of 'forces' refer to within the structure of a software pattern?
What does 'Duplication' means in context of microservices?
What does 'Duplication' means in context of microservices?
What is the main advantage of using asynchronous messaging in a microservices architecture?
What is the main advantage of using asynchronous messaging in a microservices architecture?
What is the primary benefit of adhering to the pattern of 'Decompose by business capability' in microservices architecture?
What is the primary benefit of adhering to the pattern of 'Decompose by business capability' in microservices architecture?
In what kind of situation would a team usually apply the circuit breaker pattern to a microservice?
In what kind of situation would a team usually apply the circuit breaker pattern to a microservice?
In contrast to monolithic architecture, one of the goals of microservice is?
In contrast to monolithic architecture, one of the goals of microservice is?
When designing a microservice, what describes the high-level domain model?
When designing a microservice, what describes the high-level domain model?
What does 'The Hidden Dividends' means?
What does 'The Hidden Dividends' means?
What does mean that each microservice is a mini‐application?
What does mean that each microservice is a mini‐application?
Within a microservice architecture, what does the 'application infrastructure pattern' typically address?
Within a microservice architecture, what does the 'application infrastructure pattern' typically address?
In microservice architecture, what approach should organizations take regarding technology lock-in?
In microservice architecture, what approach should organizations take regarding technology lock-in?
In the context of microservices, what is a key focus when adopting asynchronous communication?
In the context of microservices, what is a key focus when adopting asynchronous communication?
In a Microservice Architecture, is the following is true regarding databases?
In a Microservice Architecture, is the following is true regarding databases?
What are the main difference between traditional eServices and REST architectural style?
What are the main difference between traditional eServices and REST architectural style?
Considering large-sized monoliths, what is true?
Considering large-sized monoliths, what is true?
When decomposing a monolithic application into microservices, what are we hoping to create?
When decomposing a monolithic application into microservices, what are we hoping to create?
Regarding the Microservices Architecture, is similar to what?
Regarding the Microservices Architecture, is similar to what?
Are advantages of microservices?
Are advantages of microservices?
Regarding to 'You Build It, You Own It'?
Regarding to 'You Build It, You Own It'?
The Microservices implements a client/server focusing on what?
The Microservices implements a client/server focusing on what?
In microservices architecture, what is the role of 'Related patterns'?
In microservices architecture, what is the role of 'Related patterns'?
What does the Y-axis scaling consist on?
What does the Y-axis scaling consist on?
What is the primary benefit of the hexagonal architectural style in the context of microservices?
What is the primary benefit of the hexagonal architectural style in the context of microservices?
Each microservice expose what for interactions?
Each microservice expose what for interactions?
Flashcards
Traditional Systems
Traditional Systems
Traditional systems are single client/server systems developed top-down.
Tight Coupling
Tight Coupling
A single organization maintains the entire system.
Loose Coupling
Loose Coupling
Each component is maintained independently from the others.
Component Flexibility
Component Flexibility
Signup and view all the flashcards
Shift from Interfaces
Shift from Interfaces
Signup and view all the flashcards
The Web as Infrastructure
The Web as Infrastructure
Signup and view all the flashcards
REST and Resources
REST and Resources
Signup and view all the flashcards
HTTP's role
HTTP's role
Signup and view all the flashcards
Microservice Focus
Microservice Focus
Signup and view all the flashcards
Microservice Autonomy
Microservice Autonomy
Signup and view all the flashcards
Team Size for Microservices
Team Size for Microservices
Signup and view all the flashcards
Functionality Segregation
Functionality Segregation
Signup and view all the flashcards
Independent Deployment
Independent Deployment
Signup and view all the flashcards
Accelerated Delivery
Accelerated Delivery
Signup and view all the flashcards
Lightweight Protocols
Lightweight Protocols
Signup and view all the flashcards
Business Capabilities
Business Capabilities
Signup and view all the flashcards
High Cohesion
High Cohesion
Signup and view all the flashcards
Low Coupling
Low Coupling
Signup and view all the flashcards
Team Responsibility
Team Responsibility
Signup and view all the flashcards
Evolutionary Design
Evolutionary Design
Signup and view all the flashcards
Y-axis scaling
Y-axis scaling
Signup and view all the flashcards
X-axis scaling
X-axis scaling
Signup and view all the flashcards
Z-axis scaling
Z-axis scaling
Signup and view all the flashcards
Complexity
Complexity
Signup and view all the flashcards
High cohesion for microservices
High cohesion for microservices
Signup and view all the flashcards
Automation
Automation
Signup and view all the flashcards
Forces
Forces
Signup and view all the flashcards
Pattern structure
Pattern structure
Signup and view all the flashcards
Predecessor
Predecessor
Signup and view all the flashcards
Successor
Successor
Signup and view all the flashcards
Analyzing nouns
Analyzing nouns
Signup and view all the flashcards
Domain model
Domain model
Signup and view all the flashcards
Microservice
Microservice
Signup and view all the flashcards
Loosely Coupled Services
Loosely Coupled Services
Signup and view all the flashcards
Defining Services
Defining Services
Signup and view all the flashcards
Distill requirments
Distill requirments
Signup and view all the flashcards
Business operationss
Business operationss
Signup and view all the flashcards
Business operationss
Business operationss
Signup and view all the flashcards
IPC
IPC
Signup and view all the flashcards
IPC definition
IPC definition
Signup and view all the flashcards
Collaboration
Collaboration
Signup and view all the flashcards
Study Notes
Microservices
- Microservices refers to an approach to application development
- Each element of functionality is placed into a separate service
- Each service is deployed independently
- Microservices relies on software engineering principles and best practices
- Low coupling and high cohesion are important aspects of microservices
- Asynchronous communication is used
History
- Traditional distributed systems are single, client/server based, and developed top-down
- Contemporary distributed systems need to include third-party sub-systems, such as insurance contracts and event tickets
- Traditional eServices relied on TCP/IP and proprietary protocols
- The focus has moved from interfaces to communication and protocols, and the Web is the de-facto communication infrastructure
- REST architectural style is the current trend for building applications
Advantages
- Microservices accelerate delivery by minimizing communication and coordination between people and change
- It is SOA without the commercialization
- Microservices are about people
- Microservices emphasize small, focused components that are autonomous and independent
- They are small enough to be handled by a single cross-functional team in a business area
- Microservices are composable, replaceable, and offer deployment benefits with lower risk
- Microservices allow for selective scaling, improve resilience against failure, and alignment with the organization structure
- Composability refers to the ability to construct complex systems by combining simpler components
- Replaceability refers to the ability to exchange components without affecting other parts of the system
- Deployment involves smaller pieces with decreased risk
Disadvantages
- They may also add complexity for simplicity, as there is no silver bullet for every problem
- Microservice-based applications favor simpler, lightweight protocols such as REST
- There are potential pitfalls if monolithic applications are not properly decomposed into microservices
- There are added challenges like implementing changes that span multiple services
Key Points
- Microservice-based applications avoid using ESBs and instead implement ESB-like functionality in the microservices themselves\
- A microservice architecture is similar to SOA
- High cohesion facilitates management and maintenance.
- Low coupling facilitates coordination
- With microservices, every module or class should have responsibility over a part of the functionality provided by the software
- High cohesion enables the implementation of the service to change without impacting its clients
The Hype
- As of March 2016, 68% of organizations were using and/or investigating microservices
- They report a 75% drop in development lead times
Microservices Adoption Status
- In 2020, most adopters are successful -Under 10% report "complete success", most (54%) describe their use as "mostly successful,” and 92% say "some success"
- Many are betting big on microservices with almost a third (29%) migrating a majority of their systems (over 50%). -Respondents cite adopting containers as a reason -Teams who were using containers for microservices indicated more success in adoption
- Also culture plays a key role
Monolithic Application
- Core is business logic, is implemented by modules that define services, domain objects, and events.
- The core is surrounded by adapters, the interface with the external world ie. database access, messaging, and web
- Has logically modular architecture that is packaged and deployed monolithically
- Is packaged as WAR files and deployed on application servers like Tomcat or Jetty.
Issues in Monolithic Software
- It is difficult to maintain and evolve
- It can suffer from "dependency hell,” adding or updating conflicting libraries
- "Rebooting" is required for any change
- It can show expensive or suboptimal delivery, for the requirement
- CPU-intensive ideally is Amazon EC2 Compute Optimized
- Memory-intensive would ideally be Amazon EC2 Memory optimized
- Can represent a tech "lock-in” for developers
- reliability problems, such as memory leaks, can potentially bring down the entire process
Architecture
- Splits the application into a set of smaller, interconnected services.
- Each service handles a set of features like order management, customer management, etc.
- Each microservice is a small application that exposes: -An API for other microservices; -A Web UI.
- Each instance is usually a cloud VM or a Docker container.
- Some REST APIs are exposed to mobile apps, using an API Gateway.
- It can be complex due to Developers needing to implement an inter-process communication
- It must also be able to handle partial failures like slowness and unavailability
Other elements
- API Gateway: Responsible for tasks such as load balancing, caching, access control, and monitoring. -Load balancing, caching, access control, API metering, and monitoring are also duties
- Each service has its own database schema.
- Is against the enterprise-wide data model.
- Can result in some data duplication
- Ensures loose coupling
Benefits of Microservices
- Tackles the problem of complexity
- It breaks it into manageable chunks or services
- Helps makes it easier to understand and maintain
- Enables each service to be developed independently
- Free to choose whatever technologies that make sense, provided that the service and API contract
- Ability to Rewrite an old service using current technology
Scaling
- Microservices can scale and deploy each service on its own.
- One can deploy a CPU-intensive image processing service on EC2 Compute Optimized instances
- One can also setup a in-memory database service on EC2 Memory-optimized instances.
- Microservice architecture is based on the single responsibility principle and high cohesion.
Scaling Dimensions
- The three major dimensions for scaling: -X-axis scaling runs multiple copies of the app -Y-axis scaling splits the application into microservices -Z-axis scaling splits the data
- Microservice architecture is an application of Y-axis scaling
Deployment
- Deploying a microservices-based application can be more complex than using a monolithic application
- With a monolithic application, you deploy on identical servers behind a traditional load balancer.
- Each app instance is configured with databases/message brokers
- With a microservice app, you have a large number of services.
- Need 100s of “moving parts” to configure, deploy, scale, monitor
Microservice Architecture Automation
- Automation can be done by using something Off the shelf ie. PaaS like Cloud Foundry.
- They'll allow easier management, deployment etc
- It lets them comply with company best practices, and compliance
- Create your own, use containerization to help
- Can use Kubernetes (clustering solution) & Docker (technology)
Drawbacks to Architectures
- One can place excessive emphasis on the size of your microservice
- Goal of microservices is to enable easy applications
- Complexity can also be a drawback
- The developers can pick and choose the approach to communication based on RPC messaging
- Microservices require partitioned architecture
- Another major drawback is the complexity that arises from the fact that a microservices application is the distributed system. -Need for inter-process communication -Handle partial failure. -All of which results in a system much more complex
- Business needs in microservices require different databases that are owned by different systems
- For that, one needs to update those databases which are not allowed
Microservices Adoption In 2020 and Beyond
- Permissionless Innovation -“the ability of others to create new things on top of the communications constructs that we create".
- Enable Failure -Mature one should enable failure
- Disrupt Trust -Effective model for evolving orgs
Hidden dividends in microservices
- Consist of the Build it, Own it methodology based on the idea of small teams being able to build and manage their own
- Microservices are encouraged to use the "you build it, you own it" model
- Deprecations
- Easy deprecations via a clear call
- Easily create different versions of a service, or build a new service
- Can be used to end centralized metadata
- Focuses on concentrate pay
- Makes Test Differently
- Eng team sees that as a chance to readdress tests as a team
Microservices in practice
- A pattern is a re-usable solution to a common problem. -forces to state other ignore-able parts. -Must identify context where it belongs. -If a bad match, it may not work.
- For the pattern, one must
- Define their forces, the issues that have too, be addressable during the resolution -Their context
- And related patterns.
Key Terms
- Pattern - reusable solution to a problem
- Forces
- Resulting context -What benefits -Drawbacks -Issues
- Related patterns -Predecessor -Successor -Alternative -General -Specific -Monolithic Architecture Pattern - Structure as single executable / deployable
- One can choose between Remote Proc Invocation and async patterns
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This lesson explores the microservices architectural style. It covers the history of distributed systems and how microservices have evolved. The advantages of using microservices are also discussed in detail and how its faster to deliver.