apache / apache/dubbo

[Feature] New Condition route v3.1

Open
#14,455 1 comment 0 reactions 0 assignees View on GitHub
help wanted type/proposal
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### Pre-check

- [X] I am sure that all the content I provide is in English.

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar feature requirement.

### Apache Dubbo Component

Java SDK (apache/dubbo)

### Descriptions

the updated condition-route like

# dubbo/config/group/{$name}.condition-router

```yaml
configVersion: v3.1
scope: service
key: org.apache.dubbo.samples.CommentService
force: false
runtime: true
enabled: true

#######
conditions:
- from:
match: tag=tag1 # disable traffic
- from:
match: tag=gray
to:
- match: tag!=gray
weight: 100
- match: tag=gray
weight: 900
- from:
match: version=v1
to:
- match: version=v1
```

# dubbo/config/group/{$name}.affinity-router

```yaml
configVersion: v3.1
scope: service # Or application
key: service.apache.com
enabled: true
runtime: true
affinityAware:
key: region
ratio: 20
```

### Related issues

https://github.com/apache/dubbo/pull/14356

### Are you willing to submit a pull request to fix on your own?

- [X] Yes I am willing to submit a pull request on my own!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing related pull request #14356 and the configuration paths shown for condition-router and affinity-router. Compare the proposed v3.1 YAML structures with the current implementation and determine how both examples should be supported; done means the requested route configurations work as specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.