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: Update scaling policy #5187

Merged
merged 1 commit into from
Jul 11, 2024
Merged

feat: Update scaling policy #5187

merged 1 commit into from
Jul 11, 2024

Conversation

Kavinjsir
Copy link
Contributor

@Kavinjsir Kavinjsir commented Jul 3, 2024

Update:

  • Prevent downscaling

Should Partially resolve: https://github.com/rilldata/rill-private-issues/issues/475

return false
}

// TODO: Skip scaling for manually assigned slots
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@begelundmuller Not quite sure how to figure the slots that is specified by "manual intervene".

OR if is possible/necessary to have a new method for the DB connect struct to find the info from the Database?

Would you have some recommendations?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you would need to add a column with a flag in the database. Or use an annotation to indicate it (such as has_sla or something else – the annotation could be automatically added if a user calls rill project edit --prod-slots ...).

@Kavinjsir Kavinjsir self-assigned this Jul 3, 2024
@Kavinjsir Kavinjsir marked this pull request as ready for review July 3, 2024 20:33
@Kavinjsir
Copy link
Contributor Author

@begelundmuller, following some discussions with the infra team, we've decided to temporarily disable down-scaling.

Regarding the disabling of scaling for manually-specified slots, I have left a comment seeking further assistance.

Concerning the cap at 20%, I am guessing that temporarily disabling down-scaling may suffice for our needs.
However, I am concerned that this cap might become a bottleneck, especially when scaling from smaller values (e.g., scaling from 4 to 8).
On the other hand, I'm cautious about introducing overly complex logic to determine the slots, considering we already have a recommended value for slots.

Additionally, I'm wondering about the has-sla tagging.
Is this a widely applicable tag?
If we disable scaling for projects tagged with has-sla, it might impact a large number of our production-level services, which are primarily scaled for flexibility and cost savings.

cc: @himadrisingh @kaspersjo

Comment on lines +135 to +138
// Temproray disable scale DOWN - Tony
if recommendSlots <= originSlots {
return false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this configurable through some property/env vars?

@begelundmuller
Copy link
Contributor

Concerning the cap at 20%, I am guessing that temporarily disabling down-scaling may suffice for our needs. However, I am concerned that this cap might become a bottleneck, especially when scaling from smaller values (e.g., scaling from 4 to 8). On the other hand, I'm cautious about introducing overly complex logic to determine the slots, considering we already have a recommended value for slots.

A 20% cap (or similar) should only apply to downscaling. Upscaling should not have a cap since it might scale too slowly then. Since you disabled downscaling, this doesn't really matter right now.

Additionally, I'm wondering about the has-sla tagging. Is this a widely applicable tag? If we disable scaling for projects tagged with has-sla, it might impact a large number of our production-level services, which are primarily scaled for flexibility and cost savings.

You can ask @AndrewRTsao. I think he's the one who is using this annotation.

@AndrewRTsao
Copy link
Contributor

AndrewRTsao commented Jul 4, 2024

As discussed previously, we are using the following tags:

  • sla=prod to indicate projects that are considered in production
  • sla=dev to indicate projects that are under active development
  • dashboard_latency=10s for the expected dashboard latency before we trigger alerts (we are currently defaulting to 10s for duckdb-backed projects and 20s for Druid-backed)

- Prevent downscaling
@Kavinjsir Kavinjsir merged commit 1f2e149 into main Jul 11, 2024
4 checks passed
@Kavinjsir Kavinjsir deleted the tony-patch-for-scaler branch July 11, 2024 05:29
Kavinjsir added a commit that referenced this pull request Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants