envoyproxy / envoyproxy/envoy

Preprocess `:path` header to avoid repeatedly splitting the header for route picking.

Open
#20,352 8 comments 0 reactions 0 assignees View on GitHub
area/matching no stalebot
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

Route matching is performed on each route in a virtual host (linearly until the matched route is found) and each routing matching will perform path matching once. When path matching is performed, it will try to split `:path` header into front part and back part (query param and/or fragment)](https://github.com/envoyproxy/envoy/blob/266c9fa51b0d1dbce746abda6c1b47b3ca19c3cb/source/common/common/matchers.cc#L126). This means splitting is currently done **up to N times** where N is number of routes in a virtual host.

Can we do the splitting instead when the `:path` header is parsed into RequestHeaderMap to avoid repeatedly splitting done during route picking?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.