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

Fewest nodes strategy #7346

Open
sylr opened this issue Nov 7, 2024 · 2 comments
Open

Fewest nodes strategy #7346

sylr opened this issue Nov 7, 2024 · 2 comments
Labels
feature New feature or request needs-triage Issues that need to be triaged

Comments

@sylr
Copy link
Contributor

sylr commented Nov 7, 2024

Description

What problem are you trying to solve?

It seems that Karpenter instance scheduling is solely based on EC2 economics.

Nodes will be scheduled based on instance type price, so, given node type constraints and resources needed to be scheduled, we can end up with, for example, 2 c7.xlarge instances instead of 1 c7.2xlarge.

This model does not work when using paying services which are billed per host (e.g.: DataDog, outcoldsolutions, orca.security ... etc).

It would really be nice to have a fewest-nodes strategy for scheduling.

How important is this feature to you?

Given the price of the aforementioned services, it is really important :)

@sylr sylr added feature New feature or request needs-triage Issues that need to be triaged labels Nov 7, 2024
@sylr
Copy link
Contributor Author

sylr commented Nov 7, 2024

We could also consider adding possibility to define custom costs which would be considered during scheduling, e.g.:

---
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
  name: dedicated-ingress-arm64
spec:
  # In the same currency as the instance price
  costs: 
  - name: datadog per host cost
    perHostMonthlyPrice: 25
  - name: orca.security per host cost
    perHostMonthlyPrice: 30

With this, considering that all resources needed for scheduling correspond to a m7.2xlarge we would have:

m7.xlarge price m7.xlarge + costs m7.2xlarge price m7.2xlarge + costs Result
45 (45 + 30) x 2 = 150 100 (100 + 30) x 1 = 130 1 m7.2xlarge
40 (40 + 30) x 2 = 140 100 (100 + 30) x 1 = 130 1 m7.2xlarge
35 (35 + 30) x 2 = 120 100 (100 + 30) x 1 = 130 2 m7.xlarge

@flbla
Copy link

flbla commented Nov 13, 2024

hi,
I think it's the same as this one #5033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request needs-triage Issues that need to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants