Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wait for storage zone replication #47

Open
dmitriyshashkin opened this issue Oct 16, 2023 · 4 comments
Open

Add wait for storage zone replication #47

dmitriyshashkin opened this issue Oct 16, 2023 · 4 comments

Comments

@dmitriyshashkin
Copy link

dmitriyshashkin commented Oct 16, 2023

Barev dzez!

BunnyCDN allows storage replication. It may take some time for all the replicas to sync. Storage API responds before the replicas are synchronized. Which means that if we update a file and immediately after that we clear the cache, the edge servers that are connected to replica can re-cache the old version of the file. I'm referring to the following events sequence:

  1. We update the file
  2. We clear the cache
  3. The edge server gets a request
  4. Edge server gets old version of the file from the storage replica and caches it again
  5. Storage replica finally receives updates from the main storage

In the end the edge server keeps responding with the outdated file, despite the cache was purged.

Bunny support has previously confirmed the existence of such behavior, their suggestion was to add 5 seconds wait between the update of the file and the purging of the cache.

@ayeressian
Copy link
Owner

Hi @dmitriyshashkin sorry for the late response. I was busy with personal matters. Does BunnyCDN have this behavior documented?

@dmitriyshashkin
Copy link
Author

I don't think so. But the opposite behaviour is not documented as well. There is simply no mention of the storage zone replication in the docs: https://docs.bunny.net/reference/put_-storagezonename-path-filename

@ayeressian
Copy link
Owner

By "clear the cache" do you mean purging the pull zone doc?

@dmitriyshashkin
Copy link
Author

Correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants