# Apache Dubbo — High-Performance Java RPC Framework > A guide to Apache Dubbo, the high-performance RPC framework for building scalable microservices with service discovery, load balancing, and traffic management. ## Install Save as a script file and run: # Apache Dubbo — High-Performance Java RPC Framework ## Quick Use ```bash # Add to pom.xml and bootstrap a Spring Boot Dubbo app mvn archetype:generate \ -DgroupId=com.example -DartifactId=dubbo-demo \ -DarchetypeGroupId=org.apache.dubbo \ -DarchetypeArtifactId=dubbo-demo-archetype cd dubbo-demo && mvn package java -jar target/dubbo-demo.jar ``` ## Introduction Apache Dubbo is a high-performance RPC framework originally developed at Alibaba and donated to the Apache Software Foundation. It provides service discovery, intelligent load balancing, and traffic management for building cloud-native microservice architectures in Java, Go, and other languages. ## What Dubbo Does - Provides transparent remote procedure calls between services with interface-based programming - Offers multiple protocols including Triple (gRPC-compatible), Dubbo TCP, and REST - Manages service registration and discovery through Nacos, Zookeeper, or Kubernetes - Delivers intelligent load balancing with consistent hashing and least-active strategies - Supports traffic governance including routing rules, circuit breaking, and rate limiting ## Architecture Overview Dubbo uses a layered architecture with a service interface layer, RPC protocol layer, and transport layer. Providers register with a registry (Nacos, Zookeeper, or K8s), consumers discover and invoke them via proxy stubs. The framework handles serialization, network transport, and failover transparently. A control plane manages routing rules and observability integration. ## Self-Hosting & Configuration - Install via Maven or Gradle dependency in your Java project - Configure application.yml for registry address, protocol type, and port - Deploy a registry service (Nacos recommended) for service discovery - Use Dubbo Admin dashboard to monitor services and traffic rules - Scale with Kubernetes using native service discovery integration ## Key Features - Multi-protocol support: Triple (HTTP/2), Dubbo TCP, REST, and gRPC interop - Polyglot SDKs with implementations in Java, Go, Rust, and Node.js - Mesh-ready architecture compatible with Istio and Envoy sidecars - Built-in observability with Prometheus metrics and distributed tracing - Graceful shutdown, warm-up, and lossless deployment capabilities ## Comparison with Similar Tools - **gRPC** — Lower-level RPC without built-in governance; Dubbo adds discovery, routing, and load balancing on top - **Spring Cloud** — HTTP-based microservices; Dubbo offers better performance via binary protocols - **Thrift** — Cross-language RPC but lacks service mesh integration and dynamic configuration - **Dapr** — Sidecar-based runtime; Dubbo is an in-process SDK with lower latency - **Nacos** — Service registry often paired with Dubbo; Nacos handles discovery while Dubbo handles RPC ## FAQ **Q: Can Dubbo work with non-Java services?** A: Yes. Dubbo has official SDKs for Go, Rust, and Node.js, and the Triple protocol is gRPC-compatible for interop with any gRPC client. **Q: How does Dubbo compare to gRPC in performance?** A: Dubbo's Triple protocol runs on HTTP/2 like gRPC. Raw throughput is comparable; Dubbo adds routing and governance with microsecond-level overhead. **Q: Is Dubbo suitable for small projects?** A: Yes. Dubbo 3.x simplified configuration with Spring Boot starters and annotation-driven setup for quick prototyping. **Q: Does Dubbo require Zookeeper?** A: No. Dubbo supports multiple registries including Nacos, Kubernetes API, and in-memory for development. ## Sources - https://github.com/apache/dubbo - https://dubbo.apache.org/en/overview/ --- Source: https://tokrepo.com/en/workflows/93f3b284-3d7c-11f1-9bc6-00163e2b0d79 Author: Script Depot