Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Idea: Add an option to send purges in batches. #33

Open
harlow opened this issue Dec 21, 2014 · 5 comments
Open

Idea: Add an option to send purges in batches. #33

harlow opened this issue Dec 21, 2014 · 5 comments

Comments

@harlow
Copy link

harlow commented Dec 21, 2014

Does Fastly support a batch purge? We've been putting purge requests into the background and leveraging sidekiq unique jobs to try to reduce outgoing HTTP traffic.

@ezkl
Copy link
Contributor

ezkl commented Dec 22, 2014

We don't really have anything like a batch purge aside from surrogate key purge and purge_all. The unique job queue is definitely a cool idea. Depending on frequency of purge, I wonder if leveraging persistent HTTP connections would help as well?

@set5think
Copy link
Contributor

We could queue up surrogate keys to be purged in a defined time interval, or up to a certain number of keys, and send one request out. We could additionally squash them to be unique, in case the same key shows up multiple times.

Although we do allow n surrogate keys to be passed in with any given surrogate key purge request, the nature of apps will probably only purge one or two at a time.

Thoughts?

@set5think
Copy link
Contributor

We discussed some more internally - it seems the consensus is that this idea would be better served as an extension to fastly-rails. I guess the next prerequisite step to that, though, is to make fastly-rails extendable.

@harlow
Copy link
Author

harlow commented Dec 22, 2014

Yeah seems like a place fastly-rails could be great. Maybe we could pass the queue strategy into the initializer (Sidekiq, Resque, other)?

@ezkl
Copy link
Contributor

ezkl commented Dec 22, 2014

Maybe we could pass the queue strategy into the initializer (Sidekiq, Resque, other)?

👍

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

No branches or pull requests

3 participants