In an organization, a Pulsar instance provides services to multiple teams. When organizing the resources across multiple teams, you want to make a suitable isolation plan to avoid resource competition between different teams and applications and provide high-quality messaging service. In this case, you need to consider resource isolation and weigh your intended actions against expected and unexpected consequences.
The multi-layer and segment-centric architecture and hierarchical resource management of Pulsar provide a solid foundation for isolation, which allows you to isolate resources in your desired manner, prevent resource competition, and attain stability.
Pulsar supports isolation at either of the following two levels or both.
:::tip
On top of broker-level isolation and bookie-level isolation, if you want to guarantee all the data that belongs to a namespace is stored in desired bookies, you can define and configure bookie affinity groups. See shared BookKeeper cluster deployment for more details.
:::
The following illustration demonstrates the deployment of separate Pulsar clusters to achieve the highest-level isolation.
Here are some key points for understanding how it works:
:::note
When using this approach, if you want to achieve namespace isolation, you need to specify a cluster for a namespace. The cluster must be in the allowed cluster list of the tenant. Topics under the namespace are assigned to this cluster.
:::
The following illustration demonstrates the deployment of shared BookKeeper clusters to achieve isolation.
Here are some key points for understanding how it works:
As illustrated below, all bookie groups use a shared BookKeeper cluster and a metadata store, and each bookie affinity group has one or several bookies. You can specify one or multiple primary/secondary groups for a namespace. Topics under the namespace are created on the bookies in the primary group first and then created on the bookies in the secondary group.
The following illustration demonstrates how to achieve isolation inside a single Pulsar cluster.
Here are some key points for understanding how it works: