membphis opened a new issue #841: I'm trying to develop an ab-test plugin, how 
to implement it?
URL: https://github.com/apache/incubator-apisix/issues/841
 
 
   Hi, I'm trying to develop an ab-test plugin and it will be used for the 
backend API's URI or params control. The configuration below is my simple 
design. I'm not sure whether it is a generic feature. Looking forward to your 
suggestion.
   ```json
   {
       "ab-test-rewrite": {
           "enabled": true,
           "default": {
               "uri": "/test/home.html",
               "scheme": "http",
               "host": "iresty.com",
               "headers": {
                   "X-Api-Version": "v1",
                   "X-Api-Engine": "apisix",
                   "X-Api-useless": ""
               }
           },
           "tests": [
               {
                   "condition": [
                       {
                           "proccessor": "mod|7",
                           "field": "userid",
                           "range": "0,4"
                       }
                   ],
                   "rewrite": {
                       "uri": "/test?group_id=234"
                   }
               },
               {
                   "condition": [
                       {
                           "proccessor": "mod|7",
                           "field": "userid",
                           "range": "5,6"
                       }
                   ],
                   "rewrite": {
                       "uri": "/test?group_id=83838"
                   }
               }
           ]
       }
   }
   ```
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to