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

[Feature]: RPS autoscaling for services without a gateway #2232

Open
jvstme opened this issue Jan 27, 2025 · 0 comments
Open

[Feature]: RPS autoscaling for services without a gateway #2232

jvstme opened this issue Jan 27, 2025 · 0 comments
Labels

Comments

@jvstme
Copy link
Collaborator

jvstme commented Jan 27, 2025

Problem

RPS auto-scaling is only supported when running services with a gateway.
It is not possible to run a service without a gateway with RPS auto-scaling enabled.

> cat .dstack.yml
type: service
image: nginx
port: 80
gateway: false
replicas: 1..2
scaling:
  metric: rps
  target: 50

> dstack apply
Auto-scaling is not yet supported when running services without a gateway. Please configure a gateway or set `replicas` to a fixed value in the service configuration

Solution

Support RPS auto-scaling for services without a gateway.

Implementation note

The main difficulty in implementing this feature is synchronizing the request metrics between multiple dstack-server replicas. We can try to store the metrics in the database, but this may impact performance when running services with high RPS.

Workaround

Use a gateway.

Would you like to help us implement this feature by sending a PR?

Yes

@jvstme jvstme added the feature label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant