- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
We'll use an example of an
application to illustrate the differences between Microservice architecture and
Monolithic architecture. Let us take an e-commerce application which
has the purpose of selling products online. In general all applications from
this category require functionalities for browsing through available products,
purchase them and placing orders which are later managed by administrators. And
of course most of the e-commerce websites have some content which must be
easily editable at any time from an administration dashboard.
Monolithic architecture
In
the below diagram it is presented an e-commerce web application built following
a monolithic architecture. As seen in the below diagram the data of the web
application is stored in a single database. Products, website content, orders
placed by customers and inventory information all stored in the same place. The
web application has multiple purposes, first and most important to allow
customers to browse through products and allow them to buy, secondly managing
orders, content and maybe offering customers the possibility to create an
account for managing different settings and subscriptions.
In
this case the application built on a monolithic architecture offers both a web
interface written using HTML, CSS and JavaScript and an Application Programming
Interface which can be used by the clients such as Android or IOS smartphone
apps.
Scaling for
this type of application are often done both horizontally and vertically. The
later means the assembly machine will get its hardware improved by adding
additional RAM memory, disk storage or adding a far better CPU. Scaling
vertically are often achieved by installing an equivalent version of the
appliance on multiple nodes and putting a load balancer between the nodes and
therefore the browser clients or API clients.
Microservice
architecture
The below diagram shows a possible thanks to
build the described e-commerce web application during a microservice
architecture. As seen below the appliance was split into multiple small
services each having its own purpose, managing orders, managing products, and
managing content.
Each small service has its own database which
contains the generated or used data by that specific service, so basically we
don't have an enormous database but rather multiple small databases. This
represents one among the large advantages of microservices because the scaling
of the database horizontally becomes possible. in fact that a knowledge
consistency issue appears when a posh flow, which passes through multiple
services, fails somewhere within the middle of the processing. Assuring data
consistency requires now tons of additional effort, something which was previously
easily achieved using database transactions.
The earlier mentioned API Gateway stands
ahead of the clients and incorporates the API offered by all microservices such
the clients know only that API and aren't conscious of the opposite services
behind it. this will be compared to the façade design pattern during which one
entry point for the clients is obtainable . Following this architecture makes
it easier to later change the implementation of the API of the services as long
because the API of the Gateway still remains an equivalent .
Using Microservice architecture offers more
options for scaling the appliance , for instance , one can install half the
services on one node and therefore the spouse on the opposite node. One can
install each service on a separate node or maybe install each service twice on
two different nodes, on the other hand most likely a load balancer is required
.
Ph No:
9989971070, E-Mail ID: online@visualpath.in
- Get link
- X
- Other Apps
Comments
Post a Comment