When using aliases for zero downtime deployments, ...
# community-help
s
When using aliases for zero downtime deployments, is there a way to know through the api when the indexing of the new collection/s is complete so that the alias can be updated to point to the new collection and the old one can be deleted?
k
How are you populating the new collection? Via import api?
s
Yes, a script that GitHub actions runs if there are changes to the migrations folder for the sql database
k
You can check the document count on the collection you just imported and if the count looks good, you can switch.
s
So basically snapshot each collection that has changed, snapshot doc count and then periodically check when the new collections have reached the snapshotted count to swap to them?
k
Actually, if your imports finish and you are able to hit the
/health
API successfully that should be enough to do a swap for small to medium sized collections.