This is an automated email from the ASF dual-hosted git repository.
github-actions[bot] pushed a commit to branch cn-site
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git
The following commit(s) were added to refs/heads/cn-site by this push:
new 30e40382226 deploy: 1eaabca46edc7128ed56dc16fff3a81eaae3969e
30e40382226 is described below
commit 30e4038222643398f9ac0250ccbee45f32fa43da
Author: Alanxtl <[email protected]>
AuthorDate: Tue Aug 11 13:42:33 2026 +0000
deploy: 1eaabca46edc7128ed56dc16fff3a81eaae3969e
---
css/app.css | 2 +-
css/chunk-vendors.css | 2 +-
en/index.xml | 16 +-----
.../tutorial/traffic/condition_router/index.html | 19 ++++---
.../mannual/golang-sdk/tutorial/traffic/index.xml | 16 +-----
.../tutorial/traffic/tag_router/index.html | 52 ++++++++++++++----
en/sitemap.xml | 2 +-
js/app.js | 3 +-
js/chunk-vendors.js | 61 +---------------------
sitemap.xml | 2 +-
zh-cn/index.xml | 8 +--
.../tutorial/traffic/condition_router/index.html | 21 +++++---
.../mannual/golang-sdk/tutorial/traffic/index.xml | 8 +--
.../tutorial/traffic/tag_router/index.html | 46 +++++++++++++---
zh-cn/sitemap.xml | 2 +-
15 files changed, 123 insertions(+), 137 deletions(-)
diff --git a/css/app.css b/css/app.css
index 44c2a2c2469..b9457c8de14 100644
--- a/css/app.css
+++ b/css/app.css
@@ -1 +1 @@
-h3[data-v-76eccb7f]{margin:40px 0
0}ul[data-v-76eccb7f]{list-style-type:none;padding:0}li[data-v-76eccb7f]{display:inline-block;margin:0
10px}a[data-v-76eccb7f]{color:#42b983}.form-layout[data-v-76eccb7f]{display:flex;justify-content:space-between;align-items:flex-start}.left-form[data-v-76eccb7f]{flex:1;max-width:calc(50%
-
20px);margin-right:20px}.right-text[data-v-76eccb7f]{flex-shrink:0;width:calc(50%
- 20px)}.left-form
.el-form-item__label[data-v-76eccb7f]{text-align:left}.left-form [...]
\ No newline at end of file
+/*Respond to static link checks, which will be dynamically replaced at build
time*/
\ No newline at end of file
diff --git a/css/chunk-vendors.css b/css/chunk-vendors.css
index 61c66238ea8..b9457c8de14 100644
--- a/css/chunk-vendors.css
+++ b/css/chunk-vendors.css
@@ -1 +1 @@
-@font-face{font-family:element-icons;src:url(../fonts/element-icons.ff18efd1.woff)
format("woff"),url(../fonts/element-icons.f1a45d74.ttf)
format("truetype");font-weight:400;font-display:"auto";font-style:normal}[class*="
el-icon-"],[class^=el-icon-]{font-family:element-icons!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;vertical-align:baseline;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:gr
[...]
\ No newline at end of file
+/*Respond to static link checks, which will be dynamically replaced at build
time*/
\ No newline at end of file
diff --git a/en/index.xml b/en/index.xml
index 080fbf709fb..0b8ef199346 100644
--- a/en/index.xml
+++ b/en/index.xml
@@ -1663,21 +1663,7 @@ Therefore, it should be used sparingly in production
environments.</p></de
<p>Follow this instruction
to <a
href="https://dubbo-next.staged.apache.org/zh-cn/overview/reference/integrations/nacos/">install
and start Nacos server</a>.</p>
<h3 id="tag-router">Tag router</h3>
-<p>The tag router enables traffic control based on tags. The following
is the example code.</p>
-<p>Server side:</p>
-<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>ins, err <span
style="color:#719e07">:=</span> dubbo.<span
style="color:#268bd2">NewInstance</span>(
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithName</span>(<span
style="color:#2aa198">&#34;tag-server&#34;</span>),
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithTag</span>(<span
style="color:#2aa198">&#34;test-Tag&#34;</span>), <span
style="color:#586e75">// set application&#39;s tag</span>
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithRegistry</span>(
-</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithNacos</span>(),
-</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithAddress</span>(RegistryAddress),
-</span></span><span style="display:flex;"><span>
),
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithProtocol</span>(
-</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithTriple</span>(),
-</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithPort</span>(<span
style="color:#2aa198">20000</span>),
-</span></span><span style="display:flex;"><span>
),
-</span></span><span style="display:flex;"><span>
)
-</span></span></code></pre></div><p>Parameters:</p></description></item><item><title>Traditional
deployment architecture based on Zookeeper and Nacos for deploying Dubbo
applications in a virtual machine
environment</title><link>https://cn.dubbo.apache.org/en/overview/mannual/java-sdk/tasks/deploy/deploy-on-vm/</link><pubDate>Mon,
01 Jan 0001 00:00:00
+0000</pubDate><guid>https://cn.dubbo.apache.org/en/overview/mannual/java-sdk/tasks/deploy/deplo
[...]
+<p>The tag router enables traffic control based on tags. It is commonly
used for canary releases (tag the new-version instances so that only requests
carrying the tag are routed to them) and environment isolation (instances in
different lanes are distinguished by tags to keep traffic from crossing
environments). The following is the example
code.</p></description></item><item><title>Traditional deployment
architecture based on Zookeeper and Nacos for deploying Dubbo applicati [...]
<img
src="https://cn.dubbo.apache.org/imgs/v3/manual/java/tutorial/kubernetes/kubernetes.png"
style="max-width:650px;height:auto;" />
<h2 id="install-nacos">Install Nacos</h2>
<p>Please refer to the following documentation for how to
<code>install Nacos</code> locally.</p>
diff --git
a/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
b/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
index eb55739978d..ba5b16dfc72 100644
---
a/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
+++
b/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
@@ -1,4 +1,4 @@
-<!doctype html><html lang=en class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=zh-cn
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dub
[...]
+<!doctype html><html lang=en class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=zh-cn
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dub
[...]
<a class=dropdown-item href=/en/overview/notices/>Security Notices</a>
<a class=dropdown-item href=/en/contact/>Contributor's Guide</a></div></li><li
class="nav-item nav-item-line px-2 mb-2 mb-lg-0"><a class=nav-link
href=/en/blog/><span>Blog</span></a></li><li class="nav-item nav-item-line px-2
mb-2 mb-lg-0"><a class=nav-link
href=/en/download/><span>DOWNLOAD</span></a></li><li class="nav-item dropdown
d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown
role=button data-toggle=dropdown aria-haspopup=true
aria-expanded=false>ECOSYSTEM</ [...]
<a class=dropdown-item
href=/zh-cn/overview/mannual/control-plane/>Visualizable Console</a>
@@ -718,18 +718,25 @@ It uses <code>consumer => provider</code> expressions to
manage traffic for both
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span> )
</span></span><span style=display:flex><span>rep, err <span
style=color:#719e07>:=</span> srv.<span
style=color:#268bd2>Greet</span>(context.<span
style=color:#268bd2>Background</span>(), <span
style=color:#719e07>&</span>greet.GreetRequest{Name: <span
style=color:#2aa198>"hello world"</span>})
-</span></span></code></pre></div><blockquote><p>The example above uses dynamic
configuration and requires a config in Nacos or another config
center.</p></blockquote><p>Example config:</p><blockquote><p>The <code>Data
Id</code> of config must be <code>{application_name}.{router_type}</code> (e.g.
condition-server.condition-router).</p></blockquote><div class=highlight><pre
tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=languag [...]
+</span></span></code></pre></div><blockquote><p>The example above uses dynamic
configuration and requires a config in Nacos or another config
center.</p></blockquote><p>Run the sample (the two servers belong to the same
application <code>condition-server</code>, and the client calls the
<code>Greet</code> method every 5 seconds):</p><div class=highlight><pre
tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-shell data-la [...]
+</span></span><span style=display:flex><span>$ go run
./go-node2-server/cmd/server_node2.go <span style=color:#586e75># port
20000</span>
+</span></span><span style=display:flex><span>$ go run ./go-client/cmd/client.go
+</span></span></code></pre></div><p>Example config:</p><blockquote><p>The
<code>Data Id</code> of config must be
<code>{application_name}.{router_type}</code> (e.g.
<code>condition-server.condition-router</code>, where the application name is
the <strong>server-side</strong> application name).
+Group uses the default <code>DEFAULT_GROUP</code>, and the config format is
<code>YAML</code>.</p></blockquote><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-yaml data-lang=yaml><span style=display:flex><span><span
style=color:#268bd2>configVersion</span>: V3.3.2
</span></span><span style=display:flex><span><span
style=color:#268bd2>scope</span>: <span
style=color:#2aa198>"application"</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>key</span>: <span
style=color:#2aa198>"condition-server"</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>priority</span>: <span style=color:#2aa198>1</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>force</span>: <span style=color:#cb4b16>true</span>
-</span></span><span style=display:flex><span><span
style=color:#268bd2>enabled</span>: <span style=color:#cb4b16>false</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>enabled</span>: <span style=color:#cb4b16>true</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>conditions</span>:
</span></span><span style=display:flex><span> - <span
style=color:#268bd2>from</span>:
</span></span><span style=display:flex><span> <span
style=color:#268bd2>match</span>: <span style=color:#2aa198>"application =
condition-client"</span>
</span></span><span style=display:flex><span> <span
style=color:#268bd2>to</span>:
-</span></span><span style=display:flex><span> - <span
style=color:#268bd2>match</span>: <span style=color:#2aa198>"port =
20000"</span>
-</span></span></code></pre></div><p>For the complete example, please
+</span></span><span style=display:flex><span> - <span
style=color:#268bd2>match</span>: <span style=color:#2aa198>"port =
20001"</span>
+</span></span></code></pre></div><p>Key
fields:</p><ul><li><code>enabled</code>: whether this rule is enabled; it must
be set to <code>true</code> when published.</li><li><code>force</code>: whether
the rule stays effective when it filters out every provider. <code>true</code>
means no fallback and the call fails directly; <code>false</code> means falling
back to the full address list.</li></ul><p>Expected
results:</p><ul><li><p>Before the rule is published, the client calls normally
and [...]
+</span></span></code></pre></div></li><li><p>After the rule is deleted, the
client calls become unrestricted again.</p></li></ul><blockquote><p>When
<code>force: true</code> and the rule filters out every provider, the call
fails directly and the client log contains
+<code>route an empty set in condition-route</code>, which means the rule is
effective but matches no instance.
+In that case, check whether the <code>to.match</code> condition is consistent
with the actual instance parameters (such as the port).</p></blockquote><p>For
the complete example, please
see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/condition>Full
Example Code</a>.</p><h3 id=static-configuration-api>Static configuration
API</h3><p>Besides the dynamic approach above, condition router also supports
injecting routing rules statically in code. Static configuration does not
require a config center, and it can work with direct URLs or with instances
discovered from a registry.</p><p>The following example shows a service-scope
static condition router: [...]
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(clientApplication),
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRouter</span>(
@@ -744,7 +751,7 @@ see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/conditi
</span></span><span style=display:flex><span>)
</span></span></code></pre></div><p>Parameters:</p><ul><li><code>router.WithScope("service")</code>:
applies the rule at service
scope.</li><li><code>router.WithKey(greet.GreetServiceName)</code>: binds the
rule to the target service
key.</li><li><code>router.WithConditions(...)</code>: declares the static
condition expressions.</li><li><code>router.WithForce(true)</code>: controls
whether fallback is allowed when the rule does not match.</li></ul><p>The
static sample in <code>dubbo-go-s [...]
see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/static_config/condition>Full
Example Code</a>.</p><h3 id=priority-and-merge-semantics>Priority and merge
semantics</h3><ul><li>Dynamically delivered routing rules override static
configuration.</li><li>When <code>dubbo.WithRouter(...)</code> is called
multiple times, append semantics apply and multiple static router entries are
appended to the instance configuration.</li><li>When
<code>router.WithConditions(...)</co [...]
-<button class="btn btn-primary mb-4
feedback--no">No</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disable
[...]
+<button class="btn btn-primary mb-4
feedback--no">No</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disable
[...]
<a
href="https://github.com/apache/dubbo-website/new/master/content/en//overview/mannual/golang-sdk/tutorial/traffic/condition_router?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+
[...]
<a
href="https://github.com/apache/dubbo-website/issues/new?title=Condition%20Router"
target=_blank><i class="fab fa-github fa-fw"></i> Create an issue</a>
<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> Create project issue</a></div><nav
id=TableOfContents><ul><li><a href=#how-to-use>How to use</a><ul><li><a
href=#prerequisites>Prerequisites</a></li><li><a
href=#condition-router>Condition router</a></li><li><a
href=#static-configuration-api>Static configuration API</a></li><li><a
href=#priority-and-merge-semantics>Priority and merge
semantics</a></li></ul></li></ul></nav></div></div></div [...]
diff --git a/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
b/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
index a88a3c5d245..4127a373ee2 100644
--- a/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
+++ b/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
@@ -47,21 +47,7 @@ Therefore, it should be used sparingly in production
environments.</p></de
<p>Follow this instruction
to <a
href="https://dubbo-next.staged.apache.org/zh-cn/overview/reference/integrations/nacos/">install
and start Nacos server</a>.</p>
<h3 id="tag-router">Tag router</h3>
-<p>The tag router enables traffic control based on tags. The following
is the example code.</p>
-<p>Server side:</p>
-<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>ins, err <span
style="color:#719e07">:=</span> dubbo.<span
style="color:#268bd2">NewInstance</span>(
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithName</span>(<span
style="color:#2aa198">&#34;tag-server&#34;</span>),
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithTag</span>(<span
style="color:#2aa198">&#34;test-Tag&#34;</span>), <span
style="color:#586e75">// set application&#39;s tag</span>
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithRegistry</span>(
-</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithNacos</span>(),
-</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithAddress</span>(RegistryAddress),
-</span></span><span style="display:flex;"><span>
),
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithProtocol</span>(
-</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithTriple</span>(),
-</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithPort</span>(<span
style="color:#2aa198">20000</span>),
-</span></span><span style="display:flex;"><span>
),
-</span></span><span style="display:flex;"><span>
)
-</span></span></code></pre></div><p>Parameters:</p></description></item><item><title>Sentinel
Rate Limiting and
Downgrade</title><link>https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/sentinel/</link><pubDate>Mon,
01 Jan 0001 00:00:00
+0000</pubDate><guid>https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/sentinel/</guid><description><p>Dubbo-go
provides a built-in rate limiting component, [...]
+<p>The tag router enables traffic control based on tags. It is commonly
used for canary releases (tag the new-version instances so that only requests
carrying the tag are routed to them) and environment isolation (instances in
different lanes are distinguished by tags to keep traffic from crossing
environments). The following is the example
code.</p></description></item><item><title>Sentinel Rate Limiting and
Downgrade</title><link>https://cn.dubbo.apache.org/en/overview/mann [...]
<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>server.<span
style="color:#268bd2">WithTpsLimiter</span>(<span
style="color:#2aa198">&#34;method-service&#34;</span>)
<span style="color:#586e75">// Currently supports implementations like
method-service, polaris, etc.& [...]
</span></span><span
style="display:flex;"><span>server.<span
style="color:#268bd2">WithTpsLimiterXxx</span>() <span
style="color:#586e75">// Set rate limiting related thresholds, please fill
in according to the specific method</span>
</span></span><span
style="display:flex;"><span><span
style="color:#719e07">//tps.limit.strategy:
&#34;slidingWindow&#34;</span>
diff --git
a/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
b/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
index 3f5481fc7b9..50722168a8e 100644
--- a/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
+++ b/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
@@ -1,4 +1,4 @@
-<!doctype html><html lang=en class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=zh-cn
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dubbo.apache.or
[...]
+<!doctype html><html lang=en class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=zh-cn
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dubbo.apache.or
[...]
<a class=dropdown-item href=/en/overview/notices/>Security Notices</a>
<a class=dropdown-item href=/en/contact/>Contributor's Guide</a></div></li><li
class="nav-item nav-item-line px-2 mb-2 mb-lg-0"><a class=nav-link
href=/en/blog/><span>Blog</span></a></li><li class="nav-item nav-item-line px-2
mb-2 mb-lg-0"><a class=nav-link
href=/en/download/><span>DOWNLOAD</span></a></li><li class="nav-item dropdown
d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown
role=button data-toggle=dropdown aria-haspopup=true
aria-expanded=false>ECOSYSTEM</ [...]
<a class=dropdown-item
href=/zh-cn/overview/mannual/control-plane/>Visualizable Console</a>
@@ -694,27 +694,57 @@
<label for=m-enoverviewnoticesregistry-check><a
href=/en/overview/notices/registry/ class="align-left pl-0 td-sidebar-link
td-sidebar-link__page" id=m-enoverviewnoticesregistry><span>Registry Center
Security</span></a></label></li><li class="td-sidebar-nav__section-title
td-sidebar-nav__section without-child" id=m-enoverviewnoticesadmin-li><input
type=checkbox id=m-enoverviewnoticesadmin-check>
<label for=m-enoverviewnoticesadmin-check><a href=/en/overview/notices/admin/
class="align-left pl-0 td-sidebar-link td-sidebar-link__page"
id=m-enoverviewnoticesadmin><span>Dubbo Admin
Security</span></a></label></li><li class="td-sidebar-nav__section-title
td-sidebar-nav__section without-child" id=m-enoverviewnoticeslog4j-li><input
type=checkbox id=m-enoverviewnoticeslog4j-check>
<label for=m-enoverviewnoticeslog4j-check><a href=/en/overview/notices/log4j/
class="align-left pl-0 td-sidebar-link td-sidebar-link__page"
id=m-enoverviewnoticeslog4j><span>Log4j Vulnerability
Impact</span></a></label></li></ul></li></ul></li></ul></nav></div></div><main
class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><nav aria-label=breadcrumb
class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a
href=/en/overview/>Documentation</a></li><li class=breadcrumb-item><a [...]
-to <a
href=https://dubbo-next.staged.apache.org/zh-cn/overview/reference/integrations/nacos/>install
and start Nacos server</a>.</p><h3 id=tag-router>Tag router</h3><p>The tag
router enables traffic control based on tags. The following is the example
code.</p><p>Server side:</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-go data-lang=go><span style=display:flex><span>ins, err <span
style=c [...]
+to <a
href=https://dubbo-next.staged.apache.org/zh-cn/overview/reference/integrations/nacos/>install
and start Nacos server</a>.</p><h3 id=tag-router>Tag router</h3><p>The tag
router enables traffic control based on tags. It is commonly used for canary
releases (tag the new-version instances so that only requests carrying the tag
are routed to them) and environment isolation (instances in different lanes are
distinguished by tags to keep traffic from crossing environments). The
following [...]
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(<span
style=color:#2aa198>"tag-server"</span>),
-</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithTag</span>(<span
style=color:#2aa198>"test-Tag"</span>), <span style=color:#586e75>//
set application's tag</span>
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithTag</span>(<span
style=color:#2aa198>"test-tag"</span>), <span style=color:#586e75>//
set application's tag</span>
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRegistry</span>(
</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithNacos</span>(),
</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithAddress</span>(RegistryAddress),
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithProtocol</span>(
</span></span><span style=display:flex><span> protocol.<span
style=color:#268bd2>WithTriple</span>(),
-</span></span><span style=display:flex><span> protocol.<span
style=color:#268bd2>WithPort</span>(<span style=color:#2aa198>20000</span>),
+</span></span><span style=display:flex><span> protocol.<span
style=color:#268bd2>WithPort</span>(<span style=color:#2aa198>20001</span>),
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span> )
-</span></span></code></pre></div><p>Parameters:</p><ul><li>dubbo.WithTag: Sets
tag that the instance carries, which used to mark the instance (e.g. Canary
Env).</li></ul><p>Client side:</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-go data-lang=go><span style=display:flex><span>atta <span
style=color:#719e07>:=</span> <span style=color:#268bd2>map</span>[<span
style=color:#dc322f>string</ [...]
+</span></span></code></pre></div><p>Parameters:</p><ul><li>dubbo.WithTag: Sets
tag that the instance carries, which used to mark the instance (e.g. Canary
Env). The tag is written into the instance metadata (<code>dubbo.tag</code>) in
the registry. Tag matching is case-sensitive, so it must exactly match the tag
carried by the client.</li></ul><p>Client side:</p><div class=highlight><pre
tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><cod
[...]
</span></span><span style=display:flex><span> constant.Tagkey: <span
style=color:#2aa198>"test-tag"</span>,
-</span></span><span style=display:flex><span> constant.ForceUseTag: <span
style=color:#2aa198>"true"</span>, <span style=color:#586e75>//
使用string类型</span>
+</span></span><span style=display:flex><span> constant.ForceUseTag: <span
style=color:#2aa198>"true"</span>, <span style=color:#586e75>// use
string type</span>
</span></span><span style=display:flex><span>}
</span></span><span style=display:flex><span>ctx <span
style=color:#719e07>:=</span> context.<span
style=color:#268bd2>WithValue</span>(context.<span
style=color:#268bd2>Background</span>(), constant.AttachmentKey, atta)
</span></span><span style=display:flex><span>resp, err <span
style=color:#719e07>:=</span> svc.<span style=color:#268bd2>Greet</span>(ctx,
<span style=color:#719e07>&</span>greet.GreetRequest{Name: name})
-</span></span></code></pre></div><p>Parameters:</p><ul><li><code>constant.TagKey</code>:
Sets tag that requests carry.</li><li><code>constant.ForceUseTag</code>: Sets
whether to force tag matching.</li></ul><blockquote><p>Untagged traffic is
routed only to untagged servers. Tagged traffic can be routed to servers with
matching tags or
-to untagged servers, depending on the force
configuration.</p></blockquote><p>For the complete example, please
-see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/tag>Full
Example Code</a>.</p><h3 id=static-configuration-api>Static configuration
API</h3><p>Besides the usage above, tag router also supports injecting routing
rules statically in code. Static configuration does not require a config
center, and it can work with direct URLs or with instances discovered from a
registry.</p><p>The following example shows an application-scope static tag
router:</p><div class=highlight [...]
+</span></span></code></pre></div><p>Parameters:</p><ul><li><code>constant.Tagkey</code>:
Sets tag that requests carry.</li><li><code>constant.ForceUseTag</code>: Sets
whether to force tag matching. With <code>"true"</code>, the call fails when no
instance matches the tag; with <code>"false"</code>, it is allowed to fall back
to untagged instances.</li></ul><blockquote><p>Untagged traffic is routed only
to untagged servers. Tagged traffic can be routed to servers with matching tags
or
+to untagged servers, depending on the force
configuration.</p></blockquote><p>Run the sample:</p><div class=highlight><pre
tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-shell data-lang=shell><span style=display:flex><span>$ go run
./go-server/cmd/server.go <span style=color:#586e75># untagged
server, port 20000</span>
+</span></span><span style=display:flex><span>$ go run
./go-tag-server/cmd/server_tag.go <span style=color:#586e75># server tagged
with test-tag, port 20001</span>
+</span></span><span style=display:flex><span>$ go run ./go-client/cmd/client.go
+</span></span></code></pre></div><p>The client makes four calls in turn, and
the expected results are:</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-fallback data-lang=fallback><span style=display:flex><span>✔
invoke successfully : receive: tag with force, response from: server-with-tag
+</span></span><span style=display:flex><span>❌ invoke failed: Failed to invoke
the method Greet.
+</span></span><span style=display:flex><span>✔ invoke successfully : receive:
tag with no-force, response from: server-without-tag
+</span></span><span style=display:flex><span>✔ invoke successfully : receive:
non-tag, response from: server-without-tag
+</span></span></code></pre></div><p>The four calls correspond to: tag matched
successfully; tag not found with force set to true (no fallback, the call
fails); tag not found but force set to false (falls back to the untagged
instance); untagged traffic (routed only to the untagged instance).</p><p>For
the complete example, please
+see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/tag>Full
Example Code</a>.</p><h3 id=dynamic-rule-configuration>Dynamic rule
configuration</h3><p>Besides request-level tags, tag rules can also be
delivered dynamically from a config center, leaving the “tag → instance
group” mapping to the rule.</p><p>Dynamic tag rules require a config
center. The client must connect to Nacos via
<code>dubbo.WithConfigCenter</code>, otherwise the log prints <code>Confi [...]
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(<span
style=color:#2aa198>"tag-client"</span>),
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRegistry</span>(
+</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithNacos</span>(),
+</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithAddress</span>(RegistryAddress),
+</span></span><span style=display:flex><span> ),
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithConfigCenter</span>(
+</span></span><span style=display:flex><span> config_center.<span
style=color:#268bd2>WithNacos</span>(),
+</span></span><span style=display:flex><span> config_center.<span
style=color:#268bd2>WithAddress</span>(RegistryAddress),
+</span></span><span style=display:flex><span> ),
+</span></span><span style=display:flex><span>)
+</span></span></code></pre></div><p>Create a config in Nacos with <code>Data
ID</code> set to <code>{application_name}.tag-router</code> (the application
name here is the <strong>server-side</strong> application name, e.g.
<code>tag-server.tag-router</code>), Group set to the default
<code>DEFAULT_GROUP</code>, and format set to <code>YAML</code>.</p><p>Example
rule — route requests carrying the <code>gray</code> tag to instances with
<code>dubbo.tag=test-tag</code>:</p><div class=highli [...]
+</span></span><span style=display:flex><span><span
style=color:#268bd2>scope</span>: application
+</span></span><span style=display:flex><span><span
style=color:#268bd2>key</span>: tag-server
+</span></span><span style=display:flex><span><span
style=color:#268bd2>force</span>: <span style=color:#cb4b16>false</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>enabled</span>: <span style=color:#cb4b16>true</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>priority</span>: <span style=color:#2aa198>1</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>tags</span>:
+</span></span><span style=display:flex><span> - <span
style=color:#268bd2>name</span>: gray
+</span></span><span style=display:flex><span> <span
style=color:#268bd2>match</span>:
+</span></span><span style=display:flex><span> - <span
style=color:#268bd2>key</span>: dubbo.tag
+</span></span><span style=display:flex><span> <span
style=color:#268bd2>value</span>:
+</span></span><span style=display:flex><span> <span
style=color:#268bd2>exact</span>: test-tag
+</span></span></code></pre></div><p>Key
fields:</p><ul><li><code>tags[].name</code>: the tag name, corresponding to the
tag value carried in the request attachment.</li><li><code>tags[].match</code>:
matches the instance group by instance URL parameters; <code>value</code>
supports <code>exact</code>, <code>prefix</code>, <code>regex</code>,
etc.</li><li><code>tags[].addresses</code>: selects the instance group directly
by <code>ip:port</code>; use either this or <code>match</code>.</li> [...]
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(clientApplication),
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRouter</span>(
</span></span><span style=display:flex><span> router.<span
style=color:#268bd2>WithScope</span>(<span
style=color:#2aa198>"application"</span>),
@@ -734,10 +764,10 @@ see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/tag>Ful
</span></span><span style=display:flex><span>})
</span></span></code></pre></div><p>Parameters:</p><ul><li><code>router.WithScope("application")</code>:
applies the rule at application
scope.</li><li><code>router.WithKey(clientApplication)</code>: binds the rule
to the consumer application.</li><li><code>router.WithTags(...)</code>:
declares the static mapping from tag to address
list.</li><li><code>router.WithForce(...)</code>: controls whether fallback is
allowed when no tagged provider matches.</li></ul><p>The static sample in <cod
[...]
see: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/static_config/tag>Full
Example Code</a>.</p><h3 id=priority-and-merge-semantics>Priority and merge
semantics</h3><ul><li>Dynamically delivered routing rules override static
configuration.</li><li>When <code>dubbo.WithRouter(...)</code> is called
multiple times, append semantics apply and multiple static router entries are
appended to the instance configuration.</li><li>When
<code>router.WithTags(...)</code> is set m [...]
-<button class="btn btn-primary mb-4
feedback--no">No</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disable
[...]
+<button class="btn btn-primary mb-4
feedback--no">No</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disable
[...]
<a
href="https://github.com/apache/dubbo-website/new/master/content/en//overview/mannual/golang-sdk/tutorial/traffic/tag_router?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+t
[...]
<a
href="https://github.com/apache/dubbo-website/issues/new?title=Tag%20Router"
target=_blank><i class="fab fa-github fa-fw"></i> Create an issue</a>
-<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> Create project issue</a></div><nav
id=TableOfContents><ul><li><a href=#how-to-use>How to use</a><ul><li><a
href=#prerequisites>Prerequisites</a></li><li><a href=#tag-router>Tag
router</a></li><li><a href=#static-configuration-api>Static configuration
API</a></li><li><a href=#priority-and-merge-semantics>Priority and merge
semantics</a></li></ul></li></ul></nav></div></div></div></div><foot [...]
+<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> Create project issue</a></div><nav
id=TableOfContents><ul><li><a href=#how-to-use>How to use</a><ul><li><a
href=#prerequisites>Prerequisites</a></li><li><a href=#tag-router>Tag
router</a></li><li><a href=#dynamic-rule-configuration>Dynamic rule
configuration</a></li><li><a href=#static-configuration-api>Static
configuration API</a></li><li><a href=#priority-and-merge-semantics>Priority
and [...]
<button class="contact-btn qr-container"
onmouseover='showQRCode("dingding-qr")'
onmouseout='hideQRCode("dingding-qr")'>DINGTALK CHANNEL<div class=qr-code
id=dingding-qr style=display:none><img
src=https://img.alicdn.com/imgextra/i4/O1CN01buuadT274Lj33QZWQ_!!6000000007743-0-tps-1170-1477.jpg
alt="DingTalk QR Code"></div></button>
<button class=contact-btn><a
href=https://github.com/apache/dubbo/>GitHub</a></button></div></div><div
class=footer-container-right><ul><li>DOCUMENTATION</li><li><a
href=/en/overview/>Overview</a></li><li><a href=/en/overview/quickstart/>Quick
Start</a></li><li><a
href=/en/contact/contributor/software-donation-guide_dev/>Developer
guide</a></li></ul><ul><li>RESOURCES</li><li><a
href=/en/contact/>Community</a></li></ul></div></div><div
style="width:85.125rem;height:0;border:1px solid #ddd [...]
project logo are either registered trademarks or trademarks of The Apache
Software Foundation in the United States
diff --git a/en/sitemap.xml b/en/sitemap.xml
index 1f88903df2c..8326a1aec9c 100644
--- a/en/sitemap.xml
+++ b/en/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://cn.dubbo.apache.org/en/blog/2023/01/16/alibaba-upgrades-dubbo3-to-fully-replace-hsf2/</loc><lastmod>2024-09-30T17:53:33+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link
rel="alternate" hreflang="zh-cn"
href="https://cn.dubbo.apache.org/zh-cn/blog/2023/01/16/%E9%98%BF%E9%87%8C%E5%B7
[...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://cn.dubbo.apache.org/en/blog/2023/01/16/alibaba-upgrades-dubbo3-to-fully-replace-hsf2/</loc><lastmod>2024-09-30T17:53:33+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link
rel="alternate" hreflang="zh-cn"
href="https://cn.dubbo.apache.org/zh-cn/blog/2023/01/16/%E9%98%BF%E9%87%8C%E5%B7
[...]
\ No newline at end of file
diff --git a/js/app.js b/js/app.js
index b17e7b31a97..069248774b1 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,2 +1 @@
-(function(){"use strict";var t={5030:function(t,e,r){var
n=r(2856),o=function(){var t=this,e=t._self._c;return
e("div",{attrs:{id:"app"}},[e("el-row",[e("el-col",{attrs:{span:24}},[e("div",{staticStyle:{"font-size":"30px"}},[t._v("Dubbo
基准测试")])])],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("div",{staticStyle:{"font-size":"15px","text-align":"right"}},[e("a",{attrs:{target:"_blank",href:"https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-
[...]
-//# sourceMappingURL=app.a7f8f515.js.map
\ No newline at end of file
+// Respond to static link checks, which will be dynamically replaced at build
time
\ No newline at end of file
diff --git a/js/chunk-vendors.js b/js/chunk-vendors.js
index e33ee56a2ec..069248774b1 100644
--- a/js/chunk-vendors.js
+++ b/js/chunk-vendors.js
@@ -1,60 +1 @@
-(self["webpackChunkdubbo_benchmark"]=self["webpackChunkdubbo_benchmark"]||[]).push([[504],{1656:function(e,t,n){"use
strict";function i(e,t,n,i,r,o,a,s){var l,u="function"===typeof
e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof
__VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&& [...]
-/**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright JS Foundation and other contributors <https://js.foundation/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters &
Editors
- */(function(){var o,a="4.17.10",s=200,l="Unsupported core-js use. Try
https://npms.io/search?q=ponyfill.",u="Expected a
function",c="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,f=2,g=4,v=1,m=2,y=1,b=2,_=4,x=8,w=16,S=32,C=64,k=128,M=256,T=512,D=30,I="...",O=800,A=16,E=1,P=2,L=3,N=1/0,R=9007199254740991,$=17976931348623157e292,z=NaN,V=4294967295,F=V-1,B=V>>>1,j=[["ary",k],["bind",y],["bindKey",b],["curry",x],["curryRight",w],["flip",T],["partial",S],["partialRight",C],
[...]
-/**
- * @fileOverview Kickass library to create and place poppers near their
reference elements.
- * @version {{version}}
- * @license
- * Copyright (c) 2016 Federico Zivolo and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE
- * SOFTWARE.
- */(function(o,a){i=a,r="function"===typeof i?i.call(t,n,t,e):i,void
0===r||(e.exports=r)})(0,function(){var
e=window,t={placement:"bottom",gpuAcceleration:!0,offset:0,boundariesElement:"viewport",boundariesPadding:5,preventOverflowOrder:["left","right","top","bottom"],flipBehavior:"flip",arrowElement:"[x-arrow]",arrowOffset:0,modifiers:["shift","offset","preventOverflow","keepTogether","arrow","flip","applyStyle"],modifiersIgnored:[],forceAbsolute:!1};function
n(e,n,i){this._reference=e [...]
-/*!
- * jQuery JavaScript Library v3.7.1
- * https://jquery.com/
- *
- * Copyright OpenJS Foundation and other contributors
- * Released under the MIT license
- * https://jquery.org/license
- *
- * Date: 2023-08-28T13:37Z
- */
-function(t,n){"use strict";"object"===typeof
e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new
Error("jQuery requires a window with a document");return
n(e)}:n(t)}("undefined"!==typeof window?window:this,function(n,o){"use
strict";var a=[],s=Object.getPrototypeOf,l=a.slice,u=a.flat?function(e){return
a.flat.call(e)}:function(e){return
a.concat.apply([],e)},c=a.push,h=a.indexOf,d={},p=d.toString,f=d.hasOwnProperty,g=f.toString,v=g.call(Object),m={},y=function(e){
[...]
-/**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @param {?boolean} capture Check if the capture phase is supported.
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-function o(e,t){if(!r.canUseDOM||t&&!("addEventListener"in
document))return!1;var n="on"+e,o=n in document;if(!o){var
a=document.createElement("div");a.setAttribute(n,"return;"),o="function"===typeof
a[n]}return!o&&i&&"wheel"===e&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}r.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=o},9030:function(e,t,n){"use
strict";var i=n(8656),r=n(2021),o= [...]
-//# sourceMappingURL=chunk-vendors.8eb077c9.js.map
\ No newline at end of file
+// Respond to static link checks, which will be dynamically replaced at build
time
\ No newline at end of file
diff --git a/sitemap.xml b/sitemap.xml
index 7360b417736..f25d44f95f8 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://cn.dubbo.apache.org/zh-cn/sitemap.xml</loc><lastmod>2026-08-09T13:40:17+08:00</lastmod></sitemap><sitemap><loc>https://cn.dubbo.apache.org/en/sitemap.xml</loc><lastmod>2026-08-09T13:40:17+08:00</lastmod></sitemap></sitemapindex>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><sitemapindex
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://cn.dubbo.apache.org/zh-cn/sitemap.xml</loc><lastmod>2026-08-11T21:28:00+08:00</lastmod></sitemap><sitemap><loc>https://cn.dubbo.apache.org/en/sitemap.xml</loc><lastmod>2026-08-11T21:28:00+08:00</lastmod></sitemap></sitemapindex>
\ No newline at end of file
diff --git a/zh-cn/index.xml b/zh-cn/index.xml
index 6039c5afc77..84eb2044dc6 100644
--- a/zh-cn/index.xml
+++ b/zh-cn/index.xml
@@ -6301,23 +6301,23 @@ dubbo-go 仓库
<code>tools/protoc-gen-go-triple</code> 目录下内
<h4 id="启动nacos配置中心">启动Nacos配置中心</h4>
<p>参考这个教程来<a
href="https://dubbo-next.staged.apache.org/zh-cn/overview/reference/integrations/nacos/">启动Nacos</a>。</p>
<h3 id="tag-router-介绍">Tag router 介绍</h3>
-<p>Tag router可以通过标签对流量进行管控,以下为示例代码。</p>
+<p>Tag
router可以通过标签对流量进行管控,常用于灰度发布(新版本实例打上灰度标签,只有携带该标签的请求会路由过去)、环境隔离(不同泳道的实例用标签区分,避免流量串环境)等场景。以下为示例代码。</p>
<p>服务端部分:</p>
<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>ins, err <span
style="color:#719e07">:=</span> dubbo.<span
style="color:#268bd2">NewInstance</span>(
</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithName</span>(<span
style="color:#2aa198">&#34;tag-server&#34;</span>),
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithTag</span>(<span
style="color:#2aa198">&#34;test-Tag&#34;</span>), <span
style="color:#586e75">// set application&#39;s tag</span>
+</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithTag</span>(<span
style="color:#2aa198">&#34;test-tag&#34;</span>), <span
style="color:#586e75">// set application&#39;s tag</span>
</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithRegistry</span>(
</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithNacos</span>(),
</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithAddress</span>(RegistryAddress),
</span></span><span style="display:flex;"><span>
),
</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithProtocol</span>(
</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithTriple</span>(),
-</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithPort</span>(<span
style="color:#2aa198">20000</span>),
+</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithPort</span>(<span
style="color:#2aa198">20001</span>),
</span></span><span style="display:flex;"><span>
),
</span></span><span style="display:flex;"><span>
)
</span></span></code></pre></div><p>参数:</p>
<ul>
-<li>dubbo.WithTag: 设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。</li>
+<li>dubbo.WithTag:
设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。标签会写入注册中心的实例元数据(<code>dubbo.tag</code>)。标签匹配区分大小写,需与客户端携带的标签写法完全一致。</li>
</ul>
<p>客户端部分:</p>
<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>atta <span
style="color:#719e07">:=</span> <span
style="color:#268bd2">map</span>[<span
style="color:#dc322f">string</span>]<span
style="color:#dc322f">string</span>{
diff --git
a/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
b/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
index 0df31e2c41c..8d99500a7db 100644
---
a/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
+++
b/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/index.html
@@ -1,4 +1,4 @@
-<!doctype html><html lang=zh-cn class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=en
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dub
[...]
+<!doctype html><html lang=zh-cn class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=en
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/condition_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dub
[...]
<a class=dropdown-item href=/zh-cn/overview/notices/>安全公告</a>
<a class=dropdown-item href=/zh-cn/contact/>贡献者指南</a></div></li><li
class="nav-item nav-item-line px-2 mb-2 mb-lg-0"><a class=nav-link
href=/zh-cn/blog/><span>博客</span></a></li><li class="nav-item nav-item-line
px-2 mb-2 mb-lg-0"><a class=nav-link
href=/zh-cn/download/><span>下载</span></a></li><li class="nav-item dropdown
d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown
role=button data-toggle=dropdown aria-haspopup=true
aria-expanded=false>生态</a><div class="dropdo [...]
<a class=dropdown-item href=/zh-cn/overview/mannual/control-plane/>可视化控制台</a>
@@ -712,19 +712,26 @@
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span> )
</span></span><span style=display:flex><span>rep, err <span
style=color:#719e07>:=</span> srv.<span
style=color:#268bd2>Greet</span>(context.<span
style=color:#268bd2>Background</span>(), <span
style=color:#719e07>&</span>greet.GreetRequest{Name: <span
style=color:#2aa198>"hello world"</span>})
-</span></span></code></pre></div><blockquote><p>上述示例使用的是动态配置方式,需要在nacos等配置中心动态设置匹配规则。</p></blockquote><p>Nacos配置示例:</p><blockquote><p>配置的<code>Data
ID</code>名字必须为: <code>{application_name}.{router_type}</code>。
-例如: <code>condition-server.condition-router</code>。</p></blockquote><div
class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-yaml data-lang=yaml><span style=display:flex><span><span
style=color:#268bd2>configVersion</span>: v3.1
+</span></span></code></pre></div><blockquote><p>上述示例使用的是动态配置方式,需要在nacos等配置中心动态设置匹配规则。</p></blockquote><p>运行示例(两个服务端同属应用<code>condition-server</code>,客户端每
5 秒调用一次<code>Greet</code>方法):</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-shell data-lang=shell><span style=display:flex><span>$ go run
./go-server/cmd/server.go <span style=color:#586e75>#
20001端口</span>
+</span></span><span style=display:flex><span>$ go run
./go-node2-server/cmd/server_node2.go <span style=color:#586e75>#
20000端口</span>
+</span></span><span style=display:flex><span>$ go run ./go-client/cmd/client.go
+</span></span></code></pre></div><p>Nacos配置示例:</p><blockquote><p>配置的<code>Data
ID</code>名字必须为: <code>{application_name}.{router_type}</code>。
+例如:
<code>condition-server.condition-router</code>(这里的应用名是<strong>服务端</strong>的应用名)。
+Group
使用默认的<code>DEFAULT_GROUP</code>,配置格式选择<code>YAML</code>。</p></blockquote><div
class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-yaml data-lang=yaml><span style=display:flex><span><span
style=color:#268bd2>configVersion</span>: V3.3.2
</span></span><span style=display:flex><span><span
style=color:#268bd2>scope</span>: <span
style=color:#2aa198>"application"</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>key</span>: <span
style=color:#2aa198>"condition-server"</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>priority</span>: <span style=color:#2aa198>1</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>force</span>: <span style=color:#cb4b16>true</span>
-</span></span><span style=display:flex><span><span
style=color:#268bd2>enabled</span>: <span style=color:#cb4b16>false</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>enabled</span>: <span style=color:#cb4b16>true</span>
</span></span><span style=display:flex><span><span
style=color:#268bd2>conditions</span>:
</span></span><span style=display:flex><span> - <span
style=color:#268bd2>from</span>:
</span></span><span style=display:flex><span> <span
style=color:#268bd2>match</span>: <span style=color:#2aa198>"application =
condition-client"</span>
</span></span><span style=display:flex><span> <span
style=color:#268bd2>to</span>:
-</span></span><span style=display:flex><span> - <span
style=color:#268bd2>match</span>: <span style=color:#2aa198>"port =
20000"</span>
-</span></span></code></pre></div><p>完整示例请见: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/condition>本示例完整代码</a>。</p><h3
id=静态配置-api>静态配置 API</h3><p>除上面的动态配置方式外,Condition router 也支持通过静态配置 API
在代码中注入路由规则。静态配置不要求配置中心参与,可以配合直连 URL 使用,也可以配合注册中心使用。</p><p>下面是一个服务级静态 condition
router 的示例:</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-go data-lang=go><span style=display:flex> [...]
+</span></span><span style=display:flex><span> - <span
style=color:#268bd2>match</span>: <span style=color:#2aa198>"port =
20001"</span>
+</span></span></code></pre></div><p>关键字段说明:</p><ul><li><code>enabled</code>:
是否启用本条规则,下发时需要设置为<code>true</code>。</li><li><code>force</code>:
路由结果为空集时是否强制生效。<code>true</code>表示不回退、直接调用失败;<code>false</code>表示回退到全量地址列表。</li></ul><p>预期结果:</p><ul><li><p>未下发规则时,客户端可以正常调用,响应来自
20000 或 20001 端口的实例。</p></li><li><p>规则下发后,运行中的客户端无需重启即可生效,响应只会来自 20001
端口的实例:</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=langu [...]
+</span></span></code></pre></div></li><li><p>删除规则后,客户端调用恢复为不受限状态。</p></li></ul><blockquote><p>当<code>force:
true</code>且规则过滤后没有可用 provider 时,调用会直接失败,客户端日志中可以看到
+<code>route an empty set in condition-route</code>字样,说明规则已生效但未匹配到任何实例,
+此时应检查<code>to.match</code>条件与实例的实际参数(如端口)是否一致。</p></blockquote><p>完整示例请见: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/condition>本示例完整代码</a>。</p><h3
id=静态配置-api>静态配置 API</h3><p>除上面的动态配置方式外,Condition router 也支持通过静态配置 API
在代码中注入路由规则。静态配置不要求配置中心参与,可以配合直连 URL 使用,也可以配合注册中心使用。</p><p>下面是一个服务级静态 condition
router 的示例:</p><div class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-go data-lan [...]
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(clientApplication),
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRouter</span>(
</span></span><span style=display:flex><span> router.<span
style=color:#268bd2>WithScope</span>(<span
style=color:#2aa198>"service"</span>),
@@ -737,7 +744,7 @@
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span>)
</span></span></code></pre></div><p>参数:</p><ul><li><code>router.WithScope("service")</code>:
按服务维度生效。</li><li><code>router.WithKey(greet.GreetServiceName)</code>:
指定当前规则作用的服务键。</li><li><code>router.WithConditions(...)</code>: 静态声明 condition
router 的匹配表达式。</li><li><code>router.WithForce(true)</code>:
控制规则命中失败时是否允许回退。</li></ul><p><code>dubbo-go-samples</code> 中的静态示例使用直连
URL,只是为了最小化演示,不代表该 API 只能用于直连场景。</p><p>静态配置示例请见: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/stat [...]
-<button class="btn btn-primary mb-4
feedback--no">否</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled
[...]
+<button class="btn btn-primary mb-4
feedback--no">否</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled
[...]
<a
href="https://github.com/apache/dubbo-website/new/master/content/zh-cn//overview/mannual/golang-sdk/tutorial/traffic/condition_router?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%
[...]
<a
href="https://github.com/apache/dubbo-website/issues/new?title=%e6%9d%a1%e4%bb%b6%e8%b7%af%e7%94%b1"
target=_blank><i class="fab fa-github fa-fw"></i> 登记问题</a>
<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> 提交项目问题</a></div><nav id=TableOfContents><ul><li><a
href=#使用方法>使用方法</a><ul><li><a href=#前置准备>前置准备</a></li><li><a
href=#condition-router-介绍>Condition router 介绍</a></li><li><a
href=#静态配置-api>静态配置 API</a></li><li><a
href=#规则优先级与合并语义>规则优先级与合并语义</a></li></ul></li></ul></nav></div></div></div></div><footer><div
class=footer-container><div class=footer-container-left><div
class=footer-container-le [...]
diff --git a/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/index.xml
b/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/index.xml
index 8c550dc0386..535cd7ba6f9 100644
--- a/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/index.xml
+++ b/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/index.xml
@@ -13,23 +13,23 @@
<h4 id="启动nacos配置中心">启动Nacos配置中心</h4>
<p>参考这个教程来<a
href="https://dubbo-next.staged.apache.org/zh-cn/overview/reference/integrations/nacos/">启动Nacos</a>。</p>
<h3 id="tag-router-介绍">Tag router 介绍</h3>
-<p>Tag router可以通过标签对流量进行管控,以下为示例代码。</p>
+<p>Tag
router可以通过标签对流量进行管控,常用于灰度发布(新版本实例打上灰度标签,只有携带该标签的请求会路由过去)、环境隔离(不同泳道的实例用标签区分,避免流量串环境)等场景。以下为示例代码。</p>
<p>服务端部分:</p>
<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>ins, err <span
style="color:#719e07">:=</span> dubbo.<span
style="color:#268bd2">NewInstance</span>(
</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithName</span>(<span
style="color:#2aa198">&#34;tag-server&#34;</span>),
-</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithTag</span>(<span
style="color:#2aa198">&#34;test-Tag&#34;</span>), <span
style="color:#586e75">// set application&#39;s tag</span>
+</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithTag</span>(<span
style="color:#2aa198">&#34;test-tag&#34;</span>), <span
style="color:#586e75">// set application&#39;s tag</span>
</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithRegistry</span>(
</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithNacos</span>(),
</span></span><span style="display:flex;"><span>
registry.<span
style="color:#268bd2">WithAddress</span>(RegistryAddress),
</span></span><span style="display:flex;"><span>
),
</span></span><span style="display:flex;"><span>
dubbo.<span style="color:#268bd2">WithProtocol</span>(
</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithTriple</span>(),
-</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithPort</span>(<span
style="color:#2aa198">20000</span>),
+</span></span><span style="display:flex;"><span>
protocol.<span
style="color:#268bd2">WithPort</span>(<span
style="color:#2aa198">20001</span>),
</span></span><span style="display:flex;"><span>
),
</span></span><span style="display:flex;"><span>
)
</span></span></code></pre></div><p>参数:</p>
<ul>
-<li>dubbo.WithTag: 设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。</li>
+<li>dubbo.WithTag:
设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。标签会写入注册中心的实例元数据(<code>dubbo.tag</code>)。标签匹配区分大小写,需与客户端携带的标签写法完全一致。</li>
</ul>
<p>客户端部分:</p>
<div class="highlight"><pre tabindex="0"
style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code
class="language-go" data-lang="go"><span
style="display:flex;"><span>atta <span
style="color:#719e07">:=</span> <span
style="color:#268bd2">map</span>[<span
style="color:#dc322f">string</span>]<span
style="color:#dc322f">string</span>{
diff --git
a/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
b/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
index 16161a5693e..3eef21036ed 100644
--- a/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
+++ b/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/index.html
@@ -1,4 +1,4 @@
-<!doctype html><html lang=zh-cn class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=en
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dubbo.apache.or
[...]
+<!doctype html><html lang=zh-cn class=no-js><head><meta name=ROBOTS
content="INDEX, FOLLOW"><link rel=alternate hreflang=en
href=https://cn.dubbo.apache.org/en/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><link
rel=canonical
href=https://cn.dubbo.apache.org/zh-cn/overview/mannual/golang-sdk/tutorial/traffic/tag_router/><script>var
_paq=window._paq=window._paq||[];_paq.push(["setDocumentTitle",document.domain+"/"+document.title]),_paq.push(["setCookieDomain","*.dubbo.apache.or
[...]
<a class=dropdown-item href=/zh-cn/overview/notices/>安全公告</a>
<a class=dropdown-item href=/zh-cn/contact/>贡献者指南</a></div></li><li
class="nav-item nav-item-line px-2 mb-2 mb-lg-0"><a class=nav-link
href=/zh-cn/blog/><span>博客</span></a></li><li class="nav-item nav-item-line
px-2 mb-2 mb-lg-0"><a class=nav-link
href=/zh-cn/download/><span>下载</span></a></li><li class="nav-item dropdown
d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown
role=button data-toggle=dropdown aria-haspopup=true
aria-expanded=false>生态</a><div class="dropdo [...]
<a class=dropdown-item href=/zh-cn/overview/mannual/control-plane/>可视化控制台</a>
@@ -688,25 +688,55 @@
<label for=m-zh-cnoverviewnoticesprotocol-check><a
href=/zh-cn/overview/notices/protocol/ class="align-left pl-0 td-sidebar-link
td-sidebar-link__page" id=m-zh-cnoverviewnoticesprotocol><span>RPC
协议安全</span></a></label></li><li class="td-sidebar-nav__section-title
td-sidebar-nav__section without-child"
id=m-zh-cnoverviewnoticesregistry-li><input type=checkbox
id=m-zh-cnoverviewnoticesregistry-check>
<label for=m-zh-cnoverviewnoticesregistry-check><a
href=/zh-cn/overview/notices/registry/ class="align-left pl-0 td-sidebar-link
td-sidebar-link__page"
id=m-zh-cnoverviewnoticesregistry><span>注册中心安全</span></a></label></li><li
class="td-sidebar-nav__section-title td-sidebar-nav__section without-child"
id=m-zh-cnoverviewnoticesadmin-li><input type=checkbox
id=m-zh-cnoverviewnoticesadmin-check>
<label for=m-zh-cnoverviewnoticesadmin-check><a
href=/zh-cn/overview/notices/admin/ class="align-left pl-0 td-sidebar-link
td-sidebar-link__page" id=m-zh-cnoverviewnoticesadmin><span>Dubbo Admin
安全</span></a></label></li><li class="td-sidebar-nav__section-title
td-sidebar-nav__section without-child" id=m-zh-cnoverviewnoticeslog4j-li><input
type=checkbox id=m-zh-cnoverviewnoticeslog4j-check>
-<label for=m-zh-cnoverviewnoticeslog4j-check><a
href=/zh-cn/overview/notices/log4j/ class="align-left pl-0 td-sidebar-link
td-sidebar-link__page" id=m-zh-cnoverviewnoticeslog4j><span>Log4j
漏洞影响</span></a></label></li></ul></li></ul></li></ul></nav></div></div><main
class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><nav aria-label=breadcrumb
class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a
href=/zh-cn/overview/>文档</a></li><li class=breadcrumb-item><a href=/zh-cn/ove
[...]
+<label for=m-zh-cnoverviewnoticeslog4j-check><a
href=/zh-cn/overview/notices/log4j/ class="align-left pl-0 td-sidebar-link
td-sidebar-link__page" id=m-zh-cnoverviewnoticeslog4j><span>Log4j
漏洞影响</span></a></label></li></ul></li></ul></li></ul></nav></div></div><main
class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><nav aria-label=breadcrumb
class=td-breadcrumbs><ol class=breadcrumb><li class=breadcrumb-item><a
href=/zh-cn/overview/>文档</a></li><li class=breadcrumb-item><a href=/zh-cn/ove
[...]
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(<span
style=color:#2aa198>"tag-server"</span>),
-</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithTag</span>(<span
style=color:#2aa198>"test-Tag"</span>), <span style=color:#586e75>//
set application's tag</span>
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithTag</span>(<span
style=color:#2aa198>"test-tag"</span>), <span style=color:#586e75>//
set application's tag</span>
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRegistry</span>(
</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithNacos</span>(),
</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithAddress</span>(RegistryAddress),
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithProtocol</span>(
</span></span><span style=display:flex><span> protocol.<span
style=color:#268bd2>WithTriple</span>(),
-</span></span><span style=display:flex><span> protocol.<span
style=color:#268bd2>WithPort</span>(<span style=color:#2aa198>20000</span>),
+</span></span><span style=display:flex><span> protocol.<span
style=color:#268bd2>WithPort</span>(<span style=color:#2aa198>20001</span>),
</span></span><span style=display:flex><span> ),
</span></span><span style=display:flex><span> )
-</span></span></code></pre></div><p>参数:</p><ul><li>dubbo.WithTag:
设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。</li></ul><p>客户端部分:</p><div class=highlight><pre
tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-go data-lang=go><span style=display:flex><span>atta <span
style=color:#719e07>:=</span> <span style=color:#268bd2>map</span>[<span
style=color:#dc322f>string</span>]<span style=color:#dc322f>string</span>{
+</span></span></code></pre></div><p>参数:</p><ul><li>dubbo.WithTag:
设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。标签会写入注册中心的实例元数据(<code>dubbo.tag</code>)。标签匹配区分大小写,需与客户端携带的标签写法完全一致。</li></ul><p>客户端部分:</p><div
class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-go data-lang=go><span style=display:flex><span>atta <span
style=color:#719e07>:=</span> <span style=color:#268bd2>map</span>[<span
style=color:#dc322f>string</spa [...]
</span></span><span style=display:flex><span> constant.Tagkey: <span
style=color:#2aa198>"test-tag"</span>,
</span></span><span style=display:flex><span> constant.ForceUseTag: <span
style=color:#2aa198>"true"</span>, <span style=color:#586e75>//
使用string类型</span>
</span></span><span style=display:flex><span>}
</span></span><span style=display:flex><span>ctx <span
style=color:#719e07>:=</span> context.<span
style=color:#268bd2>WithValue</span>(context.<span
style=color:#268bd2>Background</span>(), constant.AttachmentKey, atta)
</span></span><span style=display:flex><span>resp, err <span
style=color:#719e07>:=</span> svc.<span style=color:#268bd2>Greet</span>(ctx,
<span style=color:#719e07>&</span>greet.GreetRequest{Name: name})
-</span></span></code></pre></div><p>参数:</p><ul><li><code>constant.TagKey</code>:
设置客户端发送请求时所携带的tag标签。</li><li><code>constant.ForceUseTag</code>:
设置是否强制匹配标签。</li></ul><blockquote><p>未携带标签的流量只能打到未携带标签的服务,携带标签的流量则可以打到携带相应标签的服务以及不具有标签的服务(取决于是否配置force参数)。</p></blockquote><p>完整示例请见:
<a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/tag>本示例完整代码</a>。</p><h3
id=静态配置-api>静态配置 API</h3><p>除上面的用法外,Tag router 也支持通过静态配置 API
在代码中注入路由规则。静态配置不要求配置中心参与,可以配合直连 URL 使用,也可以配合注册中心使用。</p><p>下面是 [...]
+</span></span></code></pre></div><p>参数:</p><ul><li><code>constant.Tagkey</code>:
设置客户端发送请求时所携带的tag标签。</li><li><code>constant.ForceUseTag</code>:
设置是否强制匹配标签。<code>"true"</code>时标签匹配不到实例直接失败;<code>"false"</code>时允许回退到未打标签的实例。</li></ul><blockquote><p>未携带标签的流量只能打到未携带标签的服务,携带标签的流量则可以打到携带相应标签的服务以及不具有标签的服务(取决于是否配置force参数)。</p></blockquote><p>运行示例:</p><div
class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-sh [...]
+</span></span><span style=display:flex><span>$ go run
./go-tag-server/cmd/server_tag.go <span style=color:#586e75>#
携带test-tag标签的server,20001端口</span>
+</span></span><span style=display:flex><span>$ go run ./go-client/cmd/client.go
+</span></span></code></pre></div><p>客户端依次发起四次调用,预期结果:</p><div
class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-fallback data-lang=fallback><span style=display:flex><span>✔
invoke successfully : receive: tag with force, response from: server-with-tag
+</span></span><span style=display:flex><span>❌ invoke failed: Failed to invoke
the method Greet.
+</span></span><span style=display:flex><span>✔ invoke successfully : receive:
tag with no-force, response from: server-without-tag
+</span></span><span style=display:flex><span>✔ invoke successfully : receive:
non-tag, response from: server-without-tag
+</span></span></code></pre></div><p>四次调用分别对应:标签匹配成功、标签不存在且force为true(不回退,调用失败)、标签不存在但force为false(回退到无标签实例)、无标签流量(只路由到无标签实例)。</p><p>完整示例请见:
<a
href=https://github.com/apache/dubbo-go-samples/tree/main/router/tag>本示例完整代码</a>。</p><h3
id=动态规则配置>动态规则配置</h3><p>除请求级标签外,还可以从配置中心动态下发标签规则,把"标签 →
实例分组"的映射交给规则维护。</p><p>动态标签规则依赖配置中心,客户端必须通过<code>dubbo.WithConfigCenter</code>接入
Nacos,否则日志会提示<code>Config center does not start, Tag router will not be
enabled</code>:</p><div class=highlight><pre tabindex [...]
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(<span
style=color:#2aa198>"tag-client"</span>),
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRegistry</span>(
+</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithNacos</span>(),
+</span></span><span style=display:flex><span> registry.<span
style=color:#268bd2>WithAddress</span>(RegistryAddress),
+</span></span><span style=display:flex><span> ),
+</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithConfigCenter</span>(
+</span></span><span style=display:flex><span> config_center.<span
style=color:#268bd2>WithNacos</span>(),
+</span></span><span style=display:flex><span> config_center.<span
style=color:#268bd2>WithAddress</span>(RegistryAddress),
+</span></span><span style=display:flex><span> ),
+</span></span><span style=display:flex><span>)
+</span></span></code></pre></div><p>在 Nacos 新建配置,<code>Data
ID</code>为<code>{application_name}.tag-router</code>(这里的应用名是<strong>服务端</strong>的应用名,例如<code>tag-server.tag-router</code>),Group
使用默认的<code>DEFAULT_GROUP</code>,配置格式选择<code>YAML</code>。</p><p>配置内容示例——把携带<code>gray</code>标签的请求路由到<code>dubbo.tag=test-tag</code>的实例:</p><div
class=highlight><pre tabindex=0
style=color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code
class=language-yaml data-lang=yaml>< [...]
+</span></span><span style=display:flex><span><span
style=color:#268bd2>scope</span>: application
+</span></span><span style=display:flex><span><span
style=color:#268bd2>key</span>: tag-server
+</span></span><span style=display:flex><span><span
style=color:#268bd2>force</span>: <span style=color:#cb4b16>false</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>enabled</span>: <span style=color:#cb4b16>true</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>priority</span>: <span style=color:#2aa198>1</span>
+</span></span><span style=display:flex><span><span
style=color:#268bd2>tags</span>:
+</span></span><span style=display:flex><span> - <span
style=color:#268bd2>name</span>: gray
+</span></span><span style=display:flex><span> <span
style=color:#268bd2>match</span>:
+</span></span><span style=display:flex><span> - <span
style=color:#268bd2>key</span>: dubbo.tag
+</span></span><span style=display:flex><span> <span
style=color:#268bd2>value</span>:
+</span></span><span style=display:flex><span> <span
style=color:#268bd2>exact</span>: test-tag
+</span></span></code></pre></div><p>关键字段说明:</p><ul><li><code>tags[].name</code>:
标签名,与请求 attachment 中携带的标签值对应。</li><li><code>tags[].match</code>: 按实例 URL
参数匹配实例分组,<code>value</code>支持<code>exact</code>、<code>prefix</code>、<code>regex</code>等匹配方式。</li><li><code>tags[].addresses</code>:
直接按<code>ip:port</code>圈定实例分组,与<code>match</code>二选一。</li><li><code>force</code>:
标签匹配不到实例时是否回退。<code>true</code>不回退、直接失败;<code>false</code>回退到未打标签的实例。</li><li><code>enabled</code>:
是否启用本条规则。</li></ul><p>规则 [...]
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithName</span>(clientApplication),
</span></span><span style=display:flex><span> dubbo.<span
style=color:#268bd2>WithRouter</span>(
</span></span><span style=display:flex><span> router.<span
style=color:#268bd2>WithScope</span>(<span
style=color:#2aa198>"application"</span>),
@@ -725,10 +755,10 @@
</span></span><span style=display:flex><span> constant.Tagkey: <span
style=color:#2aa198>"gray"</span>,
</span></span><span style=display:flex><span>})
</span></span></code></pre></div><p>参数:</p><ul><li><code>router.WithScope("application")</code>:
按应用维度生效。</li><li><code>router.WithKey(clientApplication)</code>: 指定当前路由规则绑定的
consumer application。</li><li><code>router.WithTags(...)</code>: 静态声明 tag
到地址列表的映射关系。</li><li><code>router.WithForce(...)</code>: 控制 tag
不匹配时是否允许回退。</li></ul><p><code>dubbo-go-samples</code> 中的静态示例使用直连
URL,只是为了最小化演示,不代表静态配置 API 只能用于直连场景。</p><p>静态配置示例请见: <a
href=https://github.com/apache/dubbo-go-samples/tree/main/rou [...]
-<button class="btn btn-primary mb-4
feedback--no">否</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled
[...]
+<button class="btn btn-primary mb-4
feedback--no">否</button></div><script>const
yes=document.querySelector(".feedback--yes"),no=document.querySelector(".feedback--no");document.querySelectorAll(".feedback--link").forEach(e=>{e.href=e.href+window.location.pathname});const
sendFeedback=e=>{gtag||console.log("!gtag"),gtag("event","click",{event_category:"Helpful",event_label:window.location.pathname,value:e})},disableButtons=()=>{yes.disabled=!0,yes.classList.add("feedback--button__disabled
[...]
<a
href="https://github.com/apache/dubbo-website/new/master/content/zh-cn//overview/mannual/golang-sdk/tutorial/traffic/tag_router?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edi
[...]
<a
href="https://github.com/apache/dubbo-website/issues/new?title=%e6%a0%87%e7%ad%be%e8%b7%af%e7%94%b1"
target=_blank><i class="fab fa-github fa-fw"></i> 登记问题</a>
-<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> 提交项目问题</a></div><nav id=TableOfContents><ul><li><a
href=#使用方法>使用方法</a><ul><li><a href=#前置准备>前置准备</a></li><li><a
href=#tag-router-介绍>Tag router 介绍</a></li><li><a href=#静态配置-api>静态配置
API</a></li><li><a
href=#规则优先级与合并语义>规则优先级与合并语义</a></li></ul></li></ul></nav></div></div></div></div><footer><div
class=footer-container><div class=footer-container-left><div
class=footer-container-left-title>关注我 [...]
+<a href=https://github.com/apache/dubbo/issues/new target=_blank><i class="fas
fa-tasks fa-fw"></i> 提交项目问题</a></div><nav id=TableOfContents><ul><li><a
href=#使用方法>使用方法</a><ul><li><a href=#前置准备>前置准备</a></li><li><a
href=#tag-router-介绍>Tag router 介绍</a></li><li><a
href=#动态规则配置>动态规则配置</a></li><li><a href=#静态配置-api>静态配置 API</a></li><li><a
href=#规则优先级与合并语义>规则优先级与合并语义</a></li></ul></li></ul></nav></div></div></div></div><footer><div
class=footer-container><div class=footer-container-left><div cl [...]
<button class="contact-btn qr-container"
onmouseover='showQRCode("dingding-qr")'
onmouseout='hideQRCode("dingding-qr")'>钉钉<div class=qr-code id=dingding-qr
style=display:none><img
src=https://img.alicdn.com/imgextra/i4/O1CN01buuadT274Lj33QZWQ_!!6000000007743-0-tps-1170-1477.jpg
alt="DingTalk QR Code"></div></button>
<button class=contact-btn><a
href=https://github.com/apache/dubbo/>GitHub</a></button></div></div><div
class=footer-container-right><ul><li>文档</li><li><a
href=/zh-cn/overview/home/>概览</a></li><li><a
href=/zh-cn/overview/quickstart/>快速开始</a></li><li><a
href=/zh-cn/contact/contributor/software-donation-guide_dev/>开发者指南</a></li></ul><ul><li>资源</li><li><a
href=/zh-cn/contact/>社区</a></li></ul></div></div><div
style="width:85.125rem;height:0;border:1px solid
#dddee4;margin-bottom:32px"></div>< [...]
project logo are either registered trademarks or trademarks of The Apache
Software Foundation in the United States
diff --git a/zh-cn/sitemap.xml b/zh-cn/sitemap.xml
index e2776a8b01a..f74afb48287 100644
--- a/zh-cn/sitemap.xml
+++ b/zh-cn/sitemap.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://cn.dubbo.apache.org/zh-cn/blog/2023/01/16/%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4%E5%8D%87%E7%BA%A7-dubbo3-%E5%85%A8%E9%9D%A2%E5%8F%96%E4%BB%A3-hsf2/</loc><lastmod>2023-11-28T15:14:12+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link
rel="alternate" hreflang="en" href="https://cn.dubbo [...]
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://cn.dubbo.apache.org/zh-cn/blog/2023/01/16/%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4%E5%8D%87%E7%BA%A7-dubbo3-%E5%85%A8%E9%9D%A2%E5%8F%96%E4%BB%A3-hsf2/</loc><lastmod>2023-11-28T15:14:12+08:00</lastmod><changefreq>monthly</changefreq><priority>0.5</priority><xhtml:link
rel="alternate" hreflang="en" href="https://cn.dubbo [...]
\ No newline at end of file