yes, APISIX implement all feature in route object now, I think it is also useful to implement in a plugin , and they can be combined to use together.
Ming Wen <[email protected]> 于2020年9月14日周一 上午9:17写道: > Hi, wei jin, > Do you mean to implement routing matching and dynamically modifying > upstream in the plugin? > Both of them are implemented in the router object now. > So the canary release is now bound to the router. It would be better if > there is a separate plugin to implement it. > > Thanks, > Ming Wen, Apache APISIX & Apache SkyWalking > Twitter: _WenMing > > > wei jin <[email protected]> 于2020年9月12日周六 下午4:51写道: > > > As we know , APISIX can configure and distribute traffic through powerful > > routing strategies. With this capability, we can achieve grayscale > > publishing. > > > > After the route is determined, we can again control the traffic to the > > specified upstream through a plug-in, but it needs to be customized. I > > propose that the community implement a version of the gray plug-in that > > provides the following functions: > > > > 1. Specify matching conditions (for example, kv pairs of http > querystring, > > header and other parameters) > > 2. When a certain matching condition is met, specify upstream; > > 3. Specify the condition matching priority; > > > > Definition example: > > > > ```javascript > > { > > "grayscale":{ > > "rules": [ > > { > > "condition": [ > > { > > "use": "header", // enum: uri_args/header/path_reg/default > > "key": "user_id", > > "values": [ > > "U1", > > "U2", > > "U3" > > ], > > "operator": "anyOf" // enum: oneOf/anyOf/prefix/regular/... > > }, > > ... > > ], > > "upstream": {},// upstream or upstreamId > > "priority": 10 // 0~100 The larger the value, the higher the priority > > }, > > { > > "condition": [ > > { > > "use": "header", // enum: uri_args/header/path_reg/default > > "key": "appkey", > > "values": [ > > "dfaef-xfdafe-xj1kl3-1-jhilh1", > > "dfaef-xfdafe-xj1kl3-2-jhilh1", > > "dfaef-xfdafe-xj1kl3-3-jhilh1" > > ], > > "operator": "anyOf" // enum: oneOf/anyOf/prefix/regular/... > > }, > > ... > > ], > > "upstream": {},// upstream or upstreamId > > "priority": 10 // 0~100 The larger the value, the higher the priority > > } > > ... > > ] > > } > > } > > ``` > > >
