Enterprise Distributed Application Service:User documentation

Updated at:

This topic describes the user documentation of Apache Dubbo for your reference.

Get started

Set up your environment and get a Dubbo application running.

TopicDescription
Background informationCore concepts behind Apache Dubbo and its role in distributed systems
RequirementsSoftware and environment prerequisites
Architecture 2.6.1Component layout and interaction model for Dubbo 2.6.1
Architecture 2.7.1Updated architecture and new capabilities in Dubbo 2.7.1
UsageBasic patterns for building and running Dubbo services
Quick startStep-by-step guide to get started with your first Dubbo application
DependenciesRequired libraries and dependencies
MaturityFeature stability levels and production-readiness indicators

Configuration

Configure Dubbo services through XML, properties files, annotations, or the API.

TopicDescription
XML configurationDefine services, references, and registries in XML files
Properties configurationUse .properties files for lightweight configuration
API configurationConfigure Dubbo programmatically with Java code
Annotation configurationUse Java annotations to declare services and references
Dynamic configuration centerPush configuration changes at runtime
Configuration loading processHow Dubbo resolves and merges configuration from multiple sources
Automatic loading of environment variablesMap environment variables to Dubbo configuration properties

Examples

Working examples for common Dubbo features, organized by category.

Service registration and discovery

TopicDescription
Preflight checkVerify provider availability before the consumer starts
Explicit targetConnect directly to a specific provider, bypassing the registry
Subscribe onlyDiscover providers through the registry without registering the local service
Register onlyRegister the local service with the registry without subscribing to other providers
Static serviceRegister services with a fixed address that does not change dynamically
Multiple registriesRoute services across more than one registry server

Load balancing and fault tolerance

TopicDescription
Load balancingConfigure load balancing strategies for service invocations
Fault tolerance strategyHandle failures with configurable fault tolerance policies
Service downgradeReturn fallback results when a provider is unavailable or slow
Routing ruleDirect traffic to specific providers based on conditions
Configure rulesApply governance rules dynamically at runtime

Service model and versioning

TopicDescription
Service groupIsolate different implementations of the same interface by group
Multiple versionsRun multiple versions of a service side by side for safe rollout
Multiple protocolsExpose the same service over more than one protocol simultaneously
Group mergerAggregate results from providers across different service groups

Invocation patterns

TopicDescription
Asynchronous callInvoke remote services without blocking the calling thread
Asynchronous executionRun provider-side logic asynchronously to improve throughput
Local callInvoke a service within the same JVM, skipping network overhead
Callback parameterReceive asynchronous results through a callback interface
Event notificationTrigger events on invocation success, failure, or completion
Generic referenceCall any service without compile-time dependency on its interface
Generic serviceImplement a provider that handles arbitrary service interfaces
Echo serviceTest service availability with a lightweight echo request
ContextPass and retrieve request-scoped metadata during invocations
Implicit parametersAttach hidden key-value pairs to RPC calls without changing the interface signature

Traffic control and connection management

TopicDescription
Concurrency controlLimit the number of concurrent requests a provider or consumer handles
Configure connectionsSet connection pool size, timeout, and keep-alive parameters
Lazy connectDelay TCP connection creation until the first request is sent
Stickiness connectionPin a consumer to the same provider for session-affinity use cases
Token authorizationRequire a token to prevent unauthorized direct access to providers
Thread modelCustomize the Netty thread pool and dispatch strategy

Advanced features

TopicDescription
Local stubRun pre- or post-processing logic on the consumer side before or after a remote call
Local mockReturn mock data when the provider is unavailable, useful for testing and degradation
Delay publishHold off service registration until the application is fully initialized
Parameter validationValidate method parameters before the call runs
Cache resultCache invocation results to reduce repeated remote calls
ReferenceConfig cacheReuse ReferenceConfig instances to avoid creating duplicate proxies
Distributed transactionCoordinate transactions across multiple services
Automatic thread dumpTrigger a thread dump automatically when Dubbo detects an issue
Graceful shutdownDrain in-flight requests and deregister the provider before the JVM exits

Logging, networking, and serialization

