An Introduction to Dubbo: Features, Architecture, and Usage

This article provides a comprehensive overview of Dubbo, the high‑performance Java RPC framework, covering its core components, advantages over alternatives, supported protocols, configuration methods, startup behavior, integration with Spring Boot, and detailed architecture for building scalable distributed services.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
An Introduction to Dubbo: Features, Architecture, and Usage

1. What is Dubbo?

Dubbo is an open‑source high‑performance RPC distributed service framework originally developed by Alibaba, now an Apache incubating project. Its core includes cluster fault tolerance, remote communication, and automatic service discovery.

2. Why use Dubbo?

It is widely adopted by Chinese internet companies, built on Netty and Zookeeper, offering high performance and availability. Dubbo allows business logic to be extracted into independent services, enabling reuse, flexible scaling, and faster response to market changes.

Remote method calls are transparent, configured simply without API intrusion, and provide soft load‑balancing and fault‑tolerance, reducing cost and single points of failure. Service registration and discovery eliminate hard‑coded addresses.

3. Differences between Dubbo and Spring Cloud

Dubbo uses RPC communication, while Spring Cloud relies on HTTP RESTful APIs. Their components differ accordingly.

4. Supported protocols

Dubbo supports many protocols, such as dubbo:// (recommended), rmi://, hessian://, http://, webservice://, thrift://, memcached://, redis://, rest://.

5. Does Dubbo need a web container?

No, a web container is unnecessary and would only add complexity.

6. Built‑in service containers

Spring Container, Jetty Container, Log4j Container – essentially a simple main method that loads a Spring context to expose services.

7. Default registry and alternatives

Zookeeper is the recommended registry; alternatives include Redis, Multicast, and Simple, though they are less commonly used.

8. Configuration methods

Dubbo can be configured via Spring XML or Java API.

9. Startup behavior when dependent services are unavailable

By default Dubbo checks dependencies at startup and throws an exception if a service is missing; this can be disabled with check="false".

10. Multi‑protocol support

Dubbo allows configuring multiple protocols for the same or different services.

11. Handling multiple implementations of an interface

Use the group attribute to separate implementations; both provider and consumer specify the same group.

12. Distributed transaction support

Currently not supported; future versions may adopt JTA/XA standards.

13. Integration with Spring Boot

Dubbo can be integrated with Spring Boot; the project is available at https://github.com/apache/incubator-dubbo-spring-boot-project.

14. Benefits of Dubbo

Transparent remote calls, soft load‑balancing and fault tolerance, automatic registration and discovery, and seamless Spring‑based configuration.

15. Architecture overview

Key roles: Provider (service provider) and Consumer (service consumer). A Registry (commonly Zookeeper) stores service metadata. A Monitor collects call statistics. Providers run inside containers, register themselves, consumers subscribe and perform load‑balanced calls, and both report metrics to the monitor.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Distributed SystemsJavaBackend DevelopmentRPCDubbo
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

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.