Why Microservices Became Essential: Solving Development, Deployment, and Resource Challenges
This article explains how microservices emerged to address low development efficiency, technology incompatibility, and resource waste, and describes their benefits such as faster deployment, technology flexibility, optimal resource use, and improved stability, while also noting performance challenges.
Background of Microservices
In the early stages of a website, the architecture is simple and all code is packaged together and deployed on a single server. For a Java project, five developers each work on their own module, submit the code, and operations compile a WAR file for deployment.
As the project grows, more modules and frequent bug fixes make the development cycle long; even a tiny change requires recompiling and redeploying the entire application, often taking many minutes and causing overtime.
This creates the first problem: low efficiency in development, testing, and deployment.
When the project expands, more technologies are needed, but some are incompatible (e.g., mixing C++ and Java). Teams often abandon suitable but incompatible technologies in favor of compatible but less suitable ones, leading to the second problem: difficulty choosing the right technology for specific needs.
A third problem appears when the system runs out of resources and needs cluster scaling. If three modules A, B, and C consume 10%, 5%, and 85% of resources respectively, the bottleneck module C forces the entire WAR package to be hosted on a larger server, causing resource waste.
How Microservices Solve the Problems
Consider the same three modules A, B, and C. Previously, all modules were compiled together and deployed on one server; scaling required deploying the whole package on a new server.
Microservices treat each module as an independent application that is compiled and deployed separately, communicating via service calls.
The benefits are:
Improved development and deployment efficiency: Developers can recompile and redeploy a single sub‑service to verify changes, saving a lot of time.
Resolution of technology compatibility issues: Each sub‑service can choose the most suitable implementation technology independently.
Maximized resource utilization: When capacity is insufficient, only the bottleneck sub‑service needs to be scaled.
Enhanced system stability: Each sub‑service can be run in a high‑availability cluster, improving overall stability.
Definition of Microservices
Microservice architecture is a pattern that divides a single application into a set of small, independent services that coordinate and cooperate with each other.
Each service runs in its own process and communicates with other services through lightweight mechanisms such as RESTful APIs.
Services are built around specific business capabilities and can be deployed independently to production.
Problems Brought by Microservices
While microservices bring many advantages, they also introduce performance challenges. In the monolithic model, a feature could retrieve all required data in a single call; in a microservice model, the same feature may need multiple service calls, each incurring network cost, which can become unacceptable.
The usual mitigation is careful design of service granularity—avoiding overly fine‑grained services—to reduce cross‑service call overhead, which demands higher design skill.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
