Storage costs - how to manage users' data?

Hi all

I was wondering how you would approach this problem.

I am writing an app. I will have various “users” upload data data: photos, videos etc. If I put all users’ objects in one bucket, then user1 might have 100TB in there, while user2 might only have 5mb.

User1 is incurring all the expenses, whereas user2 incurs very little.

is there a way of apportioning costs to each specific user?

Have you folks faced this problem?

Would be interested to hear you thoughts on this one: any ideas etc. welcome.

I’m happy to update the documentation with a PR for any ideas etc. that may come out of this.

Thank you!

rgds
Ben

Hi, I would create paid plans in my app that have limit on the number of resources (e.g. galleries) that can have uploaded files attached. The pricing could also be metered, i.e. first 10 galleries are included, each new gallery is extra $5 per month. I would also of course limit the maximum filesize of attachments.

So, the pricing would be completely agnostic to the uploads themselves, therefore not specific to Shrine.

This is something I have wondered about in the past (even before Shrine was a thing). All of the upload toolkits that interface with S3, including Shrine, seem to pre-bind the S3 credentials very early in the application lifecycle. If I’m building a kind of multi-tenant application, how could I let each user store a key/secret pair for their OWN S3 account in my application, and apply it when accessing THEIR resources? That way they could go nuts – it’s their Amazon bill, after all.

Walter

@janko @walterdavis thank you for your reply and your ideas. they are all very good and valid.

Yes, this is indeed a problem not specifically related to shrine.

What about this solution: (i) each user has a separate bucket - that way their data is separated into different buckets and you will know the fees associated? Could use the multiple storage and default storage plugins?

other ideas - but not well researched

  • I was also investigating an option that allows people to tag an object, and perhaps there is a way of tracing costs associated with that tagging.

  • requester pays - there is a feature on google and amazon where the person who downloads pays.