You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Precondition Checking**. Enables callers to verify a number of preconditions before responding to an incoming request from a service consumer.
32
32
Preconditions can include whether the service consumer is properly authenticated, is on the service's whitelist, passes ACL checks, and more.
33
33
34
34
-**Telemetry Reporting**. Enables services to produce logging and monitoring. In the future, it will also enable tracing and billing
35
35
streams intended for both the service operator as well as for service consumers.
36
36
37
-
-**Quota Management**. Enables services to allocate and free quota on a number of dimensions, Quotas are used as a relatively simple resource management
38
-
tool to provide some fairness between service consumers when contending for limited resources.
37
+
-**Quota Management**. Enables services to allocate and free quota on a number of dimensions, Quotas are used as a relatively simple resource
38
+
management tool to provide some fairness between service consumers when contending for limited resources. Rate limits are
39
+
examples of quotas.
39
40
40
41
These mechanisms are applied based on a set of [attributes]({{site.baseurl}}/docs/concepts/attributes.html) that are
41
-
materialized for every request into the mixer.
42
+
materialized for every request into Mixer. Within Istio, Envoy depends heavily on Mixer. Services running within the mesh
43
+
can also use Mixer to report telemetry or manage quotas.
42
44
43
45
## Adapters
44
46
45
-
Adapters are binary-level plugins to the mixer which make it possible to customize the mixer’s behavior. Adapters allow the mixer to interface
47
+
Mixer abstracts away the implementation details of individual policy and telemetry backend systems. This insulates
48
+
Envoy and services within the mesh from those details, keeping them portable.
49
+
50
+
Adapters are binary-level plugins to Mixer which allow Mixer to interface
46
51
to different backend systems that deliver core control-plane functionality, such as logging, monitoring, quotas, ACL checking, and more. Adapters
47
-
enable the mixer to expose a single consistent control API, independent of the backends in use. The exact set of adapters
52
+
enable Mixer to expose a single consistent control API, independent of the backends in use. The exact set of adapters
48
53
used at runtime is determined through configuration.
49
54
50
-
<imgstyle="width:65%;display:block;margin:auto;"src="./mixer/adapters.svg"alt="The mixer and its adapters." />
55
+
<imgstyle="width:65%;display:block;margin:auto;"src="./mixer/adapters.svg"alt="Mixer and its adapters." />
51
56
52
-
## Descriptors and policy objects
57
+
## Descriptors and Adapter Parameters
53
58
54
-
The mixer is essentially an attribute processing machine. It takes in a number of attributes from
59
+
Mixer is essentially an attribute processing machine. It takes in a number of attributes from
55
60
its caller and produces as a result a set of calls into its adapters, which in turn trigger calls to
56
-
associated backend systems such as Prometheus or NewRelic. As the mixer calls its adapters, it provides them what are
57
-
called *policy objects* as input. These policy objects are the parameters telling the adapters what to do. For example, when
58
-
reporting metrics to an adapter, the mixer produces a policy object that holds the metric data.
61
+
associated backend systems such as Prometheus or NewRelic. As Mixer calls its adapters, it provides them
62
+
*adapter parameters* as input. These tell the adapters what to do. For example, when
63
+
reporting metrics to an adapter, Mixer produces parameters that hold the metric data.
59
64
60
-
Descriptors let you define the *shape* of the policy objects produced during the mixer's [attribute processing phase](#request-phases).
61
-
In other words, descriptors let you control the set and type of values carried by individual policy objects. Some facts:
65
+
Descriptors let you define the *shape* of the parameters produced during Mixer's [attribute processing phase](#request-phases).
66
+
In other words, descriptors let you control the set and type of values carried by these parameters. Some facts:
62
67
63
-
-The mixer supports a variety of different descriptor kinds (`MetricDescriptor`, `LogEntryDescriptor`, `QuotaDescriptor`, etc)
68
+
-Mixer supports a variety of different descriptor kinds (Metric Descriptor, Log Entry Descriptor, Quota Descriptor, etc)
64
69
65
70
- For each descriptor kind, you can declare any number of descriptors within a given deployment.
66
71
67
-
- While handling a request, the mixer's attribute processing phase can produce any number of policy objects for each of the
72
+
- While handling a request, Mixer's attribute processing phase can produce any number of distinct adapter parameters for each of the
68
73
configured descriptors.
69
74
70
75
An example can help clarify the concepts. Let's consider the `MetricDescriptor` type which is defined as follows:
@@ -118,7 +123,7 @@ listed labels. Producing a policy object for such a descriptor requires 6 pieces
118
123
- a method string
119
124
- a 64-bit integer response code
120
125
121
-
Here is an example snippet of Istio configuration which produces a policy object for the above descriptor:
126
+
Here is an example snippet of Istio configuration which produces adapter parameters given the above descriptor:
122
127
123
128
```yaml
124
129
descriptor_name: request_count
@@ -131,14 +136,14 @@ labels:
131
136
response_code: response.code | 200
132
137
```
133
138
134
-
Many such policy objects are created as part of attribute processing and they ultimately serve as input to
135
-
adapters.
139
+
Many such parameters are are typically created as part of attribute processing and they ultimately determine what
140
+
adapters do.
136
141
137
-
Explicitly defining descriptors and creating policy objects for them is akin to types and objects in a traditional
142
+
Explicitly defining descriptors and creating adapter parameters using them is akin to types and objects in a traditional
138
143
programming language. Doing so enables a few important scenarios:
139
144
140
145
- Having the set of descriptors explicitly defined enables Istio to program backend systems to accept traffic produced
141
-
by the mixer. For example, a `MetricDescriptor` provides all the information needed to program a backend system to accept metrics
146
+
by Mixer. For example, a `MetricDescriptor` provides all the information needed to program a backend system to accept metrics
142
147
that conform to the descriptor's shape (it's value type and its set of labels).
143
148
144
149
- It enables type checking of the deployment's configuration. Since attributes have strong types, and so do descriptors,
@@ -150,30 +155,30 @@ plays the same role as types in a programming language.
150
155
151
156
## Configuration state
152
157
153
-
The mixer's core runtime methods (`Check`, `Report`, and `Quota`) all accept a set of attributes on input and
158
+
Mixer's core runtime methods (`Check`, `Report`, and `Quota`) all accept a set of attributes on input and
154
159
produce a set of attributes on output. The work that the individual methods perform is dictated by the set of input
155
-
attributes, as well as by the mixer's current configuration. To that end, the service operator is responsible
160
+
attributes, as well as by Mixer's current configuration. To that end, the service operator is responsible
156
161
for:
157
162
158
163
- Configuring the set of *aspects* that the deployment uses. An aspect is essentially a chunk of configuration
159
164
state that configures an adapter (adapters being binary plugins as described [below](#adapters)).
160
165
161
-
- Establishing the types of policy objects that the mixer can manipulate. These
166
+
- Establishing the types of adapter parameters that Mixer can manipulate. These
162
167
types are described in configuration through a set of *descriptors* (as described [above](#descriptors))
163
168
164
169
- Creating rules to map the attributes of every incoming request into a
165
-
specific set of aspects and policy objects.
170
+
specific set of aspects and adapter parameters.
166
171
167
-
The above configuration state is required to have mixer know what to do with incoming attributes
172
+
The above configuration state is required to have Mixer know what to do with incoming attributes
168
173
and dispatch to the appropriate backend systems.
169
174
170
-
Refer to *TBD* for detailed information on mixer's configuration format.
175
+
Refer to *TBD* for detailed information on Mixer's configuration format.
171
176
172
177
## Request phases
173
178
174
-
When a request comes in to the mixer, it goes through a number of distinct handling phases:
179
+
When a request comes in to Mixer, it goes through a number of distinct handling phases:
175
180
176
-
- **Supplementary Attribute Production**. The first thing that happens in the mixer is to run a globally configured
181
+
- **Supplementary Attribute Production**. The first thing that happens in Mixer is to run a globally configured
177
182
set of adapters that are responsible for introducing new attributes. These attributes are combined with the attributes
178
183
from the request to form the total set of attributes for the operation.
179
184
@@ -195,14 +200,14 @@ associated with each aspect and passes them those parameters.
195
200
196
201
## Scripting
197
202
198
-
> This section is preliminary and subject to change. We're still experimenting with the concept of scripting in the mixer.
203
+
> This section is preliminary and subject to change. We're still experimenting with the concept of scripting in Mixer.
199
204
200
-
The mixer's attribute processing phase is implemented via a scripting language (exact language *TBD*).
205
+
Mixer's attribute processing phase is implemented via a scripting language (exact language *TBD*).
201
206
The scripts are provided a set of attributes and are responsible for producing the adapter parameters and dispatching
202
207
control to individual configured adapters.
203
208
204
209
For common uses, the operator authors adapter parameter production rules via a relatively simple declarative format
205
-
and expression syntax. The mixer ingests such rules and produces a script that performs the necessary runtime work
210
+
and expression syntax. Mixer ingests such rules and produces a script that performs the necessary runtime work
206
211
of accessing the request's incoming attributes and producing the requisite adapter parameters.
207
212
208
213
For advanced uses, the operator can bypass the declarative format and author directly in the scripting
0 commit comments