Use Aliyun OSS offloader with Pulsar
This chapter guides you through every step of installing and configuring the Aliyun Object Storage Service (OSS) offloader and using it with Pulsar.
Installation
Prerequisite
- Pulsar: 2.8.0 or later versions
Steps
Follow the steps below to install the Aliyun OSS offloader.
- Download the Pulsar tarball.
- Download and untar the Pulsar offloaders package, then copy the Pulsar offloaders as
offloaders
in the Pulsar directory. See Install tiered storage offloaders.
Configuration
Before offloading data from BookKeeper to Aliyun OSS, you need to configure some properties of the Aliyun OSS offload driver. Besides, you can also configure the Aliyun OSS offloader to run it automatically or trigger it manually.
Configure Aliyun OSS offloader driver
You can configure the Aliyun OSS offloader driver in the configuration file broker.conf
or standalone.conf
.
-
Required configurations are as below.
Required configuration Description Example value managedLedgerOffloadDriver
Offloader driver name, which is case-insensitive. aliyun-oss offloadersDirectory
Offloader directory offloaders managedLedgerOffloadBucket
Bucket pulsar-topic-offload managedLedgerOffloadServiceEndpoint
Endpoint http://oss-cn-hongkong.aliyuncs.com -
Optional configurations are as below.
Optional Description Default value managedLedgerOffloadReadBufferSizeInBytes
Block size for each individual read when reading back data from S3-compatible storage. 1 MB managedLedgerOffloadMaxBlockSizeInBytes
Maximum block size sent during a multi-part upload to S3-compatible storage. It cannot be smaller than 5 MB. 64 MB managedLedgerMinLedgerRolloverTimeMinutes
Minimum time between ledger rollover for a topic.
It's not recommended to change the default value in a production environment.10 managedLedgerMaxEntriesPerLedger
Maximum number of entries to append to a ledger before triggering a rollover.
Note: It's not recommended to change the default value in a production environment.50000
Bucket (required)
A bucket is a basic container that holds your data. Everything you store in Aliyun OSS must be contained in a bucket. You can use a bucket to organize your data and control access to your data, but unlike a directory and folder, you cannot nest a bucket.