Six Advantages of Microservices: White Paper
Six Advantages of Microservices: White Paper
Six Advantages
of Microservices
White Paper
Six Advantages of Microservices | White Paper
Introduction
Microservices are simply a set of software applications microservices. Each station/microservice has expertise
designed for limited scope that work with each other in the respective responsibilities, thus promoting
to form a bigger solution. Each microservice, as the efficiency, consistency, and quality in the workflow
name implies, has minimal capabilities for the sake and the outputs. Contrast that to a manufacturing
of creating a highly modularized overall architecture. environment in which each station is responsible for
A microservices architecture is analogous to a building the entire product itself. That is analogous to a
manufacturing assembly line, where each microservice is monolithic software application that performs all tasks
like a station in the assembly line. Just as each station is within the same process.
responsible for one specific task, the same holds true for
Microservices
Microservices are individual components that work together to deliver an overall solution.
2
Six Advantages of Microservices | White Paper
Linear Pipeline
HTML Data
Final Raw Data
HTML Publish to
Creation Website
HTML Data
Microservices Architecture the last microservice in the series). The output message is
sent in a format that makes the most sense for the given
Requirements microservice, and it is then up to the next microservice in
the flow to know what that message format is, and how
Building your applications and solutions in a to consume it. In general, any microservice only needs to
microservices architecture does not require any write to (at most) one topic, since multiple downstream
specialized knowledge or experience. Much of the microservices can independently read from that same
strategy will sound familiar, and again leverages topic without conflict.
concepts like modularity
that you have likely practiced Microservices Messages
before. Certainly, inter-
microservice communication is M1 M2 M3
a key part of the architecture,
and REST services are
commonly used for data
exchange. However, an Topic 0
increasingly popular design Topic 1
Topic 2
pattern for data exchange that Topic 3
4
Six Advantages of Microservices | White Paper
IMDGs also include topics as data structures, similar to Other technologies can be used for microservices
Kafka, which you can use to pass messages between messaging but are far from ideal. File systems and
microservices. There are other data structures that can databases (either RDBMS or NoSQL) can be used, which
be used for messaging in IMDGs, such as maps (i.e., data are sometimes implemented as REST services, but they
structures that act like a key/value store), but for the suffer from a significant performance disadvantage
sake of simplicity, our discussion will center on topics. In versus the technologies described above. Plus, the
addition to speed, another advantage for using IMDGs coding and administrative overhead to use these
for microservices is that you can leverage more data systems as a messaging system make them far from
structures for your microservices to store and retrieve ideal for an otherwise agile-focused microservices
data beyond messages. The IMDG acts like a database architecture. Certainly, these technologies have been
that provides lookup data for stream enrichment, and used for earlier generations of microservices, but
also can store data to track state for your microservices. application developers are recognizing the need for
better suited technologies to ensure the performance
By using a message bus as the messaging layer in a
levels and maintainability they seek.
microservices architecture, it makes sense to also use
a stream processing engine (like Hazelcast Jet) to
build the microservices. This is only one example of a
technology you can use, as microservices are actually
great for supporting any technology for coding the
business logic, as we’ll discuss later in this paper.
Microservices Messages
Other Data
M1 M2 M3
Topic 0
Topic 1
Topic 2
Topic 3
5
Six Advantages of Microservices | White Paper
6
Six Advantages of Microservices | White Paper
A microservices architecture also enables you to to be simple. They can be deployed on-premises, in
take advantage of a wider talent pool, because the cloud, at the edge, in virtualized environments
each microservice can be based on almost any (especially Docker containers), in serverless
programming language and environment, independent environments, on one node, or on a cluster of nodes. In
of all the others. There is no requirement on how fact, microservices can be deployed in several different
each microservice is built. You can choose the most locations as part of the same overarching applications to
appropriate technology stack for each microservice. take advantage of any of your available resources.
Separate application development teams with different
You can also deploy new versions of microservices
skills can work together on a microservices architecture
without waiting for updates to other microservices. As
without requiring commonality on technologies and
long as your messaging format remains intact, you can
skill level. This also means that you are better able to
redeploy updated versions of microservices without
incorporate newer technologies into your architecture
negatively impacting the rest of your system. If a
in the future. Instead of struggling with technology
problem occurs with your new microservice, you can just
standardization across the board, you can incrementally
swap in the prior microservice to get the system fully
leverage new technologies to update only the
running again.
microservices that can be made faster and/or more
efficient. This gives you an opportunity to experiment 3. Microservices Are Easier to Maintain,
with new technologies on a controlled basis to see how Troubleshoot, and Extend
well they may work in other capacities.
Microservices more seamlessly enable ongoing
2. Microservices Are Easier to Deploy maintenance and fault tolerance, which are major
challenges in any large-scale software environment.
Microservices are easier to deploy than monolithic
Troubleshooting is difficult when a problem arises in
applications because they are smaller and thus have
a monolithic application since it is not always obvious
fewer environmental dependencies. One common
how data is processed within the internal workflow.
problem with deploying monolithic applications is
Isolating the source of the problem requires a good
the unknown discrepancies between development
understanding of the entire code base. On the
environments and production environments. There
other hand, since each microservice has its own set
are dependencies on OS versions, library versions,
of outputs, it is easier to identify which output has
the amount of RAM, etc., and if you have a complex
an issue, and therefore, which microservice needs
application with many dependencies, you may
attention. For example, if you discover that the
encounter deployment problems that are difficult to
final calculations in a microservice-based system are
pinpoint. If you deploy microservices in an incremental
incorrect, you can trace back the lineage of the data
manner, any issues you encounter with each individual
within the system, one microservice at a time, to find
microservice will be easier to track down since their
the problematic calculation. The limited scope of each
smaller scope means they have fewer dependencies.
microservice, plus the fact that microservices make it
The reduction of dependency discrepancies from easy to run automated, standardized test scenarios,
development to production is also a key advantage makes them easier to debug and thus easier to create
of a containerized architecture. The minimalist higher quality code.
nature of individual microservices makes them even
The distributed nature of microservices across multiple
easier to deploy in a container and with other
computer servers and resources helps with fault
virtualized technologies, and doing so lets you further
tolerance strategies to enable 24x7 deployments. Any
reduce the potential for dependency conflicts.
given microservice can be deployed redundantly so that
Combining a container-based deployment with
there is no single source of failure. Each microservice
Kubernetes as the orchestration system further
performs independently of the other instances, and if
simplifies the deployment by efficiently allocating
any fail, the others will pick up the slack. This is another
microservices to available resources.
area where the decoupled messaging layer is valuable,
Microservices are easy to deploy in a variety of as each microservice acts as an independent consumer,
deployment options, again because they are designed so a microservice failure will not disrupt the messaging
7
Six Advantages of Microservices | White Paper
system. Deploying microservices in Docker containers To support this simplification, microservices should
in a Kubernetes cluster also simplifies the maintenance, leverage a lightweight messaging system to let
as Kubernetes can manage some of the fault tolerance microservices communicate, which simplifies the
requirements and restart failed microservices. coordination across development teams. Each
microservice can send messages/data in whatever
Making incremental updates to your application is
format you want, which naturally encourages
easy and relatively low risk due to the highly modular
you to adopt the simplest format possible. There
architecture. You can either plug in updated code to
is no requirement around a universal messaging
improve existing functionality, or you can add new
standard, which ironically tends to complicate future
code to extend your system to provide more outputs.
communication. Once each format is documented,
The decoupling of the messaging layer reduces the risk
the development team of the next microservice in the
of losing data (or other dramatic failures) if the new
pipeline can use that format to accept messages. And
updates are found to be problematic. Even if you need
since each microservice performs a limited task on the
to make sweeping changes to your application, you can
data, there is no need for complicated outputs. The
do so with far less risk than in a monolithic application.
complicated messaging formats of years ago are not
For example, if you change your messaging format in
needed since a comprehensive message does not need
an updated microservice, you can send out both the
to be shared. This simplicity in messaging helps when
old format and the new format at the same time to
the type of information changes. The updates in the
separate topics. The existing microservices that are next
format will likely be simple, thus making it easier for the
in the pipeline will continue using the old format from
next microservice to accommodate those updates.
the original topic, and in the meantime, you can write
an updated microservice that will leverage the new This lightweight messaging pattern helps to avoid
format from the newly added topic. This lets you run old overly complicating the communications topology. Risks
code alongside new code as an extra defensive measure such as those expressed in Conway’s Law, which states
against problems. that your designs will become copies of your team’s
communications structures, still exist, but only if you
And should an unforeseen error occur later, you can
retain a monolith mindset. For example, if you build a
shut down a given task which will temporarily stop the
single large team where each developer believes his/her
flow of data, but the messages will be simply queued up
modules need to integrate with all the others, you end
in the messaging layer and will be read once the task in
up with a complex architecture with many integrations,
question is restored. The message bus ensures all data is
APIs, and data structures throughout. On the other
preserved until all microservices are operational again.
hand, if an architect can define the components of a
4. Microservices Simplify Cross-Team microservices architecture, and then have the team
Coordination leaders define the team structures to reflect the
architecture, you will simplify the effort to implement
One of the challenges of any large-scale software
the system’s communications.
development effort is the risk of over-complicating
the integration points. In a microservice, the internal
workflow can be as simple as reading data from a
source, performing an action on the data, and then
sending outputs to a destination. There is no need for
extensive planning for what data should be shared on
which integration points, as was the case with SOA.
Microservices typically deal with small amounts of
data at a time, so it is easier to manage and share the
output once the data is processed. This simplicity in the
processing and the data scope leads to simplicity in
the handoff.
8
Six Advantages of Microservices | White Paper
9
Six Advantages of Microservices | White Paper
10
Six Advantages of Microservices | White Paper
The second way in which Optane supports in-memory secure way to move core business applications to any
technologies is in the persistent mode. In this mode, cloud environment through an enterprise-ready, cloud-
Optane can be used as a faster alternative to solid state native software stack. Built with Kubernetes on Red
drives (SSDs). For example, Hazelcast provides a hot Hat OpenShift, the Cloud Paks give customers flexibility
restart capability in which in-memory data is persisted and agility to drive digital transformation strategies.
in non-volatile memory so that if a node goes down Hazelcast is included in the Cloud Paks to provide
temporarily, it can be restored quickly by reading data in-memory speeds in a cloud-native framework to all
from the hot restart store. If the hot restart data is applications deployed in the Paks.
stored in Optane in persistence mode, recovery of that
The IBM Edge Application Manager (EAM) extends the
node can be up to 3.5x faster than using SSDs.
reach of business data by enabling computing at the
IBM Cloud Paks and Edge Application edge. Since edge computing typically entails remote,
Manager hard-to-access locations with limited physical space
and thus limited computing power, some of the most
As more businesses pursue cloud strategies around
important factors for a successful deployment are
public, private, multi, or hybrid cloud, the right
efficiency, reliability, and security. Together with IBM
foundational software will help on that journey. Cloud
EAM, Hazelcast provides portable and lightweight
deployments are just one part of an overall distributed
yet powerful in-memory and stream processing
computing system that includes computing at the edge,
technologies to enable edge computing and let
making system deployment more complex.
businesses process, analyze, aggregate, and/or filter
IBM has key initiatives around solving edge-to-cloud data where it is created.
challenges to help businesses get more value out
of their distributed data. With their six Cloud Paks
(Applications, Data, Integration, Automation, Multicloud
Management, Security), IBM provides a faster, more
https://www.facebook.com/hazelcast
All rights reserved.