Code Monkey home page Code Monkey logo

old_mixerclient_repo's Introduction

Istio

CII Best Practices Go Report Card GoDoc

Istio logo

Istio is an open source service mesh that layers transparently onto existing distributed applications. Istio’s powerful features provide a uniform and more efficient way to secure, connect, and monitor services. Istio is the path to load balancing, service-to-service authentication, and monitoring – with few or no service code changes.

  • For in-depth information about how to use Istio, visit istio.io
  • To ask questions and get assistance from our community, visit Github Discussions
  • To learn how to participate in our overall community, visit our community page

In this README:

In addition, here are some other documents you may wish to read:

You'll find many other useful documents on our Wiki.

Introduction

Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. Istio's control plane provides an abstraction layer over the underlying cluster management platform, such as Kubernetes.

Istio is composed of these components:

  • Envoy - Sidecar proxies per microservice to handle ingress/egress traffic between services in the cluster and from a service to external services. The proxies form a secure microservice mesh providing a rich set of functions like discovery, rich layer-7 routing, circuit breakers, policy enforcement and telemetry recording/reporting functions.

    Note: The service mesh is not an overlay network. It simplifies and enhances how microservices in an application talk to each other over the network provided by the underlying platform.

  • Istiod - The Istio control plane. It provides service discovery, configuration and certificate management. It consists of the following sub-components:

    • Pilot - Responsible for configuring the proxies at runtime.

    • Citadel - Responsible for certificate issuance and rotation.

    • Galley - Responsible for validating, ingesting, aggregating, transforming and distributing config within Istio.

  • Operator - The component provides user friendly options to operate the Istio service mesh.

Repositories

The Istio project is divided across a few GitHub repositories:

  • istio/api. This repository defines component-level APIs and common configuration formats for the Istio platform.

  • istio/community. This repository contains information on the Istio community, including the various documents that govern the Istio open source project.

  • istio/istio. This is the main code repository. It hosts Istio's core components, install artifacts, and sample programs. It includes:

    • istioctl. This directory contains code for the istioctl command line utility.

    • operator. This directory contains code for the Istio Operator.

    • pilot. This directory contains platform-specific code to populate the abstract service model, dynamically reconfigure the proxies when the application topology changes, as well as translate routing rules into proxy specific configuration.

    • security. This directory contains security related code, including Citadel (acting as Certificate Authority), citadel agent, etc.

  • istio/proxy. The Istio proxy contains extensions to the Envoy proxy (in the form of Envoy filters) that support authentication, authorization, and telemetry collection.

  • istio/ztunnel. The repository contains the Rust implementation of the ztunnel component of Ambient mesh.

Issue management

We use GitHub to track all of our bugs and feature requests. Each issue we track has a variety of metadata:

  • Epic. An epic represents a feature area for Istio as a whole. Epics are fairly broad in scope and are basically product-level things. Each issue is ultimately part of an epic.

  • Milestone. Each issue is assigned a milestone. This is 0.1, 0.2, ..., or 'Nebulous Future'. The milestone indicates when we think the issue should get addressed.

  • Priority. Each issue has a priority which is represented by the column in the Prioritization project. Priority can be one of P0, P1, P2, or >P2. The priority indicates how important it is to address the issue within the milestone. P0 says that the milestone cannot be considered achieved if the issue isn't resolved.


Cloud Native Computing Foundation logo

Istio is a Cloud Native Computing Foundation project.

old_mixerclient_repo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

old_mixerclient_repo's Issues

Elevate common request headers to attributes

We need to move common request headers to be first class attributes in order to improve cache efficiency. If the Mixer references any request headers during a Check call, the cache entry ends up being invalidated whenever any request header changes, which is the normal case. This effect completely neutralizes the existing cache.

Make the set of attributes sent to the Mixer to be configurable

Add configuration control over which attributes should be sent to Mixer for both Check and Report. This will optimize the RPC exchanges between proxy and Mixer.

Although this configuration will set initially set by hand, eventually we can generate this config state automatically based on what the Mixer is configured to use.

There should be different configuration state for Check and Report.

Add trace spans for client

For the distributed tracing features of Istio, we want to have mixerclient spans in the generated trace data. This would help with a number of debug-ability related items:

  • better understanding caching
  • better understanding perf of client library
  • better understanding impact of network

cc: @rshriram

Introduce an attribute specialization framework

We want to express caching in the proxy in terms of attributes. If a specific set of attributes remains constant for a given time and given # of uses, we can use a cached result for Check.

The attributes we have today often do not play well with the above goal because they aren't specific enough, leading to potentially completely ineffective caching. More specifically, there are cases where several different attribute values should be treated similarly from a caching perspective and are not. Some examples of this:

  • The quintessential example of this is request.size, where the semantics we'd like is "all request.size values < XXX".

  • Another example is request.time where we'd like to say things like "all requests between 12:00AM and 6:00AM".

  • Finally, request.url contains method names which we want to operate on specifically, having different cached answers for different methods.

The solution to these problems involves introducing an attribute specialization model within the client such that it can produce derived attributes based on its existing set. These derived attributes would be sufficiently fine-grained to allow effective caching. This can be driven by relatively simple code and simple configuration within the client. For example:

  • request.size. Generate the request.size.scale attribute which is a string assigned via config based on the range of the size. For example, the config can specify small:0..20, medium:21..200, large:201

  • request.time. Generate a variety of attributes automatically such as request.time.hour, request.time.dayOfWeek, etc. Also, generate the config-driven request.time.scheduledEvent attribute with stuff like offtimes: 0:00-6:00,18:00-23:59

  • request.url is broken down per Swagger
    In other words, we have specialized attribute processing algebra for a variety of attributes which is intended to produce new finer-grained attributes against which policies are applied in Mixer. To improve caching, we will encourage Mixer config to be authored using these derived attributes when possible.

We need to look at the individual attributes we produce and figure out what kind of specialization makes sense for each, and what kind of config syntax we want to control this. Finally, we need to decide which of these derived attributes are the most useful in the short term in order to prioritize implementation work.

Hook up platform logging

Now the library is using GOOGLE_LOG. It is better to use the callers (Envoy) to provide logging function.

Use timer to flush out expired cache items

For all cached items, check and quota.

For quota, it is tricky, Some callback functions attached to on-progress requests may use the expired items. Have to be careful when removing them.

Support check cache keys from string map attributes

Now the check cache keys are a list of attribute names. e.g.

[
"request.path",
request.host"
]

A StringMap attribute such as "request.headers" has to use all its values.

It will be useful if we could choose some of keys out of a string map. such as ":method".

One idea is to use

"request.headers/:method" If there is a "/" in the cache key, the second portion is for the key within the map.

Make the set of request headers sent to Mixer configurable

We should make the set of request headers sent by the proxy to Mixer to be configurable such as to reduce the payload size of proxy RPCs to Mixer.

For now, the specific set will need to be configured by hand. But in the future, this can be handled automatically by observing what Mixer actually consumes and configuring the proxy accordingly.

Provide statistics

for
number of Check calls,
number of cache hits
number of quota calls for each metric
number of quota cache hits for each metric
number of report calls
number of remote report calls

destination.ip not sent as []byte

Expected to receive attribute destination.ip as a []byte. Instead, received string.

Example from attribute bag dump in latest Mixer:

destination.ip                : 10.56.2.185
source.ip                     : [10 150 0 5]

Note the key difference between the way in which source.ip and destination.ip are received.

httpFault/abort rules trigger does not send data to Prometheus

@esnible commented on Tue May 30 2017

To reproduce, start up bookinfo.

cat << EOF |
type: route-rule
name: ratings-fail-xpercent
spec:
  destination: ratings.default.svc.cluster.local
  precedence: 2
  httpFault:
    abort:
      percent: 95
      httpStatus: 500
EOF
istioctl replace

Drive some traffic. Then look at the output in Prometheus or ServiceGraph. The traffic is reduced by the %, but there are no response_code entries for the injected 500s.


@ZackButcher commented on Tue May 30 2017

This is likely a problem in either Envoy's Mixer filter or the mixerclient itself. Mixer just blindly pushes the data we're provided to the metric backend, these missing stats seem to indicate that Report calls aren't being made to the mixer by Envoy when it sees a 500.


@douglas-reid commented on Tue May 30 2017

@qiwzhang any ideas what might cause this related to the filter chain?

need more details for report_batch.cc:78] Mixer Report failed with: UNAVAILABLE

We see quite a lot of :

W0908 06:04:25.765] [libprotobuf ERROR external/mixerclient_git/src/report_batch.cc:78] Mixer Report failed with: UNAVAILABLE

eg https://k8s-gubernator.appspot.com/build/istio-prow/pull/istio_istio/699/e2e-suite-rbac-no_auth/360/

it would be great upon error to print which ip etc. we were connecting to and more details and granularity about the failure (did we fail to connect, did we timeout, did we not get a response, did we get a weird response, read error etc... (did we read anything, if so print that)

cc @mandarjog

Support automatic dictionary fallback to recover gracefully from dictionary mismatches

We should have support in mixerclient to recognize that the Mixer is using an older dictionary. Whenever this happens, the mixerclient would switch to using the V1 dictionary from that point forward (until the process is restarted that is). So a single Mixer instance not having been upgraded to the latest dictionary will lead to using an older dictionary, which would reduce overall compression, but would avoid a dictionary-related outage.

Doing this effectively means we can upgrade the dictionary in the client and mixer independently, they don't need to be in sync.

remove uuid dependency

it looks that mixerclient added a dependency on libuuid from
e2fsprogs, which isn't part of base OS (i.e. Goobuntu doesn't have it
installed by default).

However, this dependency wasn't added via Bazel, so the build is
broken and not hermetic at all.

I wanted to make a PR adding libuuid, but it looks that it's licensed
under GPLv2, which means that we cannot statically link against it,
AFAIK.

I think it is from util-linux, yes it is still LGPL, so I think we should remove the dependency.

Envoy has its own uuid impl:
https://github.com/lyft/envoy/blob/master/source/common/runtime/runtime_impl.cc#L28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.