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 2021/03/01 03:47:32 UTC

[GitHub] [apisix] gxthrj opened a new issue #3704: [DISCUSS] Use label instead of ID

gxthrj opened a new issue #3704:
URL: https://github.com/apache/apisix/issues/3704


   Currently APISIX contains many objects, route/service/upstream/plugin, and they are related by ID.
   Although using ID to manager relations between objects is easy to understand and can accomplish most things, but I think the way of ID is not a final solution, we should use the form of label-selector to associate objects.
   
   There are two reasons:
   
   1. Using ID means adding a relationship, or an object will need to add a xxx_id field to other existed objects, such as service_id, upstream_id, or other id in route. If it is a many-to-many relationship, you also need a xxx_ids, or a template_id, and then encapsulate multiple ids in the template, such as plugin_config_id in route.
   
   2. Service deployment and some batch processing (such as multi-cluster replication) is a multi-dimensional structure, for example, multiple clusters, multiple partitions, multiple issuance sequences, application hierarchical management and other practical situations, especially due to infrastructure rather than The multi-dimensional structure caused by the logical division of users. We cannot use id to pass in the multi-dimensional structure, resulting in the configuration cannot be passed and reused.
   
   Of course, using label-selector to organize object relationships brings some benefits, but it also increases the complexity of the implementation.
   For example, when a label is modified or the selection condition of a selector is modified, the corresponding object needs to be notified. Of course, this can also be implemented in other life cycles, such as query or timing operations.
   
   What do you think?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] github-actions[bot] commented on issue #3704: [DISCUSS] Use label instead of ID

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3704:
URL: https://github.com/apache/apisix/issues/3704#issuecomment-1055268279


   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


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



[GitHub] [apisix] gxthrj commented on issue #3704: [DISCUSS] Use label instead of ID

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #3704:
URL: https://github.com/apache/apisix/issues/3704#issuecomment-787622755


   Yes, CP should support this feature.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #3704: [DISCUSS] Use label instead of ID

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3704:
URL: https://github.com/apache/apisix/issues/3704#issuecomment-787618210


   > Of course, using label-selector to organize object relationships brings some benefits, but it also increases the complexity of the implementation.
   
   Also it is very slow at the runtime, as the label match is a slow operation and almost impossible to cache.
   
   I think we can resolve it in the CP side and just use the resolved id in the DP side.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [apisix] github-actions[bot] closed issue #3704: [DISCUSS] Use label instead of ID

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #3704:
URL: https://github.com/apache/apisix/issues/3704


   


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



[GitHub] [apisix] github-actions[bot] commented on issue #3704: [DISCUSS] Use label instead of ID

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #3704:
URL: https://github.com/apache/apisix/issues/3704#issuecomment-1038894940


   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


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