Skip to content

Instantly share code, notes, and snippets.

View bianpengyuan's full-sized avatar

Pengyuan Bian bianpengyuan

View GitHub Profile
@bianpengyuan
bianpengyuan / gist:eb3d9b797cfa9f4765b02ee5d4d04da2
Created December 7, 2021 20:21
TCP MX Latency Measurement
P50 and P90 latency impact of switching TCP & HTTP MX.
#!/bin/sh
# Donwload latest Istio release and replace istioctl command to the latest
set -x
set -e
LATEST_COMMIT=$(curl https://storage.googleapis.com/istio-build/dev/latest)
ISTIO_RELEASE=istio-${LATEST_COMMIT}
URL="https://gcsweb.istio.io/gcs/istio-build/dev/${LATEST_COMMIT}/${ISTIO_RELEASE}-linux-amd64.tar.gz"
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: stackdriver-filter-1.7
namespace: istio-system
labels:
istio.io/rev: default
spec:
configPatches:
- applyTo: HTTP_FILTER
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: stats-filter-1.9
namespace: istio-system
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: GATEWAY
package main
import (
"encoding/csv"
"encoding/json"
"flag"
"io/ioutil"
"log"
"os"
"sort"
{
repository(name: "istio", owner: "istio") {
milestone(number: 22) {
title
issues(first: 1000, filterBy: {states: OPEN}) {
edges {
node {
title
url
state
@bianpengyuan
bianpengyuan / gist:637dc199276cd1d40171f81f07bfb813
Created September 1, 2020 16:07
Envoy gRPC access log API attributes bag
connection.requested_server_name : outbound_.9080_._.productpage.default.svc.cluster.local
context.protocol : http
context.reporter.kind : inbound
context.reporter.uid : envoy_accesslog_service
destination.ip : [0 0 0 0 0 0 0 0 0 0 255 255 10 48 2 7]
destination.port : 9080
destination.principal : cluster.local/ns/default/sa/bookinfo-productpage
destination.service.host : productpage.default.svc.cluster.local
destination.service.name : productpage
destination.service.namespace : default
context.protocol : http
context.reporter.kind : inbound
destination.ip : [0 0 0 0 0 0 0 0 0 0 255 255 10 48 2 7]
destination.port : 9080
destination.principal : cluster.local/ns/default/sa/bookinfo-productpage
request.headers : stringmap[:authority:35.225.168.47 :method:GET :path:/productpage accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 accept-encoding:gzip, deflate accept-language:en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.6 cache-control:max-age=0 content-length:0 upgrade-insecure-requests:1 user-agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 x-b3-sampled:0 x-b3-spanid:76bca117e57b52fd x-b3-traceid:7c494d8e0c3a9c8b76bca117e57b52fd x-envoy-attempt-count:1 x-envoy-internal:true x-forwarded-client-cert:By=spiffe://cluster.local/ns/default/sa/bookinfo-productpage;Hash=34dcd285df9ec4fcfb7e4af16a5113b914810933fe47a4bb83655cbbda3ee8bd;Subject="";
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
labels:
install.operator.istio.io/owning-resource: installed-state
istio.io/rev: default
operator.istio.io/component: Pilot
operator.istio.io/managed: Reconcile
operator.istio.io/version: 1.6-alpha.79511c659fcdcadd155cb1c17f3f4c4f8aba68ff
name: stats-filter-1.6
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: metadata-exchange-1.5
namespace: istio-system
spec:
configPatches:
- applyTo: HTTP_FILTER
match: