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/02/03 09:20:17 UTC

[GitHub] [apisix-ingress-controller] lianghao208 opened a new issue #234: feat: add timer to sync apisix configuration

lianghao208 opened a new issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234


   ### Issue description
   
   The controller will sync Apisix configuration only once when it starts. But it won't detect the update of apisix (manually modification). It needs a timer mechanism to sync the configuration between Apisix and Apisix-Ingress CRD.
   


----------------------------------------------------------------
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-ingress-controller] tao12345666333 commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-1076175330


   This means that inconsistencies between data in APISIX and custom resources for other reasons can be avoided


-- 
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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772473416


   What I care is whether the synchronization will block the resource pushing. Also, I think maybe an option like `--apisix-cache-sync-interval` is required to configure it?


----------------------------------------------------------------
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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-1076120683


   > Do you mean sync from APISIX to APISIX Ingress controller?
   
   It means syncing data to APISIX periodically.


-- 
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-ingress-controller] lianghao208 commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
lianghao208 commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772960244


   @tokers 
   > Also, I think maybe an option like `--apisix-cache-sync-interval` is required to configure it?
   
   I agree to make it optional.
   
   > What I care is whether the synchronization will block the resource pushing.
   
   What if we sync the resource to apisix at a specified time interval? Which means discarding the manually modifications from apisix, the configration will be consistent with CRD resources.
   


----------------------------------------------------------------
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-ingress-controller] lianghao208 commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
lianghao208 commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772373906


   @tokers  I think setting up a default time interval to invoke `syncCache()` will work. In syncCache(), it sends request to fetch the latest configuration of Apisix, then updates the cache. 


----------------------------------------------------------------
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-ingress-controller] lianghao208 edited a comment on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
lianghao208 edited a comment on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772995792


   @tokers 
   The controller pushes changes to APISIX incrementally when CRD is updated, on the other hand, it synchronizes the full cache to APISIX periodically. The whole point is that only the update of CRD can modify the cache and periodical full cache synchronization guarantees the data consistency, I don't think there will be any blocking.
   As far as I know, the redis master-replica synchronization is only incremental during the running stage.( assuming that won't be any `write` access to the replica node)


----------------------------------------------------------------
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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772366909


   Good idea! Do you have any good designs for 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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772968932


   > @tokers
   > 
   > > Also, I think maybe an option like `--apisix-cache-sync-interval` is required to configure it?
   > 
   > I agree to make it optional.
   > 
   > > What I care is whether the synchronization will block the resource pushing.
   > 
   > What if we sync the resource to apisix at a specified time interval? Which means discarding the manually modifications from apisix, the configration will be consistent with CRD resources.
   
   What I mean is when we are in progress of synchronizing from APISIX while some data need to be pushed to APISIX, these incremental pushing might loss if the synchronization doesn't block the push.
   
   It's really like the redis master-replica synchronization (we're like the master).


----------------------------------------------------------------
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-ingress-controller] lianghao208 commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
lianghao208 commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-772995792


   The controller pushes changes to APISIX incrementally when CRD is updated, on the other hand, it synchronizes the full cache to APISIX periodically. The whole point is that only the update of CRD can modify the cache and periodical full cache synchronization guarantees the data consistency, I guess there won't be any blocking.
   And I think the redis master-replica synchronization only has incrementally synchronization during the running stage.( assuming that won't be any `write` access to the replica node)


----------------------------------------------------------------
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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-1076957801


   Even Kubernetes Controller Manager has this functionality.


-- 
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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-1076120941


   > @tokers The controller pushes changes to APISIX incrementally when CRD is updated, on the other hand, it synchronizes the full cache to APISIX periodically. The whole point is that only the update of CRD can modify the cache and periodical full cache synchronization guarantees the data consistency, I don't think there will be any blocking. As far as I know, the redis master-replica synchronization is only incremental during the running stage.( assuming that won't be any `write` access to the replica node)
   
   LGTM, would you like to submit a PR?


-- 
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-ingress-controller] tao12345666333 commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-1075906491


   Do you mean sync from APISIX to APISIX Ingress controller?


-- 
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-ingress-controller] tokers commented on issue #234: feat: add timer to sync apisix configuration

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #234:
URL: https://github.com/apache/apisix-ingress-controller/issues/234#issuecomment-1076957629


   > 
   
   Yes.


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