Istio Bookinfo Demo

Created:2024-06-01 Last Modified:2024-06-24

This document was translated by ChatGPT

#1. Introduction

This chapter uses a microservice application implemented in four languages: Java, Python, Ruby, and Node.js, to demonstrate DeepFlow's AutoTracing capabilities in a multi-language, Istio service mesh environment.

#2. Deploy Istio Bookinfo Demo

#2.1 Deploy Istio

You can refer to the Istio official documentation (opens new window) to deploy Istio. Alternatively, you can use the following commands for a quick deployment:

curl -L https://istio.io/downloadIstio | sh -
cd istio-*
export PATH=$PWD/bin:$PATH
istioctl install --set profile=demo -y
1
2
3
4

DeepFlow currently supports HTTPS collection for Golang applications, with support for other languages still under development. In this demo, we will disable Istio mTLS:

kubectl apply -f - <<EOF
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
  name: "default"
  namespace: "istio-system"
spec:
  mtls:
    mode: DISABLE
EOF
1
2
3
4
5
6
7
8
9
10

#2.2 Deploy Bookinfo Demo

The demo we use is sourced from this GitHub repository (opens new window), and its application architecture is as follows:

Bookinfo Application with Istio

Bookinfo Application with Istio

Use the following command to quickly deploy the demo in K8s:

kubectl apply -f https://raw.githubusercontent.com/deepflowio/deepflow-demo/main/Istio-Bookinfo/bookinfo.yaml
1

The original GitHub code repository for this demo uses Jaeger for active tracing. To demonstrate AutoTracing capabilities, we have removed Jaeger in the above deployment script.

#3. View Distributed Tracing

Go to Grafana, open the Distributed Tracing Dashboard, select namespace = deepflow-ebpf-istio-demo, and then choose a call to trace. The result is shown below:

eBPF Istio Demo

eBPF Istio Demo

You can also view the tracing results by visiting the DeepFlow Online Demo (opens new window). The topology corresponding to the flame graph of the call chain in the above image is as follows.

To summarize this tracing demo:

  • Zero Instrumentation: The entire tracing process does not require manually inserting any tracing code or injecting any TraceID/SpanID into the HTTP Header.
  • Multi-language: Supports tracing for applications in Java, Python, Ruby, NodeJS, and foundational services in C/C++ (curl/envoy).
  • Full Link: Utilizes eBPF and BPF to automatically trace 38 spans in this trace, including 24 eBPF spans and 14 BPF spans.
  • Full Stack: Supports tracing the network path between two pods on the same K8s node, such as spans 4-5.
  • Full Stack: Supports tracing the network path between two pods across K8s nodes, even if it involves tunnel encapsulation, such as spans 12-15 (IPIP tunnel encapsulation).
  • Full Stack: Supports tracing the entire process within a pod from Envoy Ingress, service process, to Envoy Egress, such as spans 6-11.