How Microservices Evolve: From Monoliths to Cloud‑Native Service Governance
This article traces the evolution of internet architecture from monolithic and MVC designs through multi‑application and distributed systems, explains service‑oriented architecture and its benefits, introduces Dubbo‑based service governance, and outlines the core concepts, features, and implementation approaches of microservices.
Internet Architecture Evolution
Early desktop software used a single‑package architecture where UI, business logic, and data handling were bundled together.
The rise of web browsers introduced the MVC architecture, separating front‑end presentation (HTML/CSS/JS) from back‑end services (Java, PHP, etc.), enabling true front‑back separation.
As applications grew, a multi‑application architecture split a large system into independent applications (e.g., user, product, order services), reducing monolith size but limiting code reuse across services.
Distributed architecture further decomposes functionality into independent services that can be reused, scaled, and maintained separately.
Service‑Oriented Architecture (SOA)
Key characteristics of service‑oriented architecture:
Applications are split into business services.
Each service can be deployed independently.
Services are reusable across multiple applications.
Services communicate with each other.
Benefits include clearer system structure, stable core modules, easier development management, clear team responsibilities, code and business reuse, and high extensibility.
Implementation via RPC
Remote Procedure Call (RPC) frameworks solve the first challenge of service‑oriented architecture—remote service invocation. Common RPC solutions include Java RMI, WebService, Hessian, HTTP, and Thrift.
Challenges of Service‑Oriented Architecture
Complex configuration management as services proliferate.
Complicated inter‑service dependencies.
Load balancing across services.
Service monitoring, degradation, and authentication.
Service registration, discovery, and documentation.
Service Governance with Dubbo
Dubbo is an RPC framework that provides a complete service‑governance solution, including registration, discovery, load balancing, monitoring, and fault tolerance.
Service Registration and Discovery
Dubbo introduces a registry center where providers register services and consumers subscribe to the services they need. The registry returns a list of providers, and consumers select an instance using a soft load‑balancing algorithm.
Service Monitoring
Cluster Fault Tolerance
Load Balancing Strategies
Random
RoundRobin
LeastActive
ConsistentHash
Advantages of Dubbo Governance
Registry handles registration and lookup only, reducing pressure.
Consumers cache service addresses, mitigating registry failures.
Peer‑to‑peer registry clusters provide high availability.
Stateless providers enable dynamic deployment.
Lightweight local statistics reduce monitoring overhead.
Automatic soft load balancing for consumers.
Dependency tracing via the service center.
Monitoring informs scaling and degradation decisions.
ACL mechanisms support authentication.
Easy Spring integration.
Support for multiple serialization protocols.
Limitations of Dubbo
Consumers still depend on a configuration center.
Provider documentation is lacking.
No unified entry point.
Does not support OAuth2.0.
Internal authentication management is cumbersome.
No external application authentication.
Interfaces are essentially bare, not directly exposable.
IT governance is not convenient.
Microservices
Microservices focus on fine‑grained services (API level) that provide a good user experience.
Service granularity should be as fine as an API.
Each service must be reliable and easy to use.
In a microservice architecture, APIs are deployed to the cloud, and users access them via a unified gateway, eliminating the need for jar dependencies, registration lookups, or custom authentication.
Microservice Implementation
Key Characteristics
Each service consists of a set of APIs.
APIs expose a uniform service interface.
Consumers call services via HTTP without configuration.
Complete API documentation is provided.
API services are secure, reliable, and stable.
Problems Microservices Must Solve
Unified entry point.
Security controls such as rate limiting.
Comprehensive authentication (application, user, OAuth, ACL).
Protocol translation (HTTP, Dubbo, Protobuf).
API configuration management.
API lifecycle (publish/unpublish).
Mapping between API and service interfaces.
Monitoring and alerting.
Scalable, high‑concurrency, distributed architecture.
Automatic service container scaling.
Solution Architecture
Load‑balancing layer: Nginx/LVS/F5.
Microservice layer: high‑performance gateway, unified entry, API management, routing, authentication, monitoring, protocol conversion, OAuth2.0, API documentation, distributed scalability.
Service‑governance layer: Dubbo framework, MQ for decoupling services.
Elastic cloud: Dockerized services, real‑time cluster scheduling based on traffic pressure.
Elastic Cloud
Elastic cloud provides automated operations to ensure APIs remain available and performant under varying load, handling monitoring, scaling, and resource reclamation.
Architect's Guide
Dedicated to sharing programmer-architect skills—Java backend, system, microservice, and distributed architectures—to help you become a senior architect.
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.