Skip to main content
logoTetrate Enterprise Gateway for Envoy (TEG)Version: v1.0.x

Review Monthly Performance of Envoy Gateways

This document aims to guide you through the process of reviewing the monthly performance of your Envoy Gateways. By following this guide, you will be able to set up the necessary metrics collection, generate monthly traffic reports, and identify the top 10 slowest APIs. The ultimate goal is to provide you with actionable insights to optimize the performance of your Envoy Gateways.

Prerequisites

Before you begin, ensure that you have the following:

  • TEG demo installed
  • Basic understanding of Kubernetes and observability tools.

Setting Up Metrics Collection

First, set up the necessary metrics collection stack. Follow these steps to install Prometheus and Grafana with add-ons Helm chart on your Kubernetes cluster:

helm install eg-addons oci://docker.io/envoyproxy/gateway-addons-helm --version v1.1.0 --set opentelemetry-collector.enabled=true -n monitoring --create-namespace

Get the Grafana endpoint:

We will set the $GRAFANA_ADDRESS to the external IP.

export GRAFANA_ADDRESS=$(kubectl get svc grafana -n monitoring -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

Navigate to http://${GRAFANA_ADDRESS} and sign in with the credentials admin/admin.

Envoy Gateway add-on Helm charts includes all the needing components for observability.

Grafana Dashboard

Generating Monthly Traffic Reports

  1. Open Grafana and navigate to the Prometheus data source.

  2. Use the following Prometheus query to get monthly traffic data:

    sum(increase(envoy_http_downstream_rq_total[30d]))
  3. Save this query in a Grafana dashboard panel to generate a monthly traffic report.

Identifying the Top 10 Slowest APIs

  1. In Prometheus, use the following query to get the response time of APIs:

    topk(10, histogram_quantile(0.99, sum(rate(envoy_cluster_upstream_rq_time_bucket{envoy_cluster_name=~"$cluster"}[5m])) by (le, envoy_cluster_name, envoy_route_name)))
  2. This query gives you the 99th percentile response time for each route.

  3. In Grafana, create a new panel with this query and sort the results to identify the top 10 slowest APIs.

  4. Save this panel to your dashboard for continuous monitoring.

Example: Detailed Grafana Dashboard Setup

  1. Create a new dashboard in Grafana.
  2. Add a new panel with the title "Monthly Traffic Report".
  3. Use the Prometheus query provided above to display monthly traffic.
  4. Add another panel titled "Top 10 Slowest APIs".
  5. Use the response time query and configure the panel to display the top 10 results.

Edit panel