Backend Development 9 min read

Understanding Microservices: Definitions, Communication, Spring Cloud vs Dubbo, and Related Concepts

This article explains what microservices are, how they communicate, compares Spring Cloud with Dubbo, describes the relationship between Spring Boot and Spring Cloud, and discusses circuit breaking, service degradation, advantages, disadvantages, service discovery tools, and typical technology stacks.

Java Captain
Java Captain
Java Captain
Understanding Microservices: Definitions, Communication, Spring Cloud vs Dubbo, and Related Concepts

1. What is a microservice? A microservice is a lightweight, single‑purpose service that focuses on one business capability, such as user login, and can run independently. It forms part of a distributed system where business functions are split into separate modules, enabling easier scaling and evolution. Martin Fowler describes microservices as an architectural style that decomposes an application into small services, each running in its own process and communicating via lightweight protocols.

Microservice = an independent, single‑responsibility service application, typically a Maven module built with Spring Boot that handles a specific business logic.

Analogously, each hospital department (e.g., dentistry, neurology) represents a microservice, and the whole hospital represents the microservice architecture.

2. How do microservices communicate independently? Synchronous communication uses RPC frameworks like Dubbo or RESTful JSON APIs provided by Spring Cloud. Asynchronous communication relies on message queues such as RabbitMQ, ActiveMQ, or Kafka.

3. Differences between Spring Cloud and Dubbo

Dubbo uses binary RPC, consuming less bandwidth; Spring Cloud uses HTTP/REST, which consumes more bandwidth due to JSON payloads.

Dubbo has higher development complexity and many dependency issues; Spring Cloud offers one‑click generation and native integration.

Spring Cloud’s interface contracts are looser, requiring strong governance to avoid uncontrolled upgrades.

Spring Cloud abandons Dubbo’s RPC in favor of HTTP‑based REST, which, while slightly slower, provides greater flexibility and decouples client and server implementations.

4. Relationship between Spring Boot and Spring Cloud

Spring Boot focuses on rapid development of individual microservices (micro‑level), while Spring Cloud provides the global coordination and governance framework that manages many Spring Boot services (macro‑level). Spring Boot can operate independently, but Spring Cloud depends on Spring Boot.

Reference: https://blog.csdn.net/qq_41497111/article/details/91042405

5. What are circuit breaking and service degradation?

Circuit breaking acts like an electrical fuse: when a service becomes unavailable or times out, the circuit opens to prevent cascading failures across the system.

Service degradation reduces load by bypassing non‑critical interfaces and returning predefined fallback responses, thus preserving overall system stability.

Reference: 【121期】面试官:什么是熔断?什么是服务降级?

6. Advantages and disadvantages of microservices (and common pitfalls)

Advantages: loose coupling, single‑business focus, language‑agnostic, smaller team size, easier debugging, independent deployment, technology flexibility.

Disadvantages: increased management and deployment complexity, more servers, higher communication overhead, operational burden, data consistency challenges, performance monitoring difficulty.

7. Differences between Eureka and Zookeeper for service registration/discovery

Zookeeper follows the CP principle, offering strong consistency and partition tolerance.

Eureka follows the AP principle, emphasizing availability and partition tolerance.

Zookeeper’s leader election can cause temporary unavailability when the master fails.

Eureka’s nodes are equal; the failure of one node does not affect overall service availability.

8. Typical microservice technology stack

9. What is microservice architecture?

Microservice architecture is the management and integration layer built on top of individual microservices. It coordinates multiple independent services (like hospital departments) into a cohesive system, enabling centralized governance while preserving each service’s autonomy.

END

我知道你 “在看”
backend architecturemicroservicesservice discoveryDubboservice degradationSpring Cloudcircuit-breaker
Java Captain
Written by

Java Captain

Focused on Java technologies: SSM, the Spring ecosystem, microservices, MySQL, MyCat, clustering, distributed systems, middleware, Linux, networking, multithreading; occasionally covers DevOps tools like Jenkins, Nexus, Docker, ELK; shares practical tech insights and is dedicated to full‑stack Java development.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.