presslabs / zinc

Route 53 zone manager.
https://www.presslabs.com/code/zinc/
Other
42 stars 2 forks source link

Deal with large number of policy records #208

Closed calind closed 7 years ago

calind commented 7 years ago

We have this use case where there are about 500 policy records in a single zone. When we update a policy, the Zone.build_tree does the following:

  1. adds a change batch for updating the tree
  2. adds 500 updates to the batch, for each policy record, for making an alias between record and tree

We should improve the process so that it deals with this case.

  1. create a batch which updates the tree, deletes the orphaned records and commit it
  2. split the batch for making the alias to the policy record into multiple batches with 100 items. Also we should consider for updating only records which don't have the correct alias.