envoyproxy/envoy

Support generic protocol routing

Open

#9,656 建立於 2020年1月10日

在 GitHub 查看
 (12 留言) (3 反應) (0 負責人)C++ (5,373 fork)batch import
design proposalhelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

Title: Provide a generic schema and implementation for custom protocol routers

Description: Looking at the custom protocol filters that have been added to Envoy very few of them support much in the way of routing, for the ones that do (Dubbo, Redis and Thrift ) there is a lot of semantic & impl duplication. It seems like there is an opportunity to provide a generic routing facility to filter implementations.

Generally speaking the Dubbo and Thrift ones are very HTTP-like, the Redis one is simpler but essentially is a path prefix match with some stripping.

I wonder if it makes sense for Envoy to canonicalize a schema and provide a default implementation for the filters to use? This seems like a decent win for filter implementers...

attrs = extract_protocol_features(bytes) cluster = generic_router.resolve(attrs) send_stuff_to_cluster(cluster)

If Envoy standardized this mechanism and a schema to configure the router then it simplifies life for most filter implementers and it helps control planes by having a standard schema for them to work with.

We already have fairly generic support for a system like this using CEL but we can choose to use other representations for the match conditions, e.g. flattened attribute matches like those in http route matching.

Assuming this made sense there are further considerations like extending this to work with an RDS-like mechanism etc for dynamic loading

It seems like this has been discussed in the context of UDPA too.

Relevant Links UDPA Dubbo Route Thrift Route Redis Route Istio Discussion

貢獻者指南