MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

What is the purpose of Microservices?

In this blog, I am going to explain that Codebases grow as we write code to add new features. Over time, it can be difficult to know where a change needs to be made because the codebase is so large.

Monolithic architecture layers vs microservices with separate databases; 5 Things You Need To Know About Microservices

Despite a drive for clear, modular monolithic codebases, all too often these arbitrary in-process boundaries break down. Code related to similar functions starts to become spread all over, making fixing bugs or implementations more difficult.

Within a monolithic system, we fight against these forces by trying to ensure our code is more cohesive, often by creating abstractions or modules. Cohesion—the drive to have related code grouped together—is an important concept when we think about microservices. This is reinforced by Robert C.

Microservices structure: client to API gateway to independent services, managed by DevOps and orchestration

Martin’s definition of the Single Responsibility Principle, which states “Gather together those things that change for the same reason, and separate those things that change for different reasons.” Microservices take this same approach to independent services.

We focus our service boundaries on business boundaries, making it obvious where code lives for a given piece of functionality. And by keeping this service focused on an explicit boundary, we avoid the temptation for it to grow too large, with all the associated difficulties that this can introduce.

The question I am often asked is how small is small? Giving a number for lines of therefore do more in fewer lines of code. We must also consider the fact that we could be pulling in multiple dependencies, which themselves contain many lines of code. In addition, some part of your domain may be legitimately complex, requiring more code.

Jon Eaves at RealEstate.com.au in Australia characterizes a microservice as something that could be rewritten in two weeks, a rule of thumb that makes sense for his particular context.

Another somewhat trite answer I can give is small enough and no smaller. When speaking at conferences, I nearly always ask the question who has a system that is too big and that you’d like to break down? Nearly everyone raises their hands. We seem to have a very good sense of what is too big, and so it could be argued that once a piece of code no longer feels too big, it’s probably small enough.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

How To Build a CI/CD Pipeline for Microservices Architecture

CI/CD has become crucial in the modern fast-paced software development process because it enables quick application releases, as well as reliable updates over time. These pipelines are…

Read More

Top 10 Service Discovery Tools: Features, Pros, Cons & Comparison

Introduction Service Discovery Tools are foundational components of modern distributed systems and microservices architectures. As applications are broken into smaller, independently deployed services, it becomes impractical—and unsafe—to…

Read More

Google Cloud: API Gateway Basic Tutorials

Below is a practical, step-by-step Google Cloud API Gateway setup using a dummy backend on Cloud Run (hello service), then testing via curl. This follows Google’s official…

Read More

Master Microservices: A Practical Guide to Modern Architecture

The world of software development is undergoing a seismic shift. The monolithic applications of yesterday, while familiar, often struggle with the demands of today’s fast-paced, cloud-native, and…

Read More

PERFMON (Performance Monitor): Demo & Lab

Below is the definitive, step-by-step list of PerfMon counters you must add for .NET / ASP.NET Core / API / Microservices performance optimization. This is the same…

Read More

Comprehensive Guide to Communication Protocols

This guide covers the most common communication protocols used in modern cloud-native architectures, compares their capabilities, and discusses when to use each. It also analyzes support and…

Read More