Why Use Microservices Architecture?
A Practical Guide

29 Jun 2022 Maevskiy Konstantine, Starov Yevgen

What is a Microservices Architecture?

Microservices architecture is a style that structures an app as a set of predetermined services. At its core, such app is split into smaller independent segments that perform their own functions.
This approach permits to view microservices as a group of undivided apps that handle their own features. As a result, we get an app that can perform a variety of functions by employing appropriate services.

Pros & Cons of Microservices Approach

Just like any other types of software architecture, microservices architecture has its own set of advantages and disadvantages. Let’s take a closer look at them:

Pros

  • Flexible scaling — each service is designed independently. Whenever any component of the software set needs to be updated, we can implement the change without taking down the entire system.
  • Agility — from a business perspective, the ability to quickly react to the external environment by making appropriate changes to the internal structure of a microservices app gives so-needed flexibility which can easily transform into a competitive advantage.
  • Independent deployment — due to the fact that services are deployed independently, it is possible to take some of them offline for maintenance. Moreover, a smaller service equals a smaller codebase. The deployment can be performed in a sequence rather than a bundle which saves time and reduces cost of the implementaiton.
  • Technology flexibility — monolithic apps are bound to a single codebase while microservices are not. This results in an ability to employ various technologies to create viable business solutions within one app.
  • Multiple platforms — the flexibility offers another advantage – the potential to create solutions that are supported by a variety of platforms.

Cons

  • Complexity — unlike a monolithic app, microservices architecture is more complex due to a fact that it requires us to develop and deploy multiple services and create interconnections between them.
  • Infrastructure cost — complex infrastructure means additional costs. That is why microservices architecture is sometimes more expensive comparing to the monolithic one.
  • Debugging is more complex — as soon as each element of a microservices architecture brings its own codebase, the debugging process becomes more complicated. This means that developers need to run multiple instances of debugging, which takes more time.
  • Development and testing — developing multiple small services and accommodating them with connections is a time-consuming task on its own. In many cases testing all elements and their interactions with each other takes more time than with a monolithic app.
  • Versioning and backward compatibility — versioning may be a problem when working with microservices because updating a microservice requires maintaining the API contract. As a result, it is required to deploy an updated service in a way that allows both the old and new version of the said service to run simultaneously. So, a service has to support older versions of the API for some time because clients may not be able to immediately upgrade to a new version.

The ABCloudz Approach to Microservices

Here at ABCloudz, we are using our own way of working with microservices apps. Our teams have created numerous groups of presets that are actively used to develop and deploy microservices architecture based on the AWS services.
The template consists of several microservices that cover major part of the features which are standard or typical for large-scale web and mobile applications:

  • Notification service;
  • Gateway;
  • User service;
  • Authorization service.

Also, if needed we may add a variety of third-party services to the solution:

  • Stripe;
  • PayPal;
  • Twilio;
  • Other third-party services without any restrictions.

Such development approach allows us to deploy services in less time and cost. With every new project we are constantly modifying these presets to remain updated and simplify our development process as a whole.

Practical Case of Microservices App Development and Technologies That We Used

Our Client’s Needs Explained

One of our Clients wanted to create a cross-platform auction app allowing its users to purchase and sell used cars effectively, conveniently, and quickly. There was a need for Android and iOS apps as well as a website that would provide the same functionality across the platforms.
The Client estimated that the app would experience considerable traffic with tens of thousands of users and hundreds of auctions on a daily basis. That is why it was required to develop a solid platform that had to support immediate notification process for all bidders while providing them with an ability to pay online.
Solution workflow required implementation of a full deal cycle: buy, sell, deliver, arbitrate, and withdraw. Also, the Client wanted an admin panel as well. All these features made the app to become a highly complex product.

How We Approached the Task

Considering the Client’s needs, the ABCloudz team decided to create three user roles — Public Buyer, Dealer, and Licensed Seller. The Public Buyer role only permitted to purchase cars. Dealers were able to buy cars as well as sell them to other dealers. As for the last role, the Licensed Sellers could buy, sell, and transport cars. During development of microservices backend, our team used a variety of technologies and third party services that included:

  • .Net Core 3.1;
  • ASP.Net Core Web API;
  • ASP.NET SignalR;
  • Google Distance Matrix API;
  • Stripe payment system;
  • NHTSA VIN code scanner.

This approach allowed the creation of an engine which covered the full cycle of car purchases including creating and updating bids, updating auctions’ status, closing deals, providing online payment, and many other features.
Here is a detailed schema of the app’s back-end structure:


Thanks to our extended practice of creating microservices templates, we re-used some software components that were developed previously. Our team also added custom elements to support business goals of the Client. As a result, we were able to boost the development speed by 30%.
Our performance testing results were very impressive as the auctions were able to handle around 10 bids per second. That means, the app was able to keep up 6,000 bids in just 10 minutes.

When Do We Recommend Using Microservices Architecture in Our Projects

ABCloudz recommends using microservices architecture to create apps that are complex and require a lot of features. It is an excellent choice for projects that require more than 1,000 work hours investment.
This architecture is also a better choice for apps that expect considerable traffic. Think of more than 100,000 new users per year.
One should note that development of microservices requires a larger budget because this architectural approach is quite complex and requires more efforts in developing, deploying, supporting and updating applications.

Final Thoughts

Microservices architecture is commonly used when it comes to large-scale complex applications. Our example of a car auction app is a great representation of a variety of involved technologies, as well as the benefit of flexibility.

If you are interested in a microservices application, our team of professionals will be glad to assist you. We offer a full cycle of services from business analysis to deployment and post-launch support. Get an edge with ABCloudz team’s experience and get a competitive product up and running in the shortest terms.

Ready to start the conversation?