tokers commented on issue #2303:
URL: https://github.com/apache/apisix/issues/2303#issuecomment-703507376


   > I like this proposal very much and think it will be the final form.        
   > 
   > This function can be divided into two parts:
   > 
   > 1.label &&  selector;
   > 
   > 2. A grayscale upgrade configuration;
   > 
   > These two things can be done simultaneously.
   > 
   > 
   > 
   > 1. Implement label && selector to replace the current upstream_id binding 
relationship;
   > 
   > 2. The configuration method of grayscale upgrade can be realized by a 
plug-in version first. 
   > 
   > After waiting for the label function to be implemented, the gray scale 
capability is migrated to the native implementation in the apisix object.
   > 
   > 
   > 
   > The plug-in configuration is similar to this:
   > 
   > 
   > 
   > ```json
   > 
   > "plugins":{
   > 
   >    "routex": {
   > 
   >            "rules": [
   > 
   >                    {
   > 
   >                            "match": [
   > 
   >                            {
   > 
   >                                "vars": [
   > 
   >                                    [ "arg_user_id", ">=", 13],
   > 
   >                                    [ "arg_user_id", "<=", 133]
   > 
   >                                ]
   > 
   >                            },
   > 
   >                            {
   > 
   >                                    "vars": [
   > 
   >                                            [ "arg_user_id", "==", 222]
   > 
   >                                    ]
   > 
   >                            }
   > 
   >                        ],
   > 
   >                        "upstreams": [
   > 
   >                            {
   > 
   >                                "upstream_id": 3,
   > 
   >                                "weight": 20
   > 
   >                            },
   > 
   >                            {
   > 
   >                                "upstream_id": 5,
   > 
   >                                "weight": 80
   > 
   >                            }
   > 
   >                        ]
   > 
   >                    }
   > 
   >            ]    
   > 
   >    }
   > 
   > }
   > 
   > ```
   
   We need further discussion after @moonming and @membphis have some time to 
analyze this proposal.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to