This is an automated email from the ASF dual-hosted git repository.

liuyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new de3b73c231e [improve][doc] remove old docs for broker load balancing 
(#663)
de3b73c231e is described below

commit de3b73c231e562a63f49c89dd3488db2338c97a4
Author: Anonymitaet <[email protected]>
AuthorDate: Thu Aug 10 10:51:48 2023 +0800

    [improve][doc] remove old docs for broker load balancing (#663)
---
 docs/administration-anti-affinity-namespaces.md | 58 +++++++++++++++++++++++++
 sidebars.json                                   |  2 +-
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/docs/administration-anti-affinity-namespaces.md 
b/docs/administration-anti-affinity-namespaces.md
new file mode 100644
index 00000000000..b7c6a8bdbd3
--- /dev/null
+++ b/docs/administration-anti-affinity-namespaces.md
@@ -0,0 +1,58 @@
+---
+id: administration-anti-affinity-namespaces
+title: Anti-affinity namespaces
+sidebar_label: "Anti-affinity namespaces"
+---
+
+## Distribute anti-affinity namespaces across failure domains
+
+When your application has multiple namespaces and you want one of them 
available all the time to avoid any downtime, you can group these namespaces 
and distribute them across different [failure 
domains](reference-terminology.md#failure-domain) and different brokers. Thus, 
if one of the failure domains is down (due to release rollout or brokers 
restart), it only disrupts namespaces owned by that specific failure domain and 
the rest of the namespaces owned by other domains remain available [...]
+
+Such a group of namespaces has anti-affinity to each other, that is, all the 
namespaces in this group are [anti-affinity 
namespaces](reference-terminology.md#anti-affinity-namespaces) and are 
distributed to different failure domains in a load-balanced manner.
+
+As illustrated in the following figure, Pulsar has 2 failure domains (Domain1 
and Domain2) and each domain has 2 brokers in it. You can create an 
anti-affinity namespace group that has 4 namespaces in it, and all the 4 
namespaces have anti-affinity to each other. The load manager tries to 
distribute namespaces evenly across all the brokers in the same domain. Since 
each domain has 2 brokers, every broker owns one namespace from this 
anti-affinity namespace group, and you can see each dom [...]
+
+![Distribute anti-affinity namespaces across failure 
domains](/assets/anti-affinity-namespaces-across-failure-domains.svg)
+
+The load manager follows an even distribution policy across failure domains to 
assign anti-affinity namespaces. The following table outlines the 
even-distributed assignment sequence illustrated in the above figure.
+
+| Assignment sequence | Namespace | Failure domain candidates | Broker 
candidates | Selected broker |
+|:---|:------------|:------------------|:------------------------------------|:-----------------|
+| 1 | Namespace1 | Domain1, Domain2 | Broker1, Broker2, Broker3, Broker4 | 
Domain1:Broker1 |
+| 2 | Namespace2 | Domain2          | Broker3, Broker4                   | 
Domain2:Broker3 |
+| 3 | Namespace3 | Domain1, Domain2 | Broker2, Broker4                   | 
Domain1:Broker2 |
+| 4 | Namespace4 | Domain2          | Broker4                            | 
Domain2:Broker4 |
+
+:::tip
+
+* Each namespace belongs to only one anti-affinity group. If a namespace with 
an existing anti-affinity assignment is assigned to another anti-affinity 
group, the original assignment is dropped.
+
+* If there are more anti-affinity namespaces than failure domains, the load 
manager distributes namespaces evenly across all the domains, and also every 
domain distributes namespaces evenly across all the brokers under that domain.
+
+:::
+
+### Create a failure domain and register brokers
+
+:::note
+
+One broker can only be registered to a single failure domain.
+
+:::
+
+To create a domain under a specific cluster and register brokers, run the 
following command:
+
+```bash
+pulsar-admin clusters create-failure-domain <cluster-name> --domain-name 
<domain-name> --broker-list <broker-list-comma-separated>
+```
+
+You can also view, update, and delete domains under a specific cluster. For 
more information, refer to [Pulsar admin 
docs](pathname:///reference/#/@pulsar:version_reference@/pulsar-admin/).
+
+### Create an anti-affinity namespace group
+
+An anti-affinity group is created automatically when the first namespace is 
assigned to the group. To assign a namespace to an anti-affinity group, run the 
following command. It sets an anti-affinity group name for a namespace.
+
+```bash
+pulsar-admin namespaces set-anti-affinity-group <namespace> --group 
<group-name>
+```
+
+For more information about `anti-affinity-group` related commands, refer to 
[Pulsar admin 
docs](pathname:///reference/#/@pulsar:version_reference@/pulsar-admin/).
diff --git a/sidebars.json b/sidebars.json
index da6d16f5387..90f30166016 100644
--- a/sidebars.json
+++ b/sidebars.json
@@ -261,8 +261,8 @@
         "administration-geo",
         "administration-pulsar-manager",
         "administration-pulsar-shell",
-        "administration-load-balance",
         "administration-proxy",
+        "administration-anti-affinity-namespaces",
         "administration-upgrade",
         {
           "type": "category",

Reply via email to