EnvoyFilter로 HTTP 압축 관리하기
Compressor
References
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
subFilter:
name: envoy.filters.http.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.compressor
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.compressor.v3.Compressor
response_direction_config:
common_config:
min_content_length: 1024
compressor_library:
name: text_optimized
typed_config:
"@type": type.googleapis.com/envoy.extensions.compression.brotli.compressor.v3.Brotli
content_length- 최소 response 길이입니다.
- 기본값은 30입니다.
content_type- 압축이 적용될 mime-types 입니다.
- 기본값은
["application/javascript", "application/json", "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"]입니다.
disable_on_etag_headerremove_accept_encoding_headerruntime_enabled
request_direction_config- 설정하지 않으면 기본적으로 비활성화 됩니다.
common_configenableddefault_valueruntime_key
min_content_lengthcontent_type
response_direction_config- 설정하지 않으면 기본적으로 활성화 됩니다.
common_configenableddefault_valueruntime_key
min_content_lengthcontent_type
disable_on_etag_headerremove_accept_encoding_header
choose_first- compressor_library