activator

package
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

README

About the Activator

The name activator is actually a misnomer, since after Knative 0.2, the activator no longer activates inactive Revisions.

The only responsibilities of the activator are:

  • Receiving & buffering requests for inactive Revisions.
  • Reporting metrics to the autoscaler.
  • Retrying requests to a Revision after the autoscaler scales such Revision based on the reported metrics.

Documentation

Index

Constants

View Source
const (
	// Name is the name of the component.
	Name = "activator"
	// RevisionHeaderName is the header key for revision name.
	RevisionHeaderName = "Knative-Serving-Revision"
	// RevisionHeaderNamespace is the header key for revision's namespace.
	RevisionHeaderNamespace = "Knative-Serving-Namespace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter added in v0.2.0

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter holds cached metric objects to report autoscaler metrics

func NewStatsReporter added in v0.2.0

func NewStatsReporter(pod string) (*Reporter, error)

NewStatsReporter creates a reporter that collects and reports activator metrics

func (*Reporter) ReportRequestConcurrency added in v0.8.0

func (r *Reporter) ReportRequestConcurrency(ns, service, config, rev string, v int64) error

ReportRequestConcurrency captures request concurrency metric with value v.

func (*Reporter) ReportRequestCount added in v0.3.0

func (r *Reporter) ReportRequestCount(ns, service, config, rev string, responseCode, numTries int) error

ReportRequestCount captures request count.

func (*Reporter) ReportResponseTime added in v0.2.0

func (r *Reporter) ReportResponseTime(ns, service, config, rev string, responseCode int, d time.Duration) error

ReportResponseTime captures response time requests

type StatsReporter added in v0.2.0

type StatsReporter interface {
	ReportRequestConcurrency(ns, service, config, rev string, v int64) error
	ReportRequestCount(ns, service, config, rev string, responseCode, numTries int) error
	ReportResponseTime(ns, service, config, rev string, responseCode int, d time.Duration) error
}

StatsReporter defines the interface for sending activator metrics

Directories

Path Synopsis
Package net contains the Activator components that govern Activator's request throttling, routing, and reflect the cluster network state.
Package net contains the Activator components that govern Activator's request throttling, routing, and reflect the cluster network state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL