cloudflare / cloudflare/pingora
Add associated type and methods to the DynamicCert and ProxyHttp trait for retrieving and reusing meta info of the stream
- Dominant language
- Rust
- Stars
- 27.4k
- Forks
- 1.7k
- Avg merge
- 6h 22m
- Merged PRs (30d)
- 3
Description
## What is the problem your feature solves, or the need it fulfills?
In CDN virtual L7 gateway environments, it is common to retrive real client ip and server ip from the L4 stream and find the policy for this stream. We need to retrive these extra stream_meta_info at the begining of the proxy or at the tls handshake and reuse these extra stream_meta_info within the whole lifetime of the stream. This could also reduce the duplicated query of policy for same stream and significantly improve the performance.
## Describe the solution you'd like
I propose adding associated type and methods to the DynamicCert and ProxyHttp trait. Users can set their own stream_meta_info and reuse it in other hooks like request_filter.
## Describe alternatives you've considered
Maybe it is possible to add ext Extensions in Sockets and add methods to the SocketDigest to get and set ext Extensions.
## Additional context
We have used pingora to refactor our nginx based CDN virtual L7 gateway and need to push the feature back to upstream.
Contributor guide
Assessment
This issue has not been assessed yet.