Skip to main content
Version: 3.2.x

Migration

Pulsar has 3 types of broker load balancers, that is, simple, modular, and extensible.

You can perform the following migrations.

MigrationWhen to use
Migrate from simple to modularIf you want to use the bundle unloading strategy of OverloadShedder, ThresholdShedder, or UniformLoadShedder.
Migrate from modular to extensibleIf you want to use the bundle unloading strategy of TransferShedder.
Migrate from extensible to modularIf you want to use the bundle unloading strategy of OverloadShedder, ThresholdShedder, or UniformLoadShedder.
note

It is not recommended to migrate from the modular or extensible to the simple broker load balancer since the simple broker load balancer is deprecated and no longer in use.

Considerations

Before migrating from one broker load balancer type to another, review the relationship between broker load balancer type, Pulsar version, and bundle unloading strategy. You may need to upgrade Pulsar versions or update the bundle unloading strategy. Below are brief summaries.

This broker load balancer typeis available in this Pulsar version
SimpleAll versions
Modular1.7 and later
Extensible3.0 and later
This bundle unloading strategyis available for this broker load balancer typein available this Pulsar version
OverloadShedderModular1.18 and later
ThresholdShedderModular2.6 and later
UniformLoadShedderModular2.10 and later
TransferShedderExtensible3.0 and later

Migrate from simple to modular broker load balancer

You can migrate from the simple to the modular broker load balancer, by manually changing the configuration settings in the broker.conf file or by using the pulsar-admin tool.

Change broker.conf file

  1. Access to the broker.conf file.

    vim apache-pulsar-3.2.2/conf/broker.conf
  2. Change the broker load balancer by setting loadManagerClassName to ModularLoadManagerImpl in the broker.conf file.

    loadManagerClassName=org.apache.pulsar.broker.loadbalance.extensions.ModularLoadManagerImpl
  3. Restart the Pulsar cluster. The new setting will take effect after the restart.

Use pulsar-admin tool

  1. Access the pulsar-admin tool.

    cd apache-pulsar-3.2.2/bin
  2. Set --config to loadManagerClassName and --value to org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl.

    pulsar-admin brokers update-dynamic-config \
    --config loadManagerClassName \
    --value org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl

    You do not need to restart the Pulsar cluster. The new settings will take effect after 1 to 2 minutes.

Migrate from modular to extensible broker load balancer

You can migrate from the modular to the extensible broker load balancer, by manually changing settings in the broker.conf file. During the migration, the lookup and assignment will be redirected to the brokers with the extensible load balancer.

note

The pulsar-admin tool is not supported for this migration.

Change broker.conf file

  1. Upgrade the Pulsar cluster to 3.0.0 or later versions.

  2. Access to the broker.conf file.

    vim apache-pulsar-3.2.2/conf/broker.conf
  3. Change the following settings in the broker.conf file:

  4. Restart the Pulsar cluster. The new settings will take effect after the restart.

Migrate from extensible to modular broker load balancer

You can migrate from the extensible to the modular broker load balancer, by manually changing the setting in the broker.conf file. During the migration, the lookup and assignment will be redirected to the brokers with the modular load balancer.

note

The pulsar-admin tool is not supported for this migration.

Change broker.conf file

  1. Access to the broker.conf file.

    vim apache-pulsar-3.2.2/conf/broker.conf
  2. Change the following settings in the broker.conf file:

    • Update broker load balancer by setting loadManagerClassName to ModularLoadManagerImpl

    • Update bundle unloading strategy to OverloadShedder, ThresholdShedder, or UniformLoadShedder based on your needs.

      loadManagerClassName=org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl

      loadBalancerLoadSheddingStrategy=org.apache.pulsar.broker.loadbalance.impl.ThresholdShedder
      note

      TransferShedder is only supported in the extensible broker load balancer, so you need to change TransferShedder to other bundle unloading strategies.

  3. Restart the Pulsar cluster. The new settings will take effect after the restart.