Cloud Native 9 min read

Configuring Traffic Mirroring with Aeraki in an Istio Service Mesh

This tutorial demonstrates how to install Aeraki and Istio, deploy Dubbo sample services, define ServiceEntry and MetaRouter resources, route traffic to a primary version, mirror traffic to a secondary version, verify logs, and explain the underlying MetaProtocol proxy mechanism for traffic mirroring.

Cloud Native Technology Community
Cloud Native Technology Community
Cloud Native Technology Community
Configuring Traffic Mirroring with Aeraki in an Istio Service Mesh

Aeraki's MetaProtocol extension enables management of any L7 protocol in a service mesh, supporting Dubbo, Thrift, and others, and introduces traffic mirroring as a risk‑free testing method.

First, install Aeraki, Istio, and the sample programs; after installation two namespaces meta-dubbo and meta-thrift appear.

kubectl get ns | grep meta
meta-dubbo   Active   16m
meta-thrift  Active   16m

Deploy two versions (v1 and v2) of the Dubbo sample provider using the provided Deployment manifests.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dubbo-sample-provider-v1
  labels:
    app: dubbo-sample-provider
spec:
  selector:
    matchLabels:
      app: dubbo-sample-provider
  replicas: 1
  template:
    metadata:
      annotations:
        sidecar.istio.io/bootstrapOverride: aeraki-bootstrap-config
        sidecar.istio.io/proxyImage: aeraki/meta-protocol-proxy-debug:1.1.1
      labels:
        app: dubbo-sample-provider
        version: v1
        service_group: user
    spec:
      containers:
      - name: dubbo-sample-provider
        image: aeraki/dubbo-sample-provider
        ports:
        - containerPort: 20880

Create a ServiceEntry for the Dubbo service.

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: dubbo-demoservice
  namespace: meta-dubbo
  annotations:
    interface: org.apache.dubbo.samples.basic.api.DemoService
spec:
  hosts:
  - org.apache.dubbo.samples.basic.api.demoservice
  ports:
  - number: 20880
    name: tcp-metaprotocol-dubbo
    protocol: TCP
  workloadSelector:
    labels:
      app: dubbo-sample-provider
  resolution: STATIC

Route consumer requests to v1 using a MetaRouter.

apiVersion: metaprotocol.aeraki.io/v1alpha1
kind: MetaRouter
metadata:
  name: test-metaprotocol-dubbo-route
  namespace: meta-dubbo
spec:
  hosts:
  - org.apache.dubbo.samples.basic.api.demoservice
  routes:
  - name: traffic-mirroring
    route:
    - destination:
        host: org.apache.dubbo.samples.basic.api.demoservice
        subset: v1

Verify that the consumer receives responses from v1.

aerakictl_app_log consumer meta-dubbo --tail 10
Hello Aeraki, response from dubbo-sample-provider-v1-6d67cc67fd-chfrk/172.16.0.183

Enable traffic mirroring to v2 by adding a mirror section to the MetaRouter.

apiVersion: metaprotocol.aeraki.io/v1alpha1
kind: MetaRouter
metadata:
  name: test-metaprotocol-dubbo-route
  namespace: meta-dubbo
spec:
  hosts:
  - org.apache.dubbo.samples.basic.api.demoservice
  routes:
  - name: traffic-mirroring
    route:
    - destination:
        host: org.apache.dubbo.samples.basic.api.demoservice
        subset: v1
    mirror:
      host: org.apache.dubbo.samples.basic.api.demoservice
      subset: v2
    mirrorPercentage:
      value: 100.0

Observe that v2 provider logs show the mirrored requests while v1 continues to receive the original traffic.

Explanation: Aeraki injects a MetaProtocol proxy into the sidecar’s outbound listener, translates MetaRouter rules into proxy routes, and uses an internal RDS server to distribute the configuration. The RoutesConfigDump reveals the request_mirror_policies that implement the mirroring.

kubernetesistioservice meshAerakiTraffic MirroringMetaProtocol
Cloud Native Technology Community
Written by

Cloud Native Technology Community

The Cloud Native Technology Community, part of the CNBPA Cloud Native Technology Practice Alliance, focuses on evangelizing cutting‑edge cloud‑native technologies and practical implementations. It shares in‑depth content, case studies, and event/meetup information on containers, Kubernetes, DevOps, Service Mesh, and other cloud‑native tech, along with updates from the CNBPA alliance.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.