<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dubbo on Zhuifeng Notes</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/</link><description>Recent content in Dubbo on Zhuifeng Notes</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 25 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/index.xml" rel="self" type="application/rss+xml"/><item><title>Dubbo Architecture and Core Concepts</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/architecture/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/architecture/</guid><description>&lt;p&gt;Dubbo&amp;rsquo;s core strength lies in its clear separation of responsibilities and its highly pluggable extension mechanism. Understanding the layering and the Invoker abstraction is the foundation for reading Dubbo&amp;rsquo;s source code and troubleshooting production issues.&lt;/p&gt;&#10;&lt;h2 id="layered-architecture"&gt;Layered Architecture&#10;&lt;/h2&gt;&#10;&lt;p&gt;From top to bottom Dubbo is divided into logical layers, each depending only on the interface (not the implementation) of the layer below:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;service / config layer&lt;/strong&gt;: the user-facing API and configuration layer, where &lt;code&gt;@DubboService&lt;/code&gt;, &lt;code&gt;@DubboReference&lt;/code&gt;, &lt;code&gt;ReferenceConfig&lt;/code&gt; and &lt;code&gt;ServiceConfig&lt;/code&gt; live.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;proxy layer&lt;/strong&gt;: generates dynamic proxies for service interfaces so remote calls are transparent to business code.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;registry layer&lt;/strong&gt;: encapsulates service registration and subscription, sensing provider/consumer up and down events.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;cluster layer&lt;/strong&gt;: wraps multiple Invokers into a &amp;ldquo;cluster Invoker&amp;rdquo;, responsible for load balancing, fault tolerance and routing.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;protocol layer&lt;/strong&gt;: encapsulates the RPC call; the core of Invoker export and reference.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;filter chain&lt;/strong&gt;: interceptors across the call path, usable for logging, auth, rate limiting and other cross-cutting concerns.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="invoker-and-spi"&gt;Invoker and SPI&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;Invoker&lt;/code&gt; is Dubbo&amp;rsquo;s universal domain model, representing &amp;ldquo;an executable and describable call&amp;rdquo;, abstracting local, remote and cluster invocations. &lt;code&gt;URL&lt;/code&gt; acts as the configuration bus running through every layer; almost every extension point passes parameters via URL.&lt;/p&gt;</description></item><item><title>Service Registration and Discovery in Practice</title><link>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/registry-discovery/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://4f0a9a3b.wangpeng.pages.dev/en/tech/dubbo/registry-discovery/</guid><description>&lt;p&gt;Service registration and discovery are the foundation of microservice architecture. Dubbo abstracts the registry as the &lt;code&gt;Registry&lt;/code&gt; interface, so you can switch smoothly between ZooKeeper, Nacos, Consul and others without changing business code.&lt;/p&gt;&#10;&lt;h2 id="connecting-a-registry"&gt;Connecting a Registry&#10;&lt;/h2&gt;&#10;&lt;p&gt;Using Nacos as an example, you only need to declare the registry address and protocol in configuration. On startup Dubbo automatically exports (export) and subscribes (subscribe) services:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-871d0e0c-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="yaml" data-td-line-count="8"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-871d0e0c-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;dubbo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;application&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;order-service&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;nacos://127.0.0.1:8848&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;protocol&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;dubbo&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20880&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;After a provider starts, it writes its metadata (interface, IP, port, weight, etc.) into the registry. When a consumer starts, it subscribes to the interface node, fetches the available provider list and caches it locally; subsequent calls go directly to the local cache, reducing registry pressure.&lt;/p&gt;</description></item></channel></rss>