“Nothing exists except atoms and empty space; everything else is opinion.”
In other words, what’s the lowest unit of work that programmers can deal with easily without making the whole application one big inseparable monolith?
In order to stay ahead of the curve, organizations must transform themselves at different levels. Leadership transformation and digital transformation are examples of some of those initiatives. Our focus here will be around Digital Transformation and how to measure its effectiveness.
CIOs now have a critical KRA around ‘Time to Market’, ‘Faster Delivery’ and ‘Business Availability’. Can a Microservices architecture underpin these metrics to create a foundation that helps CIOs better them? Most of the CIOs have a legacy platform or monolithic application to deal with. Among many, we need to look at transforming the monolithic application into independent, easily manageable services.
While there is an urgency, it is important to firstly understand the what, the why and how of Microservices Architecture.
Having worked in diverse industries helping midsize to Fortune 500 companies build their empires, at Parkar, we have seen how well-designed microservices have helped companies get on the fast-paced delivery and digital transformation journey.
In his book, “Business @the Speed of Thought: Succeeding in the digital economy”, Gates stresses the need for leaders to view technology not as overhead but as a strategic asset. If you haven’t yet jumped on to the Microservices journey, you will be lagging way behind your competitors and before you know it would be too late.
Today’s world is all about focusing on managing the core business. Your IT services and applications should scale to the need of speed of the business. With legacy applications, it’s going to be tougher. You need someone who has done it before to navigate through the complexities.
Microservices architecture is a methodology where the application is divided into set of smaller services, known as Microservices. It is based on proven software engineering concepts around agility, APIs, and Continuous integration (CI) continuous deployment (CD).
In practical sense, Microservices are SOA done right.
In various Parkar engagements, the Microservices have been implemented using different languages or technologies. During implementation, we interface the back-end services through an API gateway which provides a unified interface to front-end client applications.
For one of Parker’s customer engagements, even advanced analytics was incorporated to gain better insight into data and predictive models were deployed using machine learning algorithms.
For scaling (instancing up and down), life-cycle management, and load balancing, we at Parkar, have done through orchestration and load balancing services such as Kubernetes.
Digital Patient Care sub-application built with Microservices
Parkar Consulting Lab had a recent engagement with a healthcare organization, where we implemented the Microservices stack using the right architectural principles.
In the services and applications that we enabled, there was a patient care application that queried patient history, verified any drug allergies and family medical history. The application consisted of several components including the Web Client, which implements the user interface, along with some backend services for checking patient records, maintaining history and related analytics & visual graphs.
The application consisted of a set of services. A cross-section of the application is as below:
Fig 1: Example of Microservice
Benefits of Microservices
Much has been said about the advantages of Microservices based architecture over monolithic architecture. In short, we can list the following as a set of deciding parameters which make the Microservices architecture attractive.
Fig2: Microservices value realization in some Parkar implementations
Doing it Right is Critical for the Digital Transformation Journey!
Choosing the right partner in such transformation project involving Microservices could be challenging. Understanding the business nuances and then architecting the solution with future in perspective needs a deeper understanding.
We’ve worked with scores of customers till now. And what we’ve learnt is that they all are poles apart from one another. Each will have its own parameters, and the level of urgency and degree of dependence on the services will differ too. There is a right architecture for every use case, scale and target consumer (B2B v/s B2C).
No matter which one you choose, it should help you reduce development and operating costs while giving you added functionality and power.
Without much ado, we’ll proceed towards the key recommendation from our success stories and learnings.
Top 5 things to remember while adopting Microservices architecture
1. Defining logical domain boundaries clearly
This includes –
- Domain data management (separate or shared Databases between one or more Microservices)
Fig 3: Domain Data Model
- Well defined interfaces for communication means that each Microservice does exactly what it is supposed to do and nothing else, so there is no overlapping of purpose or functionality across Microservices.
- Each Bounded Context of the domain maps to exactly one business Microservice, which in other words means the Microservice is cohesive within itself but not across other Microservices.
- Events propagation and communication methods within application and from outside application (HTTP/HTTPS or AMQP).
- API Gateway for single point of interfacing for the clients. (API Gateway or Backend for Frontend pattern)
2. Security Architecture:
Security design and implementation at multiple levels: authentication, authorization, secrets management, secure communication.
Achieving scalability sounds simple but is by no means a simple task. Given the complex set of activities going on in parallel, orchestrating them at scale needs to be a well thought out plan. Using the Microservices tools is also important. Our experience at Parkar shows that Kubernetes and Helm are common technologies that have performed well for achieving scalability. It may look complex, but here are key aspects one should look into:
- Service registry and service discovery
- IP whitelisting
- Authentication and authorization
- Response caching
- Retry policies, circuit breaker
- Quality of service management
- Rate limiting and throttling
- Load balancing
- Logging and tracing
- Managed orchestration
4. Monitoring and health checks
Each service needs to be healthy to process requests. And hence monitoring service health is a key consideration. In one of the instances at Parkar, we have seen that sometimes a service instance is incapable of handling requests, yet it was running. And when we debugged further, we found that the specific service had run out of database connections. The key learning for Parkar from this, is that when this occurs, the monitoring system should generate an alert. The load balancer or service registry should also be designed intelligently so as to not route requests to the failed service instance. And ideally, the request should be routed to working service instances after checking the necessary pre-conditions.
5. Deployment (DevOps and CI/CD practices and infrastructure)
Faster release cycles are one of the major advantages of Microservices architectures. But without a good CI/CD process, you won’t achieve the agility that Microservices promise.
For example, assume, in an organization, there are sub-teams working on different features of an application. In case of monolithic application, something goes wrong for, say sub-team B, the release candidate of the application gets broken and there is no production rollout.
Fig 4: Deployment in case of monolithic v/s Microservices
On the current application modernization project, Parkar team was tasked with reducing the application deployment time while improving the quality and ability to add new features rapidly. With Microservices, we were able to develop and deploy services rapidly and decouple the business functionalities to enable rapid deployment.
The key for us, at Parkar, has been following the Microservices philosophy, where there is not a long release train where every team has to get in line. The team that builds service “A” can release an update at any time, without waiting for changes in service “B” to be merged, tested, and deployed.
Now that we have looked at the key things to consider before you zero down on the Microservices architecture, there are certain things you must ask your team or your IT service implementation partner before you invest your money and time.
What are these questions?
- Where to start: Start point often becomes a major question for many seniors. Are you developing an application from scratch or are you transforming your legacy application into Microservices based architecture?
- How to Segregate: What are the logical domains you could segregate your application into? Methods such as strangulation strategy can often help to migrate in phases.
- How do you want to separate front-end and back-end services?
- What is your plan for deployment? Do we have the right environments develop, QA, staging and production? Is the deployment pipeline ready?
- Where to deploy: Whether on-premises, hybrid infrastructure, single public cloud or multi-cloud?
Whenever Parkar gets involved with any customer, answers to these questions has helped in a big way to crystalize the outlines of microservices architecture. It also helped plan for incremental migration from monolithic to microservices avatar for the customer application.
Every enterprise has certain roadmaps when it comes to charting its journey. Clearly, the Digital Transformation journey is a step of multi-step evolution and one of the key steps is moving to Microservices.
At Parkar, we have experienced that right Microservices architecture helped our customer organization in their roadmap of Legacy to Microservices migration or building a new service scalable, secure and quick to deploy.
It’s critical to ask the right questions (as mentioned above) and then follow through the key 5 things at the minimum, before you embark on the Microservices journey enroute to your digital transformation journey.
On this note, we shall let you ponder over the benefits and principles of Microservices architecture. Meanwhile, we at Parkar Consulting Lab, will gear up to bring you something more engaging from the world of Application Modernization and Digital Transformation. Stay tuned.
Innovative Director of Software Engineering. Entrepreneurial, methodical senior software development executive with extensive software product management and development experience within highly competitive markets. I am an analytical professional skilled in successfully navigating corporations large and small through periods of accelerated growth.