Scaling Up/Down a Stream

After a stream is created successfully, you can scale up or down a stream by adding or reducing partitions to meet capacity change requirements. Streams can be scaled automatically or manually.

Function

Scaling rules
  • When scaling up a stream, ensure that the number of target partitions is greater than the number of the current partitions but is not greater than the total number of the remaining quotas and current partitions.
  • When scaling up a stream, restore the DELETED and EXPIRED partitions to the ACTIVE partitions to make the partitions accessible. If the stream capacity is still insufficient, the system will create new partitions.
  • When scaling down a stream, ensure that the number of target partitions is smaller than the number of current partitions but is not smaller than 1.
  • The partitions that have been scaled down will not be charged or occupy the quota. Data on those partitions is readable but is not writable during Data Retention configured in Creating a DIS Stream. Once Data Retention is expired, the data will become inaccessible.
  • A maximum of 10 automatic scale-up, 10 manual scale-up, and 1 scale-down operations can be performed for each stream within one hour.
  • The interval between performing automatic scale-up and scale-down must be greater than 1 minute. Automatic scale-down cannot be triggered within 2 minutes after automatic or manual scale-up is performed, and meanwhile automatic scale-up cannot be triggered within 2 minutes after automatic or manual scale-down is performed.

Precautions

  • When uploading data, you need to set PartitionKey based on your specific demands so that DIS can automatically upload data to all partitions according to your requirements.
  • When downloading data, you need to periodically use the descriptStream API to check the partition quantity change so that DIS can download data from all partitions.

Manually Scaling Up/Down a Stream

  1. Use the account to log in to the DIS console.
  2. Click in the upper left corner of the page and select a region and project.
  3. Perform either of the following operations to manually scale up or down a stream:

    • In the navigation tree on the left, choose Ingestion Management > Stream Management.
      1. On the Stream Management page, click the name of the stream to be scaled.
      2. In the upper right corner of the displayed page, click Scale Up/Down. The Scale Up/Down Stream dialog box is displayed.
      3. Change the number of target partitions and click Yes.
    • In the navigation tree on the left, choose Ingestion Management > Stream Management.
      1. In the Operation column of the stream to be scaled, click More and choose Scale Up/Down from the drop-down list.
      2. The Scale Up/Down Partition dialog box is displayed.
      3. Change the number of target partitions and click Yes.

Automatically Scaling Up/Down a Stream

  1. Use the account to log in to the DIS console.
  2. Click in the upper left corner of the page and select a region and project.
  3. Perform the following steps to automatically scale up or down a stream:

    In the navigation tree on the left, choose Ingestion Management > Stream Management.
    1. On the Stream Management page, click the name of the stream to be scaled.
    2. Click Edit next to Auto-Scaling.
    3. In the displayed Edit Auto-Scaling Parameter dialog box, enable Auto-Scaling.
      Figure 1 Edit Auto-Scaling Parameter
    4. Set the upper and lower thresholds for automatic scaling and click OK.

Viewing Scale-Up/Down Logs

  1. Use the account to log in to the DIS console.
  2. Click in the upper left corner of the page and select a region and project.
  3. In the navigation tree on the left, choose Ingestion Management > Stream Management.
  4. Click the name of a stream that you want to view. The Stream Management page is displayed.
  5. On the displayed page, click the Scale-Up/Down Logs tab. View the scaling details of the stream.