简体   繁体   中英

Best practice for bucket in MinIO

I'm designing my service and I wonder in what circumstances is a new bucket needed, using MinIO or any S3-compatible service?

To my impression, buckets are like folders so you can literally align them with any entity in the structure.

For example, if I'm building a service where users can upload and manage files in projects, is it better to put them all in one bucket and manage the file access with database records? Or it is better that every user has their own bucket and new buckets are created when new users join. Or maybe when a user create a new project, generate a new bucket for it?

These can all be done with proper MinIO SDK, so I'm wondering if there's a best practice to do this.

Buckets are a high level structure. Even though MinIO allow for many more buckets than AWS S3 they should be considered carefully from a management perspective.

A lot of things are configured per bucket, like ILM (lifecycle), replication, permissions, encryption, etc.

So if you are creating a lot of buckets you are also creating more things to maintain. Typically separating buckets per application is a good strategy, with additional buckets for testing, etc.

Almost all properties can be configured for prefixes inside a bucket, so the benefit from having a lot of buckets can be pretty small compared to using prefixes inside buckets for each.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM