0% found this document useful (0 votes)
25 views

Microservices QA

Uploaded by

jkdholakiya2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Microservices QA

Uploaded by

jkdholakiya2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

What do you mean by Microservice?

Microservices, also known as Microservices Architecture, is basically an SDLC approach in which


large applications are built as a collection of small functional modules. It is one of the most widely
adopted architectural concepts within software development. In addition to helping in easy
maintenance, this architecture also makes development faster. Additionally, microservices are also a
big asset for the latest methods of software development such as DevOps and Agile. Furthermore, it
helps deliver large, complex applications promptly, frequently, and reliably. Applications are
modeled as collections of services, which are:

• Maintainable and testable

• Loosely coupled

• Independently deployable

• Designed or organized around business capabilities

• Managed by a small team

Microservices Interview Questions for Freshers

1. Write main features of Microservices.

Some of the main features of Microservices include:


• Decoupling: Within a system, services are largely decoupled. The application as a whole can
therefore be easily constructed, altered, and scalable

• Componentization: Microservices are viewed as independent components that can easily be


exchanged or upgraded

• Business Capabilities: Microservices are relatively simple and only focus on one service

• Team autonomy: Each developer works independently of each other, allowing for a faster
project timeline

• Continuous Delivery: Enables frequent software releases through systematic automation of


software development, testing, and approval

• Responsibility: Microservices are not focused on applications as projects. Rather, they see
applications as products they are responsible for

• Decentralized Governance: Choosing the right tool according to the job is the goal.
Developers can choose the best tools to solve their problems

• Agility: Microservices facilitate agile development. It is possible to create new features


quickly and discard them again at any time.

2. Write main components of Microservices.

Some of the main components of microservices include:

• Containers, Clustering, and Orchestration

• IaC [Infrastructure as Code Conception]

• Cloud Infrastructure

• API Gateway

• Enterprise Service Bus

• Service Delivery
3. What are the benefits and drawbacks of Microservices?

Benefits:

• Self-contained, and independent deployment module.

• Independently managed services.

• In order to improve performance, the demand service can be deployed on multiple


servers.

• It is easier to test and has fewer dependencies.

• A greater degree of scalability and agility.

• Simplicity in debugging & maintenance.

• Better communication between developers and business users.

• Development teams of a smaller size.

Drawbacks:

• Due to the complexity of the architecture, testing and monitoring are more difficult.

• Lacks the proper corporate culture for it to work.

• Pre-planning is essential.

• Complex development.

• Requires a cultural shift.

• Expensive compared to monoliths.

• Security implications.

• Maintaining the network is more difficult.

You can download a PDF version of Microservices Interview Questions.

Download PDF

4. Name three common tools mostly used for microservices.

Three common tools used for microservices include:

• Wiremock

• Docker

• Hystrix

5. Explain the working of Microservice Architecture.


Microservice architectures consist of the following components:

• Clients: Different users send requests from various devices.

• Identity Provider: Validate a user's or client's identity and issue security tokens.

• API Gateway: Handles the requests from clients.

• Static Content: Contains all of the system's content.

• Management: Services are balanced on nodes and failures are identified.

• Service Discovery: A guide to discovering the routes of communication between


microservices.

• Content Delivery Network: Includes distributed network of proxy servers and their data
centers.

• Remote Service: Provides remote access to data or information that resides on networked
computers and devices.

6. Write difference between Monolithic, SOA and Microservices Architecture.


• Monolithic Architecture: It is "like a big container" where all the software components of an
application are bundled together tightly. It is usually built as one large system and is one
code-base.

• SOA (Service-Oriented Architecture): It is a group of services interacting or communicating


with each other. Depending on the nature of the communication, it can be simple data
exchange or it could involve several services coordinating some activity.

• Microservice Architecture: It involves structuring an application in the form of a cluster of


small, autonomous services modeled around a business domain. The functional modules can
be deployed independently, are scalable, are aimed at achieving specific business goals, and
communicate with each other over standard protocols.

7. Explain spring cloud and spring boot.

Spring Cloud: In Microservices, the Spring cloud is a system that integrates with external systems.
This is a short-lived framework designed to build applications quickly. It contributes significantly to
microservice architecture due to its association with finite amounts of data processing. Some of the
features of spring cloud are shown below:
Spring Boot: Spring Boot is an open-sourced, Java-based framework that provides its developers
with a platform on which they can create stand-alone, production-grade Spring applications. In
addition to reducing development time and increasing productivity, it is easily understood.

8. What is the role of actuator in spring boot?

A spring boot actuator is a project that provides restful web services to access the current state of an
application that is running in production. In addition, you can monitor and manage application usage
in a production environment without having to code or configure any of the applications.

9. Explain how you can override the default properties of Spring boot projects.

By specifying properties in the application.properties file, it is possible to override the default


properties of a spring boot project.

Example:
In Spring MVC applications, you need to specify a suffix and prefix. You can do this by adding the
properties listed below in the application.properties file.

• For suffix – spring.mvc.view.suffix: .jsp

• For prefix – spring.mvc.view.prefix: /WEB-INF/

10. What issues are generally solved by spring clouds?

The following problems can be solved with spring cloud:

• Complicated issues caused by distributed systems: This includes network issues, latency
problems, bandwidth problems, and security issues.

• Service Discovery issues: Service discovery allows processes and services to communicate
and locate each other within a cluster.

• Redundancy issues: Distributed systems can often have redundancy issues.

• Load balancing issues: Optimize the distribution of workloads among multiple computing
resources, including computer clusters, central processing units, and network links.

• Reduces performance issues: Reduces performance issues caused by various operational


overheads.

11. What do you mean by Cohesion and Coupling?

Coupling: It is defined as a relationship between software modules A and B, and how much one
module depends or interacts with another one. Couplings fall into three major categories. Modules
can be highly coupled (highly dependent), loosely coupled, and uncoupled from each other. The best
kind of coupling is loose coupling, which is achieved through interfaces.

Cohesion: It is defined as a relationship between two or more parts/elements of a module that


serves the same purpose. Generally, a module with high cohesion can perform a specific function
efficiently without needing communication with any other modules. High cohesion enhances the
functionality of the module.

12. What do you mean by Bounded Context?


A Bounded Context is a central pattern in DDD (Domain-Driven Design), which deals with
collaboration across large models and teams. DDD breaks large models down into multiple contexts
to make them more manageable. Additionally, it explains their relationship explicitly. The concept
promotes an object-oriented approach to developing services bound to a data model and is also
responsible for ensuring the integrity and mutability of said data model.

13. Write the fundamental characteristics of Microservice Design.

• Based on Business Capabilities: Services are divided and organized around business
capabilities.

• Products not projects: A product should belong to the team that handles it.

• Essential messaging frameworks: Rely on functional messaging frameworks: Eliminate


centralized service buses by embracing the concept of decentralization.

• Decentralized Governance: The development teams are accountable for all aspects of the
software they produce.

• Decentralized data management: Microservices allow each service to manage its data
separately.

• Automated infrastructure: These systems are complete and can be deployed


independently.

• Design for failure: Increase the tolerance for failure of services by focusing on continuous
monitoring of the applications.

14. What are the challenges that one has to face while using Microservices?

The challenges that one has to face while using microservices can be both functional and technical as
given below:
Functional Challenges:

• Require heavy infrastructure setup.

• Need Heavy investment.

• Require excessive planning to handle or manage operations overhead.

Technical Challenges:

• Microservices are always interdependent. Therefore, they must communicate with each
other.

• It is a heavily involved model because it is a distributed system.

• You need to be prepared for operations overhead if you are using Microservice
architecture.

• To support heterogeneously distributed microservices, you need skilled professionals.

• It is difficult to automate because of the number of smaller components. For that reason,
each component must be built, deployed, and monitored separately.

• It is difficult to manage configurations across different environments for all components.

• Challenges associated with deployment, debugging, and testing.

15. Explain PACT in microservices.

PACT is defined as an open-source tool that allows service providers and consumers to test
interactions in isolation against contracts that have been made to increase the reliability of
microservice integration. It also offers support for numerous languages, such as Ruby, Java, Scala,
.NET, JavaScript, Swift/Objective-C.

16. Explain how independent microservices communicate with each other.

Communication between microservices can take place through:

• HTTP/REST with JSON or binary protocol for request-response

• Websockets for streaming.

• A broker or server program that uses advanced routing algorithms.

RabbitMQ, Nats, Kafka, etc., can be used as message brokers; each is built to handle a particular
message semantic. You can also use Backend as a Service like Space Cloud to automate your entire
backend.

17. What do you mean by client certificates?

The client certificate is a type of digital certificate that generally allows client systems to
authenticate their requests to remote servers. In many mutual authentication designs, it plays a key
role in providing strong assurance of the requestor's identity.

18. Explain CDC.


As the name implies, CDC (Consumer-Driven Contract) basically ensures service communication
compatibility by establishing an agreement between consumers and service providers regarding the
format of the data exchanged between them. An agreement like this is called a contract. Basically, it
is a pattern used to develop Microservices so that they can be efficiently used by external systems.

19. Name some famous companies that use Microservice architecture.

Microservices architecture has replaced monolithic architecture for most large-scale websites like:

• Twitter

• Netflix

• Amazon, etc.

Microservices Interview Questions for Experienced

20. What do you mean by Semantic Monitoring?

The semantic monitoring method, also called synthetic monitoring, uses automated tests and
monitoring of the application to identify errors in business processes. This technology provides a
deeper look into the transaction performance, service availability, and overall application
performance to identify performance issues of microservices, catch bugs in transactions and provide
an overall higher level of performance.

21. Explain continuous monitoring.

Continuous monitoring involves identifying compliance and risk issues in a company's financial and
operational environment. It consists of people, processes, and working systems that support
efficient and effective operations.

22. What do you mean by Domain driven design?

DDD (Domain-Driven-Design) is basically an architectural style that is based on Object-Oriented


Analysis Design approaches and principles. In this approach, the business domain is modeled
carefully in software, without regard to how the system actually works. By interconnecting related
components of the software system into a continuously evolving system, it facilitates the
development of complex systems. There are three fundamental principles underlying it as shown
below:

• Concentrate on the core domain and domain logic.

• Analyze domain models to find complex designs.

• Engage in regular collaboration with the domain experts to improve the application model
and address emerging domain issues.
23. Explain OAuth.

Generally speaking, OAuth (Open Authorization Protocol) enables users to authenticate themselves
with third-party service providers. With this protocol, you can access client applications on HTTP for
third-party providers such as GitHub, Facebook, etc. Using it, you can also share resources on one
site with another site without requiring their credentials.

24. What do you mean by Distributed Transaction?

Distributed transactions are an outdated approach in today's microservice architecture that leaves
the developer with severe scalability issues. Transactions are distributed to several services that are
called to complete the transaction in sequence. With so many moving parts, it is very complex and
prone to failure.

25. Explain Idempotence and its usage.

The term 'idempotence' refers to the repeated performance of a task despite the same outcome. In
other words, it is a situation in which a task is performed repeatedly with the end result remaining
the same.

Usage: When the remote service or data source receives instructions more than once, Idempotence
ensures that it will process each request once.

26. What do you mean by end-to-end microservices testing?

Usually, end-to-end (E2E) microservice testing is an uncoordinated, high-cost technique that is used
to ensure that all components work together for a complete user journey. Usually, it is done through
the user interface, mimicking how it appears to the user. It also ensures all processes in the
workflow are working properly.

27. Explain the term Eureka in Microservices.

Eureka Server, also referred to as Netflix Service Discovery Server, is an application that keeps track
of all client-service applications. As every Microservice registers to Eureka Server, Eureka Server
knows all the client applications running on the different ports and IP addresses. It generally uses
Spring Cloud and is not heavy on the application development process.
28. Explain the way to implement service discovery in microservices architecture.

There are many ways to set up service discovery, but Netflix's Eureka is the most efficient. This is a
hassle-free procedure that doesn't add much weight to the application. It also supports a wide range
of web applications. A number of annotations are provided by Spring Cloud to make its use as simple
as possible and to hide complex concepts.

29. Explain the importance of reports and dashboards in microservices.

Monitoring a system usually involves the use of reports and dashboards. Using reports and
dashboards for microservices can help you:

• Determine which microservices support which resources.

• Determine which services are impacted whenever changes are made or occur to
components.

• Make documentation easy to access whenever needed.

• Review deployed component versions.

• Determine the level of maturity and compliance from the components.

30. What are Reactive Extensions in Microservices?

A reactive extension, also known as Rx, is basically a design approach that calls multiple services and
then generates a single response by combining the results. The calls can either be blocking or not
blocking, synchronous or asynchronous. A popular tool in distributed systems, Rx works exactly
opposite to legacy flows.

31. Explain type of tests mostly used in Microservices.

As there are multiple microservices working together, microservice testing becomes quite complex
when working with microservices. Consequently, tests are categorized according to their level:
Botton-level tests: The bottom-level tests are those that deal with technology, such as unit tests and
performance tests. This is a completely automated process.
Middle-level tests: In the middle, we have exploratory tests such as stress tests and usability tests.
Top-level tests: In the top-level testing, we have a limited number of acceptance tests. The
acceptance tests help stakeholders understand and verify the software features.

32. What do you mean by Mike Cohn’s Test Pyramid?

Mike Cohn's Test Pyramid explains the different types of automated tests needed for software
development. The test pyramid is basically used to maximize automation at all levels of testing,
including unit testing, service level testing, UI testing, etc. The pyramid also states that unit tests are
faster and more isolated, while UI tests, which are at the top, are more time-consuming and are
centered around integration.

In accordance with the pyramid, the number of tests should be highest at the first layer. At the
service layer, fewer tests should be performed than at the unit test level, but greater than that at
the end-to-end level.

33. Explain Container in Microservices.

Containers are useful technologies for allocating and sharing resources. It is considered the most
effective and easiest method for managing microservice-based applications to develop and deploy
them individually. Using Docker, you may also encapsulate a microservice along with its
dependencies in a container image, which can then be used to roll on-demand instances of the
microservice without any additional work.
34. What is the main role of docker in microservices?

Docker generally provides a container environment, in which any application can be hosted. This is
accomplished by tightly packaging both the application and the dependencies required to support it.
These packaged products are referred to as Containers, and since Docker is used to doing that, they
are called Docker containers. Docker, in essence, allows you to containerize your microservices and
manage these microservices more easily.

Conclusion:

Microservices architecture is a method of developing a large-scale application as a collection of small


autonomous services developed for a business domain. Since its debut in 2011, microservices have
become a popular technology, especially among organizations building forward-thinking
applications. This list of Microservices interview questions was carefully constructed to assist the
development community in their interviews. Hope these Microservices Architect Interview
Questions would be helpful for your interview.

Microservices MCQ

1. Which of the following technologies are commonly used to implement microservices?

Docker

Kubernetes

Both A and B

None of the above

2.Name popular Java Framework that is used to develop microservices.

Spring boot

Spring cloud

Eclipse MicroProfile

Both B and C

Both A and C

3.Which of the following is a disadvantage of using microservice?

Potential for too much granularity

There is a need for complex testing.

Heavy usage can cause latency issues.

All of the above

4.Under which condition the developers should use microservices?

When they want to develop apps for mobile phones that run quickly
When they need to create large, enterprise-level applications that are subject to frequent
changes

When they want to develop scientific test equipment applications

None of the above

5.Which of the following is an advantage of microservices?

Microservice components are capable of independently changing from one another

There is no great expertise required to program them

Their size makes them ideal for developers to write powerful ones in a few lines of code

None of the above

6.Which of the following best defines a microservice architecture?

An architecture commonly used in functional programming and object-oriented programming

A small program that usually represents discrete logic that executes within dedicated hardware
or well-defined boundary

A code fragment that doesn't exceed 10 lines of code

An application designed for enterprise systems based on a loosely coupled component


architecture

7.Which of the following best defines the term “bounded context” in microservices?

Cloud provider's region in which the microservice operates

A logic domain that is usually represented by the data consumed and emitted by a microservice
based on its purpose, structure, and meaning

Common characteristics among entities belonging to one or more domains of business

None of the above

8.Which of the following enables production-ready features to the spring boot application?

Endpoint

Actuators

Boot

None of the above

9.Features of OAuth include__.

It is an Authorization Framework
It has scoped access

It can be used for HTTP APIs

All of the above

10.Features of Docker include__.

Version Control

Placement/Affinity

Easy Modeling

All of the above

Microservices Interview Questions and Answers for Freshers

1) Explain Microservices Architecture

Microservice Architecture is an architectural development style which builds an application as a


collection of small autonomous services developed for a business domain.

Let’s take an example of e-commerce application developed with microservice architecture. In this
Microservices architecture example, each microservice is focused on single business capability.
Search, Rating & Review and Payment each have their instance (server) and communicate with each
other.

2) Name three commonly used tools for Microservices

1.) WireMock, 2.) Docker and 3.) Hystrix are important Microservices tool.

Microservices Architecture
3) What is Monolithic Architecture?

Monolithic architecture is like a big container in which all the software components of an application
are clubbed inside a single package.

Let’s discuss an example of an eCommerce store in context of a Monolithic architecture.

Monolithic Architecture of eCommerce Application

In any e-commerce application, there are some standard features like Search, Review & Ratings, and
Payments. These features are accessible to customers using their browser or apps. When the
developer of the eCommerce site deploys the application, it is a single Monolithic unit. The code for
different features like Search, Review & Ratings, and Payments are on the same server. To scale the
application, you need to run multiple instances(servers) of these applications.

4) What are the advantages of microservices?

Here, are some significant advantages of using Microservices:

• Technology diversity, e., Microservices can mix easily with other frameworks, libraries, and
databases

• Fault isolation, e., a process failure should not bring the whole system down.

• Greater support for smaller and parallel team

• Independent deployment

• Deployment time reduce


5) What is Spring Cloud?

Spring cloud is an Integration software that integrates with external systems. It allows microservices
framework to build applications which perform restricted amounts of data processing.

6) Discuss uses of reports and dashboards in the environment of Microservices

Reports and dashboards help in monitoring and upkeep of Microservices. Tons of Application
Monitoring Tools assist in this.

7) What are main differences between Microservices and Monolithic Architecture?

Microservices Monolithic Architecture

Service Startup is fast Service startup takes time

Monolithic architecture is mostly tightly


Microservices are loosely coupled architecture.
coupled.

Changes done in a single data model does not affect other Any changes in the data model affect the entire
Microservices. database

Monolithic put emphasize over the whole


Microservices focuses on products, not projects
project

8) What are the challenges faced while using Microservices?

• Microservices always rely on each other. Therefore, they need to communicate with each
other.

• As it is distributed system, it is a heavily involved model.

• If you are using Microservice architecture, you need to ready for operations overhead.

• You need skilled professionals to support heterogeneously distributed microservices.


9) In which cases microservice architecture best suited?

Microservice architecture is best suited for desktop, web, mobile devices, Smart TVs, Wearable, etc.

AD

10) Tell me the name of some famous companies which are using Microservice architecture

Most large-scale websites like Twitter, Netflix, Amazon, have advanced from a monolithic
architecture to a microservices architecture.

Microservices Interview Questions for Experienced

11) What are the characteristics of Microservices?

• Essential messaging frameworks

• Decentralized Governance

• Easy Infrastructure automation

• Design for failure

• Infrastructure automation

12) What is RESTful?

Representational State Transfer (REST)/RESTful web services is an architectural style that helps
computer systems to communicate over the internet. These web services make microservices easier
to understand and implement.

13) Explain three types of Tests for Microservices?

In Microservice architecture tests are divided into three broad categories:

• At the bottom level test, we can perform a general test like performance and unit tests.
These kinds of tests are entirely automated.

• At the middle level, we can perform exploratory tests like the stress tests and usability tests.

• At the top level, we can conduct acceptance tests which are mostly fewer in numbers. It also
helps stakeholders to know about different software features.

14) What are Client certificates?

Client certificates is a digital certificate used to make authenticated requests to a remote server. It is
termed as a client certificate.
15) Explain the use of PACT in Microservices architecture?

It is an open source tool which allows testing interactions between service providers and consumers.
However, it is separated from the contract made. This increases the reliability of the Microservices
applications.

16) What is the meaning of OAuth?

OAuth means open authorization protocol. This protocol allows you to access the client applications
on HTTP for third-party providers GitHub, Facebook, etc. It helps you to share resources stored on
one site with another site without the need for their credentials.

17) What is End to End Microservices Testing?

End-to-end testing validates every process in the workflow is functioning correctly. It also ensures
that the system works together as a whole and satisfies all requirements.

18) Why are Container used in Microservices?

Containers are easiest and effective method to manage the microservice based application. It also
helps you to develop and deploy individually. Docker also allows you to encapsulate your
microservice in a container image along with its dependencies. Microservice can use these elements
without additional efforts.

19) What is the meaning of Semantic monitoring in Microservices architecture?

Semantic monitoring combines automated tests with monitoring of the application. It allows you to
find out reasons why your business is not getting more profits.

20) What is a CDC?

CDC is Consumer-Driven Contract. It is a pattern for developing Microservices so that external


systems can use them.

Microservices Interview Questions for 10+ Years Experience

21) What is the use of Docker?

Docker offers a container environment which can be used to host any application. This software
application and the dependencies that support it which are tightly-packaged together.

AD

22) What are Reactive Extensions in Microservices?


Reactive Extensions is also called Rx. It is a design pattern which allows collecting results by calling
multiple services and then compile a combined response. Rx is a popular tool in distributed systems
which works exactly opposite to legacy flows.

23) Explain the term ‘Continuous Monitoring.’

Continuous monitoring is a method which is used for searching compliance and risk issues associated
with a company’s operational and financial environment. It contains human, processes, and working
systems which support efficient and actual operations.

24) How independent micro-services communicate with each other?

It depends upon your project needs. However, in most cases, developers use HTTP/REST with JSON
or Binary protocol. However, they can use any communication protocol.

Q1. List down the advantages of Microservices Architecture.

Advantages of Microservices Architecture

Advantage Description

Independent All microservices can be easily developed based on their individual


Development functionality

Independent
Based on their services, they can be individually deployed in any application
Deployment

Even if one service of the application does not work, the system still continues
Fault Isolation
to function

Different languages and technologies can be used to build different services


Mixed Technology Stack
of the same application

Individual components can scale as per need, there is no need to scale all
Granular Scaling
components together

Q2. What do you know about Microservices?

• Microservices, aka Microservice Architecture, is an architectural style that structures an


application as a collection of small autonomous services, modeled around a business
domain.

• In layman terms, you must have seen how bees build their honeycomb by aligning hexagonal
wax cells.
• They initially start with a small section using various materials and continue to build a large
beehive out of it.

• These cells form a pattern resulting in a strong structure which holds together a particular
section of the beehive.

• Here, each cell is independent of the other but it is also correlated with the other cells.

• This means that damage to one cell does not damage the other cells, so, bees can
reconstruct these cells without impacting the complete beehive.

Fig 1: Beehive Representation of Microservices – Microservices Interview Questions

Refer to the above diagram. Here, each hexagonal shape represents an individual service
component. Similar to the working of bees, each agile team builds an individual service component
with the available frameworks and the chosen technology stack. Just as in a beehive, each service
component forms a strong microservice architecture to provide better scalability. Also, issues with
each service component can be handled individually by the agile team with no or minimal impact on
the entire application.

Q3. What are the features of Microservices?

Fig 3: Features of Microservices – Microservices Interview Questions


• Decoupling – Services within a system are largely decoupled. So the application as a whole
can be easily built, altered, and scaled

• Componentization – Microservices are treated as independent components that can be


easily replaced and upgraded

• Business Capabilities – Microservices are very simple and focus on a single capability

• Autonomy – Developers and teams can work independently of each other, thus increasing
speed

• Continous Delivery – Allows frequent releases of software, through systematic automation


of software creation, testing, and approval

• Responsibility – Microservices do not focus on applications as projects. Instead, they treat


applications as products for which they are responsible

• Decentralized Governance – The focus is on using the right tool for the right job. That means
there is no standardized pattern or any technology pattern. Developers have the freedom to
choose the best useful tools to solve their problems

• Agility – Microservices support agile development. Any new feature can be quickly
developed and discarded again

Q4. What are the best practices to design Microservices?

The following are the best practices to design microservices:

Fig 4: Best Practices to Design Microservices – Microservices Interview Questions

Q5. How does Microservice Architecture work?

A microservice architecture has the following components:


Fig 5: Architecture of Microservices – Microservices Interview Questions

• Clients – Different users from various devices send requests.

• Identity Providers – Authenticates user or clients identities and issues security tokens.

• API Gateway – Handles client requests.

• Static Content – Houses all the content of the system.

• Management – Balances services on nodes and identifies failures.

• Service Discovery – A guide to find the route of communication between microservices.

• Content Delivery Networks – Distributed network of proxy servers and their data centers.

• Remote Service – Enables the remote access information that resides on a network of IT
devices.

Q6. What are the pros and cons of Microservice Architecture?

Pros of Microservice Architecture Cons of Microservice Architecture

Freedom to use different technologies Increases troubleshooting challenges

Each microservices focuses on single capability Increases delay due to remote calls

Increased efforts for configuration and other


Supports individual deployable units
operations

Allow frequent software releases Difficult to maintain transaction safety

Ensures security of each service Tough to track data across various boundaries

Mulitple services are parallelly developed and


Difficult to code between services
deployed
Q7. What is the difference between Monolithic, SOA and Microservices Architecture?

Fig 6: Comparison Between Monolithic SOA & Microservices – Microservices Interview Questions

• Monolithic Architecture is similar to a big container wherein all the software components of
an application are assembled together and tightly packaged.

• A Service-Oriented Architecture is a collection of services which communicate with each


other. The communication can involve either simple data passing or it could involve two or
more services coordinating some activity.

• Microservice Architecture is an architectural style that structures an application as a


collection of small autonomous services, modeled around a business domain.

Q8. What are the challenges you face while working Microservice Architectures?

Developing a number of smaller microservices sounds easy, but the challenges often faced while
developing them are as follows.

• Automate the Components: Difficult to automate because there are a number of smaller
components. So for each component, we have to follow the stages of Build, Deploy and,
Monitor.

• Perceptibility: Maintaining a large number of components together becomes difficult to


deploy, maintain, monitor and identify problems. It requires great perceptibility around all
the components.

• Configuration Management: Maintaining the configurations for the components across the
various environments becomes tough sometimes.

• Debugging: Difficult to find out each and every service for an error. It is essential to maintain
centralized logging and dashboards to debug problems.

Q9. What are the key differences between SOA and Microservices Architecture?

The key differences between SOA and microservices are as follows:

SOA Microservices
Follows “share-as-much-as-possible” architecture Follows “share-as-little-as-possible” architecture
approach approach

Importance is on business functionality reuse Importance is on the concept of “bounded context”

They focus on people collaboration and freedom of


They have common governance and standards
other options

Uses Enterprise Service bus (ESB) for


Simple messaging system
communication

They use lightweight protocols such


They support multiple message protocols
as HTTP/REST etc.

Single-threaded usually with the use of Event Loop


Multi-threaded with more overheads to handle I/O
features for non-locking I/O handling

Maximizes application service reusability Focuses on decoupling

Traditional Relational Databases are more often


Modern Relational Databases are more often used
used

A systematic change requires modifying the


A systematic change is to create a new service
monolith

DevOps / Continuous Delivery is becoming popular,


Strong focus on DevOps / Continuous Delivery
but not yet mainstream

Q10. What are the characteristics of Microservices?

You can list down the characteristics of microservices as follows:

Fig 7: Characteristics of Microservices – Microservices Interview Questions

You may go through this recording of Microservices Interview Questions and Answers where our
instructor has explained the topics in a detailed manner with examples that will help you to
understand this concept better.

Microservices Interview Questions and Answers in 2022 | Edureka

Q11. Name three commonly used tools for Microservices


The three commonly used tools for Microservices are:

Docker: Docker is a tool that lets developers set up apps in lightweight, portable containers in an
automated way. It helps put the microservices and their dependencies into containers. This makes
sure that the microservices are the same in all environments and makes it easier to launch and grow
them.

Kubernetes: Kubernetes is a powerful tool for managing, scaling, and automating the launch of
Docker containers. It does this by orchestrating how containers work together. It has important tools
for running microservices in a live setting, such as load balancing, service discovery, self-healing, and
automatic scaling.

Spring Boot: Spring Boot is a famous platform built on Java that makes it easier to build and launch
microservices. It has features like built-in web servers, auto-configuration, and measures that are
ready for production, which make it easier for developers to build, test, and launch microservices.

Q12. What is Monolithic Architecture?

Monolithic architecture is a traditional way of making software, in which all of an application’s parts
and functions are tightly tied together and packaged as a single unit. In a monolithic program, the
user interface, business logic, and data access layer all live in the same codebase and are delivered
as a single unit. In the early days of software creation, this method was often used.

Key characteristics of a Monolithic Architecture:

1. Single Codebase: The entire application is developed and maintained within a single code
repository.

2. Tight Coupling : Components and modules within the application are tightly interconnected,
making it difficult to modify or replace individual parts without impacting the entire system.

3. Scalability Challenges : Scaling a monolithic application can be challenging as all


components need to be scaled together, even if only a specific part requires more resources.

4. Monolithic Deployment : The application is deployed as a whole, which can lead to longer
deployment cycles and increased downtime during updates.

5. Technology Stack : Monolithic applications often use a uniform technology stack for the
entire system.

6. Development and Testing : The development and testing of monolithic applications can
become complex and time-consuming as the codebase grows.

7. Failure Impact : A failure in one component can potentially bring down the entire
application.

Even though monolithic design has some problems, it has been used successfully for many years,
especially for smaller applications and projects that aren’t too big or complicated. But as applications
get bigger and more complicated and as the need for faster development processes and better
scalability grows, monolithic design can become limited. This led to the rise of microservices design,
in which systems are broken up into smaller, loosely connected services that can be built, deployed,
and scaled separately.
Q13. In a Microservices setting, how useful are reports and dashboards?

In a Microservices setting, reports and dashboards are incredibly useful and often vital for the
effective operation and management of the distributed system. Here are some reasons why reports
and dashboards are essential in a Microservices environment:

1. Visibility into Microservices : Microservices design can be made up of many different


services, each of which is responsible for a different set of functions. Reports and
dashboards give a consolidated view of these services, making it easier for devs,
management teams, and users to track and understand the health and performance of the
system as a whole.

2. Service Monitoring and Debugging : Reports and graphs let you keep an eye on the
response times, mistake rates, and resource usage of each microservice in real time. This
makes it easier to find speed problems, bottlenecks, and errors in individual services and fix
them quickly.

3. End-to-End System Performance : Dashboards show how a program works as a whole,


including how the microservices work together. This end-to-end view makes it easier to find
problems caused by exchanges between services and makes sure that services work well
together.

4. Scalability and Resource Management :Monitoring how each microservice uses its
resources helps with capacity planning and making the best use of resources. Reports and
tools help teams find services that need more resources and change them so they can
handle more traffic.

5. Alerting and Incident Response : Dashboards can be set up to send alerts based on
predetermined limits, which makes it possible to respond to incidents in a timely manner.
Teams can get alerts in real time, which lets them act right away when important events or
service breakdowns happen.

6. Versioning and Deployment Analysis : When updates or changes are made to microservices,
reports and graphs can help compare how well the different versions of the service work.
This lets teams figure out how changes will affect things and make sure deployments go
smoothly and work well.

7. Business Metrics and Decision Making : Metrics that are important to a business, like user
interaction, sales, and conversion rates, can be shown in reports and screens. These insights
help stakeholders make choices based on data, understand how microservices affect
business performance, and decide which changes to make first.

8. Security and Compliance Monitoring : Centralizing security logs and data in reports and
dashboards makes it easier to find and deal with possible security risks and make sure that
security policies are being followed.

9. User Behavior Analysis : Analyzing user interactions with various microservices gives
significant information into user behavior and preferences. This knowledge helps improve
the user experience and make services fit the wants of the user.

Overall, reports and dashboards are very important in a Microservices setting because they provide
clarity, track system success, and make it easier to make good decisions. They make it easier to see
what’s going on and let teams react to problems before they happen. This makes microservices-
based apps more stable, scalable, and reliable.

Q14.Tell me the name of some famous companies which are using Microservice architecture.

There are several famous companies that have adopted the Microservices architecture to build their
applications and services. Some of these companies include:

1. Netflix : Netflix is a well-known entertainment streaming platform that heavily relies on


Microservices architecture. It uses hundreds of individual microservices to handle different
aspects of its platform, such as user authentication, content recommendation, and video
streaming.

2. Amazon : Amazon, one of the largest e-commerce and cloud computing companies in the
world, has adopted a Microservices approach for various services, including Amazon Prime,
AWS (Amazon Web Services), and other online retail functionalities.

3. Uber : Uber, the popular ride-hailing service, employs Microservices architecture to manage
its vast and complex operations, which include real-time location tracking, ride dispatching,
payment processing, and more.

4. Twitter : Twitter, the social media platform, has shifted to a Microservices architecture to
handle its millions of users, tweets, and real-time interactions efficiently.

5. Spotify : Spotify, the music streaming service, employs Microservices architecture to


manage its vast music library, user preferences, and personalized playlists.

6. Google : Google, the multinational technology company, uses Microservices for various
products and services, including Google Search, Gmail, and Google Maps.

7. LinkedIn : LinkedIn, the professional networking platform, utilizes Microservices architecture


to manage user profiles, job listings, and networking features.

8. eBay : eBay, the popular online marketplace, has adopted Microservices architecture to
handle its extensive product catalog, user accounts, and payment processing.

9. PayPal : PayPal, the digital payment platform, uses Microservices to manage transactions,
user accounts, and security features.

10. Airbnb : Airbnb, the online hospitality service, employs Microservices to handle booking
management, search functionality, and user reviews.

It’s important to remember that a company’s use of Microservices design can change, and some
parts of their systems may still be built with other methods. Also, the technology world is always
changing, so new companies may have started using Microservices design since the last time I wrote
about it.

Q11. What is Domain Driven Design?


Fig 8: Principles of DDD – Microservices Interview Questions

Q12. Why there is a need for Domain Driven Design (DDD)?

Fig 9: Factors Why we need DDD – Microservices Interview Questions

Q13. What is Ubiquitous language?

If you have to define the Ubiquitous Language (UL), then it is a common language used by
developers and users of a specific domain through which the domain can be explained easily.

The ubiquitous language has to be crystal clear so that it brings all the team members on the same
page and also translates in such a way that a machine can understand.

Q14. What is Cohesion?

The degree to which the elements inside a module belong together is said to be cohesion.

Q15. What is Coupling?

The measure of the strength of the dependencies between components is said to be coupling. A
good design is always said to have High Cohesion and Low Coupling.

Subscribe to our youtube channel to get new updates..!

Q16. What is REST/RESTful and what are its uses?

Representational State Transfer (REST)/RESTful web services are an architectural style to help
computer systems communicate over the internet. This makes microservices easier to understand
and implement.

Microservices can be implemented with or without RESTful APIs, but it’s always easier to build
loosely coupled microservices using RESTful APIs.
Q17. What do you know about Spring Boot?

It’s a knows fact that spring has become more and more complex as new functionalities have been
added. If you have to start a new spring project, then you have to add build path or add maven
dependencies, configure application server, add spring configuration. So everything has to be done
from scratch.

Spring Boot is the solution to this problem. Using spring boot you can avoid all the boilerplate code
and configurations. So basically consider yourself as if you’re baking a cake spring is like the
ingredients that are required to make the cake and spring boot is the complete cake in your hand.

Fig 10: Factors of Spring Boot – Microservices Interview Questions

Q18. What is an actuator in Spring boot?

Spring Boot actuator provides restful web services to access the current state of running an
application in the production environment. With the help of actuator, you can check various metrics
and monitor your application.

Q19. What is Spring Cloud?

According to the official website of Spring Cloud, Spring Cloud provides tools for developers to
quickly build some of the common patterns in distributed systems (e.g. configuration management,
service discovery, circuit breakers, intelligent routing, leadership election, distributed sessions,
cluster state).

Q20. What problems are solved by Spring Cloud?

While developing distributed microservices with Spring Boot we face few issues which are solved by
Spring Cloud.

• The complexity associated with distributed systems – This includes network issues, Latency
overhead, Bandwidth issues, security issues.

• Ability to handle Service Discovery – Service discovery allows processes and services in a
cluster to find each other and communicate.

• Solved redundancy issues – Redundancy issues often occur in distributed systems.

• Load balancing – Improves the distribution of workloads across multiple computing


resources, such as a computer cluster, network links, central processing units.
• Reduces performance issues – Reduces performance issues due to various operational
overheads.

Q21. What is the use of WebMvcTest annotation in Spring MVC applications?

WebMvcTest annotation is used for unit testing Spring MVC Applications in cases where the test
objective is to just focus on Spring MVC Components. In the snapshot shown above, we want to
launch only the ToTestController. All other controllers and mappings will not be launched when this
unit test is executed.

Q22. Can you give a gist about Rest and Microservices?

REST

Though you can implement microservices in multiple ways, REST over HTTP is a way to implement
Microservices. REST is also used in other applications such as web apps, API design, and MVC
applications to serve business data.

Microservices

Microservices is an architecture wherein all the components of the system are put into
individual components, which can be built, deployed, and scaled individually. There are certain
principles and best practices of Microservices that help in building a resilient application.

In a nutshell, you can say that REST is a medium to build Microservices.

Q23. What are different types of Tests for Microservices?

While working with microservices, testing becomes quite complex as there are multiple
microservices working together. So, tests are divided into different levels.

• At the bottom level, we have technology-facing tests like- unit tests and performance tests.
These are completely automated.

• At the middle level, we have tests for exploratory testing like the stress tests and usability
tests.

• At the top level, we have acceptance tests that are few in number. These acceptance tests
help stakeholders in understanding and verifying software features.

Q24. What do you understand by Distributed Transaction?

Distributed Transaction is any situation where a single event results in the mutation of two or more
separate sources of data which cannot be committed atomically. In the world of microservices, it
becomes even more complex as each service is a unit of work and most of the time multiple services
have to work together to make a business successful.

Q25. What is an Idempotence and where it is used?

Idempotence is the property of being able to do something twice in such a way that the end result
will remain the same i.e. as if it had been done once only.
Usage: Idempotence is used at the remote service, or data source so that, when it receives the
instruction more than once, it only processes the instruction once.

Q26. What is Bounded Context?

Bounded Context is a central pattern in Domain-Driven Design. It is the focus of DDD’s strategic
design section which is all about dealing with large models and teams. DDD deals with large models
by dividing them into different Bounded Contexts and being explicit about their inter-relationships.

Q27. What is Two Factor Authentication?

Two-factor authentication enables the second level of authentication to an account log-in process.

Fig11: Representation of Two Factor Authentication – Microservices Interview Questions

So suppose a user has to enter only username and password, then that’s considered a single-factor
authentication.

Q28. What are the types of credentials of Two Factor Authentication?

The three types of credentials are:

Fig 12: Types of Credentials of Two Factor Authentication – Microservices Interview Questions

Q29. What are Client certificates?

A type of digital certificate that is used by client systems to make authenticated requests to a
remote server is known as the client certificate. Client certificates play a very important role in many
mutual authentication designs, providing strong assurances of a requester’s identity.
Q30. What is the use of PACT in Microservices architecture?

PACT is an open source tool to allow testing interactions between service providers and consumers
in isolation against the contract made so that the reliability of Microservices integration increases.

Usage in Microservices:

• Used to implement Consumer Driven Contract in Microservices.

• Tests the consumer-driven contracts between consumer and provider of a Microservice.

Q31. What is OAuth?

OAuth stands for open authorization protocol. This allows accessing the resources of the resource
owner by enabling the client applications on HTTP services such as third-party providers Facebook,
GitHub, etc. So with this, you can share resources stored on one site with another site without using
their credentials.

Q32. What is Conway’s law?

“Any organization that designs a system (defined broadly) will produce a design whose structure is a
copy of the organization’s communication structure.” – Mel Conway

Fig 13: Representation of Conway’s Law – Microservices Interview Questions

This law basically tries to convey the fact that, in order for a software module to function, the
complete team should communicate well. Therefore the structure of a system reflects the social
boundaries of the organization(s) that produced it.

Q33. What do you understand by Contract Testing?

According to Martin Flower, contract test is a test at the boundary of an external service which
verifies that it meets the contract expected by a consuming service.

Also, contract testing does not test the behavior of the service in depth. Rather, it tests that the
inputs & outputs of service calls contain required attributes and the response latency,
throughput is within allowed limits.

Q34. What is End to End Microservices Testing?

End-to-end testing validates each and every process in the workflow is functioning properly. This
ensures that the system works together as a whole and satisfies all requirements.

In layman terms, you can say that end to end testing is a kind of tests where everything is tested
after a particular period.
Fig 14: Hierarchy of Tests – Microservices Interview Questions

Q35. What is the use of Container in Microservices?

Containers are a good way to manage microservice based application to develop and deploy them
individually. You can encapsulate your microservice in a container image along with its
dependencies, which then can be used to roll on-demand instances of microservice without any
additional efforts required.

Fig 15: Representation of Containers and How they are used in Microservices – Microservices
Interview Questions

Q36. What is DRY in Microservices architecture?

DRY stands for Don’t Repeat Yourself. It basically promotes the concept of reusing the code. This
results in developing and sharing the libraries which in turn result in tight coupling.

Q37. What is a Consumer-Driven Contract (CDC)?


This is basically a pattern for developing Microservices so that they can be used by external systems.
When we work on microservices, there is a particular provider who builds it and there are one or
more consumers who use Microservice.

Generally, providers specify the interfaces in an XML document. But in Consumer Driven Contract,
each consumer of service conveys the interface expected from the Provider.

Q38. What is the role of Web, RESTful APIs in Microservices?

A microservice architecture is based on a concept wherein all its services should be able to interact
with each other to build a business functionality. So, to achieve this, each microservice must have an
interface. This makes the web API a very important enabler of microservices. Being based on the
open networking principles of the Web, RESTful APIs provide the most logical model for building
interfaces between the various components of a microservice architecture.

Q39. What do you understand by Semantic monitoring in Microservices architecture?

Semantic monitoring, also known as synthetic monitoring combines automated tests with
monitoring the application in order to detect business failing factors.

Q40. How can we perform Cross-Functional testing?

Cross-functional testing is a verification of non-functional requirements, i.e. those requirements


which cannot be implemented like a normal feature.

Q41. How can we eradicate non-determinism in tests?

Non-Deterministic Tests (NDT) are basically unreliable tests. So, sometimes it may happen that
they pass and obviously sometimes they may also fail. As and when they fail, they are made to re-
run to pass.

Some ways to remove non-determinism from tests are as follows:

1. Quarantine

2. Asynchronous

3. Remote Services

4. Isolation

5. Time

6. Resource leaks

Q42. What is the difference between Mock or Stub?

Stub

• A dummy object that helps in running the test.

• Provides fixed behavior under certain conditions which can be hard-coded.

• Any other behavior of the stub is never tested.

For example, for an empty stack, you can create a stub that just returns true for empty() method. So,
this does not care whether there is an element in the stack or not.
Mock

• A dummy object in which certain properties are set initially.

• The behavior of this object depends on the set properties.

• The object’s behavior can also be tested.

For example, for a Customer object, you can mock it by setting name and age. You can set age as 12
and then test for isAdult() method that will return true for age greater than 18. So, your Mock
Customer object works for the specified condition.

Q43. What do you know about Mike Cohn’s Test Pyramid?

Mike Cohn provided a model called Test Pyramid. This describes the kind of automated tests
required for software development.

Fig 16: Mike Cohn’s Test Pyramid – Microservices Interview Questions

As per pyramid, the number of tests at first layer should be highest. At service layer, the number of
tests should be less than at the unit test level, but more than at the end-to-end level.

Q44. What is the purpose of Docker?

Docker provides a container environment that can be used to host any application. In this, the
software application and the dependencies which support it are tightly-packaged together.

So, this packaged product is called a Container and since it is done by Docker, it is called Docker
container!

Q45. What is Canary Releasing?

Canary Releasing is a technique to reduce the risk of introducing a new software version in
production. This is done by slowly rolling out the change to a small subset of users before giving it
out to the entire infrastructure, i.e. making it available to everybody.
Q46. What do you mean by Continuous Integration (CI)?

Continuous Integration (CI) is the process of automating the build and testing of code every time a
team member commits changes to version control. This encourages developers to share code and
unit tests by merging the changes into a shared version control repository after every small task
completion.

