Giter Club home page Giter Club logo

aeraki's Introduction

Aeraki

License Go Report Card CI Tests E2E Tests E2E Tests E2E Tests E2E Tests E2E Tests

Manage any layer 7 traffic in Istio service mesh!


Aeraki [Air-rah-ki] is the Greek word for 'breeze'. While Istio connects microservices in a service mesh, Aeraki provides a framework to allow Istio to support more layer 7 protocols other than just HTTP and gRPC. We hope that this breeze can help Istio sail a little further.

Problems to solve

We are facing some challenges in service meshes:

  • Istio and other popular service mesh implementations have very limited support for layer 7 protocols other than HTTP and gRPC.
  • Envoy RDS(Route Discovery Service) is solely designed for HTTP. Other protocols such as Dubbo and Thrift can only use listener in-line routes for traffic management, which breaks existing connections when routes change.
  • It takes a lot of effort to introduce a proprietary protocol into a service mesh. You’ll need to write an Envoy filter to handle the traffic in the data plane, and a control plane to manage those Envoys.

Those obstacles make it very hard, if not impossible, for users to manage the traffic of other widely-used layer-7 protocols in microservices. For example, in a microservices application, we may have the below protocols:

  • RPC: HTTP, gRPC, Thrift, Dubbo, Proprietary RPC Protocol …
  • Messaging: Kafka, RabbitMQ …
  • Cache: Redis, Memcached …
  • Database: MySQL, PostgreSQL, MongoDB …

 Common Layer-7 Protocols Used in Microservices

If you have already invested a lot of effort in migrating to a service mesh, of course, you want to get the most out of it — managing the traffic of all the protocols in your microservices.

Aeraki's approach

To address these problems, Aeraki Framework providing a non-intrusive, extendable way to manage any layer 7 traffic in a service mesh.  Aeraki

As this diagram shows, Aeraki Framework consists of the following components:

  • Aeraki: Aeraki provides high-level, user-friendly traffic management rules to operations, translates the rules to envoy filter configurations, and leverages Istio’s EnvoyFilter API to push the configurations to the sidecar proxies. Aeraki also serves as the RDS server for MetaProtocol proxies in the data plane. Contrary to Envoy RDS, which focuses on HTTP, Aeraki RDS is aimed to provide a general dynamic route capability for all layer-7 protocols.
  • MetaProtocol Proxy: MetaProtocol Proxy provides common capabilities for Layer-7 protocols, such as load balancing, circuit breaker, load balancing, routing, rate limiting, fault injection, and auth. Layer-7 protocols can be built on top of MetaProtocol. To add a new protocol into the service mesh, the only thing you need to do is implementing the codec interface and a couple of lines of configuration. If you have special requirements which can’t be accommodated by the built-in capabilities, MetaProtocol Proxy also has an application-level filter chain mechanism, allowing users to write their own layer-7 filters to add custom logic into MetaProtocol Proxy.

Dubbo and Thrift have already been implemented based on MetaProtocol. More protocols are on the way. If you're using a close-source, proprietary protocol, you can also manage it in your service mesh simply by writing a MetaProtocol codec for it.

Most request/response style, stateless protocols can be built on top of the MetaProtocol Proxy. However, some protocols' routing policies are too "special" to be normalized in MetaProtocol. For example, Redis proxy uses a slot number to map a client query to a specific Redis server node, and the slot number is computed by the key in the request. Aeraki can still manage those protocols as long as there's an available Envoy Filter in the Envoy proxy side. Currently, for protocols in this category, Redis and Kafka are supported in Aeraki.

Reference

Supported protocols:

  • Dubbo
    • Service Discovery
    • Traffic Management
      • Request Level Load Balancing
      • Version Based Routing
      • Traffic Splitting
      • Method Based Routing
      • Header Based Routing
      • Crcuit Breaker
      • Locality Load Balancing
      • RDS(Route Discovery Service)
    • Observability
      • Dubbo Request Metrics
    • Security
      • Peer Authorization on Interface/Method
      • Rquest Authorization
  • Thrift
    • Traffic Management
      • Request Level Load Balancing
      • Version Based Routing
      • Traffic Splitting
      • Header Based Routing
      • Rate Limit
    • Observability
      • Thrift Request Metrics
  • Kafka
    • Metrics
  • ZooKeeper
    • Metrics
  • Redis
    • Redis Cluster
    • Sharding
    • Prefix Routing
    • Auth
    • Traffic Mirroring
  • MySql
  • MongoDB
  • Postgres
  • RocketMQ
  • TARS
  • ...

Demo

Live Demo: kiali Dashboard

Live Demo: Service Metrics: Grafana

Live Demo: Service Metrics: Prometheus

Screenshot: Service Metrics: Screenshot: Service Metrics

Recored Demo: Dubbo and Thrift Traffic Management Thrift and Dubbo traffic management demo

Install

Pre-requirements:

  • A running Kubernetes cluster, which can be either a cluster in the cloud, or a local cluster created with kind/minikube
  • Kubectl installed, and the ~/.kube/conf points to the cluster in the first step
  • Helm installed, which will be used to install some components in the demo

Download Aeraki from the Github

git clone https://github.com/aeraki-framework/aeraki.git

Install Istio, Aeraki and demo Applications

make install

Note: Aeraki needs to configure Istio with smart dns. If you already have an Istio installed and don't know how to turn on smart dns, please uninstall it. install-demo.sh will install Istio for you.

Uninstall Istio, Aeraki and demo Applications

make uninstall

Open the following URLs in your browser to play with Aeraki and view service metrics

  • Kaili http://{istio-ingressgateway_external_ip}:20001
  • Grafana http://{istio-ingressgateway_external_ip}:3000
  • Prometheus http://{istio-ingressgateway_external_ip}:9090

You can import Aeraki demo dashboard from file demo/aeraki-demo.json into the Grafana.

Build

Pre-requirements:

  • Golang Version >= 1.16, and related golang tools installed like goimports, gofmt, etc.
  • Docker and Docker-Compose installed

Build Aeraki Binary

# build aeraki binary on linux
make build

# build aeraki binary on darwin
make build-mac

Build LazyXDS Binary

# build lazyxds binary on linux
make build.lazyxds

# build lazyxds binary on darwin
make build-mac.lazyxds

Build Aeraki Image

# build aeraki docker image with the default latest tag
make docker-build

# build aeraki docker image with xxx tag
make docker-build tag=xxx

# build aeraki e2e docker image
make docker-build-e2e

Build LazyXDS Image

# build lazyxds docker image with the default latest tag
make docker-build.lazyxds

# build lazyxds docker image with xxx tag
make docker-build.lazyxds tag=xxx

# build lazyxds e2e docker image
make docker-build-e2e.lazyxds

Talks

Who is using Aeraki?

Sincerely thank everyone for choosing, contributing, and using Aeraki. We created this issue to collect the use cases so we can drive the Aeraki community to evolve in the right direction and better serve your real-world scenarios. We encourage you to submit a comment on this issue to include your use case:aeraki-mesh#105

Contact

  • Mail: If you're interested in contributing to this project, please reach out to [email protected]
  • Wechat Group: Please contact Wechat ID: zhao_huabing to join the Aeraki Wechat group
  • Slack: Join Aeraki slack channel

aeraki's People

Contributors

zhaohuabing avatar xunzhuo avatar zhongfox avatar clarechu avatar scaat avatar kuonjimayoi avatar dragonly avatar cocotyty avatar tanjunchen avatar hellomyboy avatar

Watchers

James Cloos avatar

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.