apache / dubbo-go

Go Implementation For Apache Dubbo .
https://dubbo.apache.org/
Apache License 2.0
4.67k stars 910 forks source link

to support conditional routing with multiple destinations, customize conditional routing priorities and operation in route fail #2684

Open YarBor opened 1 month ago

YarBor commented 1 month ago

What would you like to be added: Support conditional routing with multiple destinations, and customize conditional routing priorities.

Why is this needed: To cope with more complex routing scenarios.

Now condition-rule is image Specifically, the matching condition of dubbo traffic(now) is only one match, and the incoming consumerURL is matched against all matching conditions, and the URLs of all callable objects and filtering conditions are matched.

in complex routing: (for example, i think what need to support in condition-routing)

all active service providers go match region=$region & env=$env first, Match success, call them in loadbalance. Match fail , then go match env=$env or any other ... until get service providers i want or nothing.

Also, it is necessary to customize the behavior when a single conditional route fails to match. (match next or return null directly)