@@ -7,7 +7,7 @@ layout: docs
7
7
type : markdown
8
8
---
9
9
{% capture overview %}
10
- The page explains Istio's Mixer's role and general architecture.
10
+ The page explains Mixer's role and general architecture.
11
11
{% endcapture %}
12
12
13
13
{% capture body %}
@@ -21,7 +21,8 @@ to Mixer, which proceeds to repackage and redirect the data towards configured b
21
21
Services within the Istio mesh can also directly integrate with Mixer. For example, services may wish to provide rich telemetry
22
22
for particular operations beyond what Envoy automatically collects. Or services may use Mixer for resource-oriented quota
23
23
management. Services that leverage Mixer in this way are abstracted from environment-specific control plane details, greatly
24
- easing the process of hosting the code in different environments (different clouds and on-prem)
24
+ easing the process of hosting the code in different environments (different clouds and on-prem). (Please note that
25
+ as of the Alpha release of Istio, only Envoy can calls Mixer directly.)
25
26
26
27
<img style =" display :block ;width :60% ;margin :auto ;" src =" ./mixer/traffic.svg " alt =" Flow of traffic. " />
27
28
<p style =" text-align :center ;" >Mixer Traffic Flow</p >
@@ -40,119 +41,23 @@ examples of quotas.
40
41
41
42
These mechanisms are applied based on a set of [ attributes] ( {{site.baseurl}}/docs/concepts/attributes.html ) that are
42
43
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.
44
+ can also use Mixer to report telemetry or manage quotas. (Note: as of Istio Alpha, only Envoy can call Mixer.)
44
45
45
46
## Adapters
46
47
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.
48
+ Mixer is a highly modular and extensible component. One of it's key functions is to abstract
49
+ away the details of different policy and telemetry backend systems, allowing Envoy and Istio-based
50
+ services to be agnostic of those backends, which keeps them portable.
49
51
50
- Adapters are binary-level plugins to Mixer which allow Mixer to interface
51
- to different backend systems that deliver core control-plane functionality, such as logging, monitoring, quotas, ACL checking, and more. Adapters
52
- enable Mixer to expose a single consistent control API, independent of the backends in use. The exact set of adapters
53
- used at runtime is determined through configuration.
52
+ Mixer's flexibility in dealing with different backend systems is achieved by having a general-purpose
53
+ plug-in model. Individual plug-ins are known as * adapters* and they allow
54
+ Mixer to interface to different backend systems that deliver core functionality, such as logging, monitoring, quotas, ACL
55
+ checking, and more. Adapters enable Mixer to expose a single consistent API, independent of the backends in use.
56
+ The exact set of adapters used at runtime is determined through configuration and can easily be extended
57
+ to target new or custom backend systems.
54
58
55
59
<img style =" width :65% ;display :block ;margin :auto ;" src =" ./mixer/adapters.svg " alt =" Mixer and its adapters. " />
56
60
57
- ## Descriptors and Adapter Parameters
58
-
59
- Mixer is essentially an attribute processing machine. It takes in a number of attributes from
60
- its caller and produces as a result a set of calls into its adapters, which in turn trigger calls to
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.
64
-
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:
67
-
68
- - Mixer supports a variety of different descriptor kinds (Metric Descriptor, Log Entry Descriptor, Quota Descriptor, etc)
69
-
70
- - For each descriptor kind, you can declare any number of descriptors within a given deployment.
71
-
72
- - While handling a request, Mixer's attribute processing phase can produce any number of distinct adapter parameters for each of the
73
- configured descriptors.
74
-
75
- An example can help clarify the concepts. Let's consider the ` MetricDescriptor ` type which is defined as follows:
76
-
77
- ``` proto
78
- message MetricDescriptor {
79
- string name = 1;
80
- string display_name = 2;
81
- string description = 3;
82
-
83
- enum MetricKind {
84
- METRIC_KIND_UNSPECIFIED = 0;
85
- GAUGE = 1;
86
- COUNTER = 2;
87
- }
88
-
89
- MetricKind kind = 4;
90
- ValueType value = 5;
91
- repeated LabelDescriptor labels = 6;
92
- }
93
- ```
94
-
95
- Within a deployment configuration, you can declare a metric descriptor using a snippet of YAML:
96
-
97
- ``` yaml
98
- name : request_count
99
- kind : COUNTER
100
- value : INT64
101
- description : request count by source, target, service, and code
102
- labels :
103
- - name : source
104
- valueType : STRING
105
- - name : target
106
- valueType : STRING
107
- - name : service
108
- valueType : STRING
109
- - name : method
110
- valueType : STRING
111
- - name : response_code
112
- valueType : INT64
113
- ` ` `
114
-
115
- This is declaring a descriptor called ` request_count`. Because of the kind and value fields, policy objects associated with this
116
- descriptor represent 64-bit integer counters. Additionally, each associated policy object will be uniquely identified via the 5
117
- listed labels. Producing a policy object for such a descriptor requires 6 pieces of information :
118
-
119
- - a 64-bit integer metric value
120
- - a source string
121
- - a target string
122
- - a service string
123
- - a method string
124
- - a 64-bit integer response code
125
-
126
- Here is an example snippet of Istio configuration which produces adapter parameters given the above descriptor :
127
-
128
- ` ` ` yaml
129
- descriptor_name: request_count
130
- value: "1"
131
- labels:
132
- source: source.name | "unknown"
133
- target: target.name | "unknown"
134
- service: api.name | "unknown"
135
- method: api.method | "unknown"
136
- response_code: response.code | 200
137
- ` ` `
138
-
139
- Many such parameters are are typically created as part of attribute processing and they ultimately determine what
140
- adapters do.
141
-
142
- Explicitly defining descriptors and creating adapter parameters using them is akin to types and objects in a traditional
143
- programming language. Doing so enables a few important scenarios :
144
-
145
- - Having the set of descriptors explicitly defined enables Istio to program backend systems to accept traffic produced
146
- by Mixer. For example, a `MetricDescriptor` provides all the information needed to program a backend system to accept metrics
147
- that conform to the descriptor's shape (it's value type and its set of labels).
148
-
149
- - It enables type checking of the deployment's configuration. Since attributes have strong types, and so do descriptors,
150
- Istio can provide a number of strong correctness guarantees of the system's configuration. Basically, if a chunk of
151
- configuration is accepted into the Istio system, it means the configuration passes a minimum correctness bar. Again, this
152
- plays the same role as types in a programming language.
153
-
154
- - It enables Istio to provide a strongly-typed scripting environment as discussed [below](#scripting)
155
-
156
61
## Configuration state
157
62
158
63
Mixer's core runtime methods (` Check ` , ` Report ` , and ` Quota ` ) all accept a set of attributes on input and
@@ -164,15 +69,15 @@ for:
164
69
state that configures an adapter (adapters being binary plugins as described [ below] ( #adapters ) ).
165
70
166
71
- Establishing the types of adapter parameters that Mixer can manipulate. These
167
- types are described in configuration through a set of *descriptors* (as described [above]( #descriptors))
72
+ types are described in configuration through a set of * descriptors* (as described [ here ] ( ./mixer-config/ #descriptors) )
168
73
169
74
- Creating rules to map the attributes of every incoming request into a
170
75
specific set of aspects and adapter parameters.
171
76
172
77
The above configuration state is required to have Mixer know what to do with incoming attributes
173
78
and dispatch to the appropriate backend systems.
174
79
175
- Refer to *TBD* for detailed information on Mixer's configuration format .
80
+ Refer [ here ] ( ./mixer-config.md ) for detailed information on Mixer's configuration model .
176
81
177
82
## Request phases
178
83
0 commit comments