Envoy
Makefileでコンパイルしたらばratelimit_config_checkなるコマンドでvalidateできるけど、まだDockerコンテナなどでは使えない github.com
設定読み込みはファイル(デフォルト)かxDSサーバーしかない File Based Configuration Loading FILE (Default) xDS Server Based Configuration Loading GRPC_XDS_SOTW github.com
Redisがクラスターモードだとimplicit pipeliningの取り決めでpipeline windowかpipeline limitのいずれかを設定しないといけない。秒単位で送るかコマンド数単位で送るか。なんかいかにも両方設定できそうな気配があるけど、両方設定するとratelimitが動か…
Even if default HTTP2 protocol options are desired, this field must be set so that Envoy will assume that the upstream supports HTTP/2 when making new HTTP connection pool connections. Currently, Envoy only supports prior knowledge for ups…
REDIS_PIPELINE_WINDOW(暗黙パイプラインで一度にまとめられるコマンド数の上限)/REDIS_PIPELINE_LIMIT(まとめて送信するコマンド数の上限)はデフォルト値ゼロ cluster modeなredisを利用するときはいずれかの環境変数を明示セットしなければならない github…
8081 ratelimit gRPC サーバー これがコア 8080 httpのエンドポイント(healthcheck json) 6070 デバッグポート github.com
envoyproxy/ratelimitのconfigファイルのバリデーションチェックができるコマンドだけど、あんまり大々的に案内してないっぽい make compileからbinの下にratelimit_config_checkができるのを勝手に使う help -config_dir string path to directory containi…
Envoy 1.27以降 tracing: custom_tags: - tag: resource.name request_header: name: ":authority" provider: name: envoy.tracers.datadog typed_config: "@type": type.googleapis.com/envoy.config.trace.v3.DatadogConfig collector_cluster: datadog_cl…
timeoutもidle_timeoutもDurationで、60sじゃなくて1mなんかにすると duration must end with a single 's' ってprotobufから怒られる。 github.com www.envoyproxy.io protobuf.dev
operation:envoy.proxyでresourceがingress固定になりがち問題があるけれど、ソースコード的には多分この辺で指定している github.com github.com resourceはこの辺あたりを駆使して上書きできる。 www.envoyproxy.io
trace.envoy.proxy.hits Envoyプロキシが受け付けたリクエスト数 trace.envoy.proxy.errors Envoyプロキシが受け付けたリクエストのエラー数 techblog.zozo.com ピンポイントで調べづらいけどこの辺 trace.<SPAN_NAME>.hits などトレースメトリクスの一種 docs.datadogh</span_name>…
config.route.v3.VirtualHostの下に書く 複数書きたいときは以下のように書く response_headers_to_add: - header: key: "x-frame-options" value: "sameorigin" - header: key: "x-xss-protection" value: "1; mode=block" www.envoyproxy.io tech.uzabase.…
envoyのspanをカスタムするためのものだけど、x-envoy-decorator-operationヘッダーを修正するだけでもいいらしい なおoperationはstring型なので%REQ(:AUTHORITY)%などは使えない。 { "operation": ..., "propagate": {...} } www.envoyproxy.io github.com…
書き方チラチラ変わるのがちょっとした困りどころ http_filtersの下に書く - name: lua-custom-name typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua default_source_code: inline_string: | -- Called on the reques…
tracingでゴニョゴニョする感じ https://github.com/envoyproxy/examples/blob/main/datadog-tracing/envoy.yaml#L11-L20 github.com 設定はAPMのservice名とかenvoyのクラスター名の最低限だけで、タグとかつけられない… www.envoyproxy.io
ポイント トレースを Datadog Agent に送信するためのクラスター トレースをアクティブにするための http_connection_manager コンフィギュレーション clusters: ... existing cluster configs ... - name: datadog_agent connect_timeout: 1s type: strict_…
envoy global rate limitでこんなエラーが出たら、ratelimit側の設定を見直すべし 間違ってる例 domain: "envoy" descriptors: - key: "path" - value: "/specific-path" # ココ rate_limit: unit: minute requests_per_unit: 100 github.com
v3指定でenvoy.filters.http.routerを全省略した書き方するとエラーになるので http_filters: - name: envoy.filters.http.router typed_configの@typeを指定してやると良い - name: envoy.filters.http.router typed_config: "@type": type.googleapis.com/…
enable_x_ratelimit_headers X-RateLimit ヘッダーでratelimitがどのくらい掛かってるのか、ratelimitの進捗を確認できるようにする DRAFT_VERSION_03 か OFF www.envoyproxy.io
grlで略してOK… gateway.envoyproxy.io
RUNTIME_ROOT default:"/srv/runtime_data/current" RUNTIME_SUBDIRECTORY RUNTIME_APPDIRECTORY default:"config" RUNTIME_IGNOREDOTFILES default:"false" 上記設定をすると、設定ファイルの場所は RUNTIME_ROOT/RUNTIME_SUBDIRECTORY/RUNTIME_APPDIRECTOR…
virtual_hostsの中で書く { "stage": {...}, "disable_key": ..., "actions": [], "limit": {...}, "hits_addend": {...}, "apply_on_stream_done": ... } www.envoyproxy.io
細かい設定や型はドキュメントにて参考に { "name": ..., "virtual_hosts": [], "vhds": {...}, "internal_only_headers": [], "response_headers_to_add": [], "response_headers_to_remove": [], "request_headers_to_add": [], "request_headers_to_remov…
細かい環境変数について説明がないのでソースコードを参照する… github.com