Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support autoscaling on broker and bookie #1183

Merged
merged 4 commits into from
Oct 10, 2024
Merged

feat: support autoscaling on broker and bookie #1183

merged 4 commits into from
Oct 10, 2024

Conversation

ericsyh
Copy link
Member

@ericsyh ericsyh commented Sep 22, 2024

(If this PR fixes a github issue, please add Fixes #<xyz>.)

Fixes #

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications

Describe the modifications you've done.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@ericsyh ericsyh requested review from a team as code owners September 22, 2024 13:49
@github-actions github-actions bot added the doc This pr contains a document label Sep 22, 2024
@ericsyh
Copy link
Member Author

ericsyh commented Sep 22, 2024

Example

bookkeeper:
  autoScaling:
    enabled: true
    minReplicas: 1
    maxReplicas: 4
    metrics:
     - pods:
        metric:
          name: cpu_usage
        target:
          averageValue: "75"
          type: AverageValue
      type: Pods

broker:
  autoScaling:
    enabled: true
    minReplicas: 1
    maxReplicas: 4
    metrics:
     - pods:
        metric:
          name: cpu_usage
        target:
          averageValue: "75"
          type: AverageValue
      type: Pods

enabled: false
minReplicas: 1
maxReplicas: 4
metrics: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the available metrics here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if there is a list of the metric names that can be used for pulsar auto-scaling.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the available metrics here?
It depends on the metrics backend service used. If users deploy the Metrics Server then only resource metrics could be used. But with prometheus and prometheus adapter, all metrics from the prometheus could be used by the auto-scaling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cpu_usage here is a custom metric implemented by prometheus-adapter other than the general prometheus metric, the user should know the catalog of the supported metrics of broker autoScaling.

Signed-off-by: ericsyh <[email protected]>
@ericsyh ericsyh merged commit 7a08d15 into master Oct 10, 2024
2 checks passed
@ericsyh ericsyh deleted the auto-scaling branch October 10, 2024 07:19
ericsyh added a commit that referenced this pull request Oct 22, 2024
* feat: add autoscaling on chart

Signed-off-by: ericsyh <[email protected]>

* apply autoscaling on sn-platform

Signed-off-by: ericsyh <[email protected]>

* add autoscaling examples

Signed-off-by: ericsyh <[email protected]>

* fix name

Signed-off-by: ericsyh <[email protected]>

---------

Signed-off-by: ericsyh <[email protected]>
(cherry picked from commit 7a08d15)
ericsyh added a commit that referenced this pull request Oct 22, 2024
* feat: add autoscaling on chart

Signed-off-by: ericsyh <[email protected]>

* apply autoscaling on sn-platform

Signed-off-by: ericsyh <[email protected]>

* add autoscaling examples

Signed-off-by: ericsyh <[email protected]>

* fix name

Signed-off-by: ericsyh <[email protected]>

---------

Signed-off-by: ericsyh <[email protected]>
(cherry picked from commit 7a08d15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc This pr contains a document
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants