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/03/28 15:56:01 UTC

[GitHub] [apisix-dashboard] nic-chen opened a new issue #2396: Proposal: reduce the number of connections between Manager API and etcd

nic-chen opened a new issue #2396:
URL: https://github.com/apache/apisix-dashboard/issues/2396


   # Background
   At present, the connection between the Manager API and etcd still follows the habit of the etcd v2 version, creating a watch connection for each resource, which will generate a large number of connections.
   
   # Purpose
   Reduce the number of connections between Manager API and etcd, to reduce the load on etcd services.
   
   # Proposal
   In the `Generic Store`, each resource still manages its own cache separately, but no longer connects directly to etcd. Added a unified method of fully reading data and watching changes, and the obtained data is uniformly distributed to the Store instances of each resource.
   After optimization, the workflow of `Generic Store` initialization is as follows:
   1. Create a resource prefix mapping table
   2. Initialize each resource Store object and register itself in the resource prefix mapping table
   3. Read the full amount of data, find the corresponding resource according to the key prefix, and distribute the data to the Store object of each resource
   4. Watch the etcd prefix configured in `conf.yaml`, when obtaining the changed data, find the corresponding resource according to the key prefix, and distribute the data to the Store object of the resource.
   
   The current connections between Manager API and etcd:
   
   ![image](https://user-images.githubusercontent.com/33000667/160437970-1398e1d7-596e-4f65-b50b-eda47fb3dac0.png)
   
   After optimization, the connections between Manager API and etcd:
   
   ![image](https://user-images.githubusercontent.com/33000667/160436000-6f54b646-838e-4d41-b249-2b4221fd874a.png)
   
   


-- 
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-dashboard] Baoyuantop commented on issue #2396: Proposal: reduce connections between Manager API and etcd

Posted by GitBox <gi...@apache.org>.
Baoyuantop commented on issue #2396:
URL: https://github.com/apache/apisix-dashboard/issues/2396#issuecomment-1081303503


   LGTM


-- 
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-dashboard] xuminwlt commented on issue #2396: Proposal: reduce connections between Manager API and etcd

Posted by GitBox <gi...@apache.org>.
xuminwlt commented on issue #2396:
URL: https://github.com/apache/apisix-dashboard/issues/2396#issuecomment-1086561807


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



[GitHub] [apisix-dashboard] jwrookie commented on issue #2396: Proposal: reduce connections between Manager API and etcd

Posted by GitBox <gi...@apache.org>.
jwrookie commented on issue #2396:
URL: https://github.com/apache/apisix-dashboard/issues/2396#issuecomment-1081431131


   LGTM. But I think there is only one TCP connection, it just creates multiple `watch` thus creating multiple `server stream`


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