Emptying buckets just got a whole lot easier

Emptying buckets just got a whole lot easier

Today we are announcing support for a new highly requested feature: Emptying a bucket. Have you ever wanted to quickly empty a bucket and remove all of objects inside of it? How long of a process is that?

For users with smaller datasets, this may not be a common occurrence. However when you have a bucket with tens of millions of objects inside of it, it's a vastly different story. Prior to today, users were required to delete objects manually from the dashboard, or they had to use one of the many existing S3 compatible tools with our API, such as the AWS CLI. The AWS CLI is actually very helpful, and features a very simple aws s3 rm --recursive command that can be used to recursively traverse and delete objects. The problem is, it still makes a single request for each object. If you have 10 million objects, that's 10 million HTTP delete requests. The Filebase platform regularly processes request volumes well in excess of these numbers. However, you as the client must pay by sitting there, burning your most valuable asset: time. It can take a while to iterate over 10M requests.

The scenario described above is very common and applies to nearly every S3 compatible object storage platform out there today, including AWS itself. Most of these platforms feature fancy client-side dashboards with an "Empty bucket" button. The problem here is that often times, clicking this button simply triggers 10M client-side Javascript requests from your browser. The desired state of an empty bucket is still achieved, but it still takes a very long time to get there.

Filebase set out to solve this problem. Just like we simplified bucket and object ACLs, we decided there must be a better way to quickly empty a bucket, without taking up a users time. Our solution is simple: When you click the Empty Bucket button on Filebase, we queue up a background job that is run on the server-side, and that job takes care of emptying the bucket contents for you. This allows you, the end user, to move on to your next task, or to leave the browser entirely. Of course larger buckets will take longer to empty, but the process is significantly accelerated by using parallel threads and running on the server-side.

Why is all of this relevant? It's simple: A bucket must be empty before you can delete it.

Let's walk through what this new process looks like

The first thing we need to do is identify which bucket we'd like to delete. To the far right of the bucket name, select the Options menu (represented by a dotted icon) and then select Empty Bucket.

After selecting the option, a new modal dialog appears. This is a confirmation dialog, which asks you to confirm your action. To complete this step, you must type in the words permanently delete, and then select the Empty Bucket button. If you notice, this button won't become active until the desired text is inputted.

Once the desired text is typed in, the button becomes active. Before clicking, ensure you want to fully delete the data in question, as this action is not reversible.

Click Empty Bucket, and the deletion job is now queued. Once the dialog goes away, the page will refresh and you will see a success message. The empty bucket background job is now running on the Filebase platform. Job duration is dependent on the number of objects that were stored in the bucket. A job deleting 1M objects typically only takes a couple of minutes. Most importantly - this action is not blocking, as it is a server-side operation.

Thats it! As you can see, this is a very simple feature to use, and it has already helped out several large customers when working with millions of objects. We hope this might help you one day too.

Is there something else you'd like to see on the Filebase platform? Please feel free to reach out with feedback and suggestions. We're always happy to take any feedback you might have!