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 98aa5883bef deploy: 16dadfd5b1f402e2b38cd3136c0cab67c148e7f6
98aa5883bef is described below
commit 98aa5883befc27518be83b3ce3d17a7f98438238
Author: Alanxtl <[email protected]>
AuthorDate: Tue Aug 11 13:43:47 2026 +0000
deploy: 16dadfd5b1f402e2b38cd3136c0cab67c148e7f6
---
en/index.xml | 16 ++++++-
.../mannual/golang-sdk/tutorial/traffic/index.xml | 16 ++++++-
.../tutorial/traffic/tag_router/index.html | 52 +++++-----------------
en/sitemap.xml | 2 +-
sitemap.xml | 2 +-
zh-cn/index.xml | 8 ++--
.../mannual/golang-sdk/tutorial/traffic/index.xml | 8 ++--
.../tutorial/traffic/tag_router/index.html | 46 ++++---------------
zh-cn/sitemap.xml | 2 +-
9 files changed, 60 insertions(+), 92 deletions(-)
diff --git a/en/index.xml b/en/index.xml
index 0b8ef199346..080fbf709fb 100644
--- a/en/index.xml
+++ b/en/index.xml
@@ -1663,7 +1663,21 @@ 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. 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 [...]
+<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
[...]
<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/index.xml
b/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
index 4127a373ee2..a88a3c5d245 100644
--- a/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
+++ b/en/overview/mannual/golang-sdk/tutorial/traffic/index.xml
@@ -47,7 +47,21 @@ 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. 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 [...]
+<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, [...]
<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 50722168a8e..3f5481fc7b9 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,57 +694,27 @@
<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. 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 [...]
+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 [...]
</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>20001</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><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></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><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>// use
string type</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>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></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><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>),
@@ -764,10 +734,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=#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 [...]
+<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 [...]
<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 8326a1aec9c..21f3bdda9c9 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/sitemap.xml b/sitemap.xml
index f25d44f95f8..8d1ed0c19c2 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-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
+<?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:27:31+08:00</lastmod></sitemap><sitemap><loc>https://cn.dubbo.apache.org/en/sitemap.xml</loc><lastmod>2026-08-11T21:27:31+08:00</lastmod></sitemap></sitemapindex>
\ No newline at end of file
diff --git a/zh-cn/index.xml b/zh-cn/index.xml
index 84eb2044dc6..6039c5afc77 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">20001</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>参数:</p>
<ul>
-<li>dubbo.WithTag:
设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。标签会写入注册中心的实例元数据(<code>dubbo.tag</code>)。标签匹配区分大小写,需与客户端携带的标签写法完全一致。</li>
+<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>{
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 535cd7ba6f9..8c550dc0386 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">20001</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>参数:</p>
<ul>
-<li>dubbo.WithTag:
设置该实例携带的tag,用于标记该实例(例如为灰度环境等)。标签会写入注册中心的实例元数据(<code>dubbo.tag</code>)。标签匹配区分大小写,需与客户端携带的标签写法完全一致。</li>
+<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>{
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 3eef21036ed..16161a5693e 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,55 +688,25 @@
<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>20001</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>参数:</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></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><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>:
设置是否强制匹配标签。<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></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><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>),
@@ -755,10 +725,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=#动态规则配置>动态规则配置</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 [...]
+<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>关注我 [...]
<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 f74afb48287..0268e1ce0bb 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