Q47. What is Continuous Monitoring?

Continuous monitoring gets into the depth of monitoring coverage, from in-browser front-end
performance metrics, through application performance, and down to host virtualized infrastructure
metrics.

Q48. What is the role of an architect in Microservices architecture?

An architect in microservices architecture plays the following roles:

• Decides broad strokes about the layout of the overall software system.

• Helps in deciding the zoning of the components. So, they make sure components are
mutually cohesive, but not tightly coupled.

• Code with developers and learn the challenges faced in day-to-day life.

• Make recommendations for certain tools and technologies to the team developing
microservices.

• Provide technical governance so that the teams in their technical development follow
principles of Microservice.

Q49. Can we create State Machines out of Microservices?

As we know that each Microservice owning its own database is an independently deployable
program unit, this, in turn, lets us create a State Machine out of it. So, we can specify different states
and events for a particular microservice.

For Example, we can define an Order microservice. An Order can have different states. The
transitions of Order states can be independent events in the Order microservice.

Q50. What are Reactive Extensions in Microservices?

Reactive Extensions also are known as Rx. It is a design approach in which we collect results by
calling multiple services and then compile a combined response. These calls can be synchronous or
asynchronous, blocking or non-blocking. Rx is a very popular tool in distributed systems which works
opposite to legacy flows.

Q55. Explain the term Eureka in Microservices.

Eureka is a key component of microservice architecture because it makes it easy to scale and
manage microservices. Without Eureka, each microservice would need to know the location of all
the other microservices it needs to communicate with. This would make it difficult to scale
microservices because you would need to update the configuration of each microservice whenever
you added or removed a microservice.

Eureka also makes it easy to failover to a different microservice if one fails. When a microservice
registers with Eureka, it provides a list of other microservices that it depends on. If the microservice
fails, Eureka will remove it from the registry, and other microservices will be notified. The other
microservices can then failover to a different microservice that provides the same functionality.

To call microservices from the Eureka server, you can use the Eureka client library. The Eureka client
library will query the Eureka registry to find the location of the microservice you want to call. Once it
has the location of the microservice, it will make a call to the microservice.

Here are some of the benefits of using Eureka in microservices:

• Easy scalability: Eureka makes it easy to scale microservices because you don’t need to
update the configuration of each microservice when you add or remove a microservice.

• Fault tolerance: Eureka makes it easy to failover to a different microservice if one


microservice fails.

• Centralized management: Eureka provides a centralized way to manage microservices. You


can use Eureka to view the status of all your microservices and manage their configuration.

Q56. Explain the way to implement service discovery in a microservices architecture.

Implementing service discovery in a Microservices architecture involves setting up a service registry


and configuring individual Microservices to register themselves with the registry. Clients can then
query the service registry to discover the locations of the services they need to communicate with.
Here’s a step-by-step guide to implementing service discovery in a Microservices environment:

1. Choose a Service Registry: Select a service registry tool that fits your technology stack and
requirements. Some popular service registry options are Eureka (by Netflix), Consul, etc.,
and ZooKeeper. Each has its strengths and features, so choose the one that best suits your
needs.

2. Set Up the Service Registry: Install and configure the chosen service registry tool. In a
distributed Microservices architecture, it’s good practice to set up multiple instances of the
service registry for redundancy and fault tolerance.

3. Service Registration: In each Microservice, add code to register with the service registry
when it starts up. This registration process typically involves sending essential metadata
such as the service name, instance ID, host, port, and health status to the service registry.

4. Health Checks: Implement health checks in each Microservice. Periodically, the Microservice
sends heartbeats or health check status to the service registry to indicate its availability and
health. If a service fails health checks, it is automatically removed from the registry.

5. Service Discovery: Clients that need to interact with specific Microservices will query the
service registry for the locations of those services. The service registry responds with the
available instances of the requested service, along with their metadata.

6. Load Balancing (Optional): To achieve better performance and resource utilization, clients
can use load balancing strategies when interacting with Microservices. They can distribute
incoming requests across available instances of the service retrieved from the service
registry.
7. Client-Side Discovery and Circuit Breakers: Implement client-side discovery to allow the
clients to handle service location and load balancing themselves. Additionally, consider using
circuit breakers to prevent cascading failures when interacting with services.

8. Resilience and High Availability: For high availability and fault tolerance, deploy multiple
instances of the service registry and use a peer-to-peer communication model. This ensures
that even if some instances fail, others can continue serving requests.

9. Monitoring and Alerting: Implement monitoring and alerting for the service registry and
Microservices. Monitor the health of service instances and the registry itself, and set up
alerts for any anomalies or failures.

By putting service discovery in place in a Microservices design, you make it possible for services to
talk to each other in a dynamic and seamless way. This promotes loose coupling and scaling. Service
discovery makes it easier to launch, scale, and handle Microservices. This means that the system can
adapt to changes in the service landscape without having to be manually reconfigured or have
service endpoints hardcoded.

Q57. What are the 3 C’s of microservices?

The “Three C’s” of Microservices refer to three essential principles or characteristics that are often
associated with Microservices architecture. These principles help guide the design and development
of Microservices-based applications to ensure their effectiveness and success. The Three C’s are:

1. Componentization: This concept says that a monolithic program should be broken up into
smaller parts, called Microservices, that can be deployed and managed on their own. Each
Microservice is in charge of a certain business capability or function, which gives teams the
freedom to build, test, and launch them on their own. Componentization encourages a
modular and independent architecture, which makes the program easier to manage and
grow.

2. Communication: In a Microservices design, it’s important for services to talk to each other
so that the whole system works well. Services talk to each other through well-defined APIs,
which often use lightweight protocols like HTTP/REST or message systems like Kafka or
RabbitMQ. Communication patterns must be designed in a way that allows free linking and
flexibility, so that services can change on their own without affecting the whole system.

3. Containerization: Containerization is the process of putting apps and the things they need
into separate containers, like Docker containers. Containers provide a consistent and
portable setting that makes sure Microservices run the same way on different devices and
environments. Containerization makes it easy to launch, scale, and handle Microservices. For
this reason, it is a core part of many Microservices architectures.

These Three C’s—Componentization, Communication, and Containerization—help organizations


adopt a Microservices architecture successfully. They promote flexibility, scalability, and
maintainability, allowing development teams to build complex and distributed applications that can
evolve and adapt to changing business needs efficiently.

Q58. Explain Microservices in layman terms.

Microservices is an architectural approach where a large application is divided into small,


independent services that communicate with each other, enabling flexibility, scalability, and faster
development.

You might also like