TopicDescription
Hostname bindingControl which network interface and hostname Dubbo binds to
Logger strategySwitch between Log4j, SLF4J, JCL, and JDK logging frameworks
Access logRecord every incoming invocation for auditing and debugging
Service containerRun Dubbo services standalone without a web container
Netty4Enable the Netty 4 transport for improved performance
Using efficient Java serialization in Dubbo (Kryo and FST)Replace the default serializer with Kryo or FST for faster serialization
Simplify registry URLsReduce registry URL length by removing redundant parameters

API reference

Java API documentation for Dubbo classes and interfaces.

XML configuration reference

Detailed attribute and usage descriptions for each Dubbo XML tag.

TagDescription
IntroductionCommon attributes and conventions shared across Dubbo XML tags
dubbo:serviceExpose a local Java class as a remote Dubbo service
dubbo:referenceCreate a proxy to consume a remote Dubbo service
dubbo:protocolConfigure the communication protocol (port, serialization, thread pool)
dubbo:registryConnect to a registry server for service discovery
dubbo:monitorEnable invocation metrics collection and reporting
dubbo:applicationSet application-level properties such as name and owner
dubbo:moduleGroup related services into a logical module
dubbo:providerSet default values for all dubbo:service tags in the same configuration
dubbo:consumerSet default values for all dubbo:reference tags in the same configuration
dubbo:methodOverride settings for a specific method within a service or reference
dubbo:argumentConfigure serialization or validation rules for a specific method argument
dubbo:parameterPass arbitrary key-value pairs as extension parameters
dubbo:config-centerConnect to an external configuration center for centralized management

Protocol references

Supported communication protocols, each with connection details, use cases, and constraints.

ProtocolDescription
IntroductionProtocol selection guidance and comparison
dubbo://Default high-performance binary protocol suited for high-throughput and low-latency scenarios
rmi://Java RMI protocol for integration with legacy RMI services
hessian://Hessian binary protocol with built-in HTTP transport, useful for cross-language calls
http://Standard HTTP protocol for simple RESTful-style invocations
webservice://SOAP-based Web Services protocol for enterprise system integration
thrift://Apache Thrift protocol for cross-language RPC
memcached://Access Memcached servers through the Dubbo service interface
redis://Access Redis servers through the Dubbo service interface
rest://RESTful protocol for HTTP-based service invocations

Registry server references

Registry options for service discovery, each with setup instructions and trade-offs.

RegistryDescription
IntroductionRegistry selection guidance and comparison
Multicast registryZero-dependency registry for development and testing on a local network
ZooKeeper registry serverProduction-grade registry backed by Apache ZooKeeper
Nacos registry centerRegistry and configuration center backed by Alibaba Nacos
Redis registry serverRegistry implementation using Redis pub/sub for service notifications
Simple registry serverLightweight registry for testing, implemented as a standard Dubbo service

Metadata reference

Service metadata management: how Dubbo handles interface metadata across providers and consumers.

Telnet command reference

Use the built-in Telnet interface to inspect running services, invoke methods, and troubleshoot issues from the command line.

QoS command usage

The Quality of Service (QoS) command port provides health checks, graceful shutdown, and runtime diagnostics.

Maven plug-in reference

Maven plug-in for Dubbo applications.

Best practice

TopicDescription
Recommended usagePreferred approaches for common configuration scenarios
Capacity planEstimate hardware and cluster size based on expected traffic
Performance reportBenchmark data and tuning guidelines for optimizing Dubbo throughput and latency
Test coverage reportCode coverage metrics and testing strategies for Dubbo services

Version upgrade

TopicDescription
2.7.x upgrade procedures and notesBreaking changes, migration steps, and compatibility notes for upgrading to Dubbo 2.7.x

Erlang

Apache Dubbo provides an Erlang client. The topics below cover setup and configuration for Erlang-based consumers and providers.

TopicDescription
Quick startSet up an Erlang Dubbo project and run a basic consumer-provider example
Consumer configurationConfigure service references, timeouts, and load balancing for Erlang consumers
Provider configurationRegister and expose Erlang services to the Dubbo ecosystem
Serialization configurationChoose and configure a serialization format for Erlang Dubbo communication