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

Autoscaler multi-tenancy and strategy support #659

Closed
glyn opened this issue Apr 16, 2018 · 9 comments
Closed

Autoscaler multi-tenancy and strategy support #659

glyn opened this issue Apr 16, 2018 · 9 comments
Assignees
Labels
area/autoscale kind/spec Discussion of how a feature should be exposed to customers.

Comments

@glyn
Copy link
Contributor

glyn commented Apr 16, 2018

To support event-driven revisions, the autoscaler needs to support multi-tenancy. That is, the autoscaler needs to handle scaling for all revisions rather than just one.

Each revision needs its own scaling strategy so that scaling of request-response and event-driven revisions can use distinct data structures, algorithms, and metrics types (e.g. replica versus topic metrics).

For background, see the Autoscaling elafros/riff convergence design document.

@glyn
Copy link
Contributor Author

glyn commented Apr 16, 2018

I’ve been thinking about how to structure the autoscaler to accommodate both distinct metrics types and distinct data structures (based on replica alone for request-response replicas and based on replica and topic for event-driven replicas). We could attempt to share state in a "base" autoscaler of the form:

map[ReplicaId]Scaler

with a minimal Scaler interface:

type Scaler interface {
    Propose() int32
}

There could be distinct implementations of Scaler indexed in strategy-specific ways but sharing state with the instance stored in the base autoscaler.

Alternatively, it might be cleaner from a concurrency perspective if there were two distinct autoscalers (and no stateful "base") both implementing a multi-tenant-oriented Autoscaler interface:

typer Autoscaler interface {
    Propose() map[ReplicaId]int32
}

These autoscalers would share no state and so could have distinct designs optimised separately.

@glyn
Copy link
Contributor Author

glyn commented Apr 17, 2018

The Elafros autoscaling contract proposal separates request-response and event-driven autoscaling into independent components.

@josephburnett josephburnett added this to the area/autoscale/sprint/01 milestone May 8, 2018
@josephburnett
Copy link
Contributor

I think that @grantr has been working with @glyn to define a multi-tenant autoscaler strategy.

@glyn
Copy link
Contributor Author

glyn commented Jun 12, 2018

See #1067 for a rebased, improved version of #963.

@glyn
Copy link
Contributor Author

glyn commented Jun 22, 2018

/assign @glyn

@evankanderson
Copy link
Member

/kind spec

@google-prow-robot google-prow-robot added the kind/spec Discussion of how a feature should be exposed to customers. label Jun 22, 2018
@glyn
Copy link
Contributor Author

glyn commented Jun 26, 2018

Note to self: metrics for the Prometheus exporter are gathered by stats_reporter.go.

google-prow-robot pushed a commit that referenced this issue Jul 23, 2018
Implements #659 except for dynamic
reconfiguration.
@glyn
Copy link
Contributor Author

glyn commented Jul 24, 2018

Broke out #1658 for adding the missing dynamic reconfiguration support. The strategy support is less urgent and is deferred now that eventing is reusing the serving autoscaler support.

@glyn glyn closed this as completed Jul 24, 2018
@glyn
Copy link
Contributor Author

glyn commented Jul 25, 2018

Broke out #1677 to address an outstanding FIXME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/autoscale kind/spec Discussion of how a feature should be exposed to customers.
Projects
None yet
Development

No branches or pull requests

6 participants