You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/06 02:45:52 UTC

[GitHub] [apisix] spacewander commented on issue #6580: feat: Redesign the architecture of the plugin system

spacewander commented on issue #6580:
URL: https://github.com/apache/apisix/issues/6580#issuecomment-1089702647

   I take a closer look at this proposal.
   Currently, APISIX is route-based proxy (every configuration is bound to the route). This proposal will require changing APISIX to a plugin-based proxy (every configuration is organized as a plugin configuration), which needs to rewrite APISIX totally, so IMHO I can't accept such a proposal. 
   
   What about a smaller change, like adding a priority field in the route's plugin? Like:
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "methods": ["GET"],
       "uri": "/index.html",
       "plugins": {
           "limit-conn": {
               "_meta": {"priority":1200}
               "conn": 1,
               "burst": 0,
               "default_conn_delay": 0.1,
               "rejected_code": 503,
               "key_type": "var",
               "key": "http_a"
           },
           "ip-restriction": {
                 "_meta": {"priority":200}
                 "whitelist": [
                       "127.0.0.1",
                        "113.74.26.106/24"
                  ]
           }
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:1980": 1
           }
       }
   }'
   ```


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

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