sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.14k stars 207 forks source link

Make spend limits "budget suggestions" rather than hard limits #7506

Open novoselt opened 2 months ago

novoselt commented 2 months ago

The goal of these limits is to prevent users from spending more than intended accidentally, because that is bad and unpleasant. But it is also unpleasant to accidentally shut down or delete something, while there are money on the account. In fact, it is way worse to loose a disk with data I was creating for several weeks or computations that were supposed to get done over the weekend to be ready for Monday presentation.

There is a hard limit - the amount of money put into CoCalc. Other spending limits should be a suggestion, at least by default. Admins may want hard limits imposed on particular projects/compute servers, which is a separate issue to deal with.

When a spend limit is hit:

williamstein commented 2 months ago

What are your thoughts about one single global limit, versus a dozen limits for different things?

novoselt commented 2 months ago

I am very much against configuring a separate limit for every single bloody model! Having separate limits for LLMs/network/compute servers in theory makes sense, but I think won't really matter all that much. If somebody does spend $100 on network (which is very unlikely) they will learn their lesson quickly, I suspect. So a single limit should be fine.

What is much harder for me to decide, is the length of the period which is limited. I think there are arguments both for daily and for monthly limits. So perhaps we should support both or at least let the user choose. But I think two limits are easier to understand and use than a single one with the length selector.

williamstein commented 2 months ago

What is much harder for me to decide, is the length of the period which is limited. I think there are arguments both for daily and for monthly limits. So perhaps we should support both or at least let the user choose. But I think two limits are easier to understand and use than a single one with the length selector.

For what it is worth, on Google cloud (and cocalc right now) there is only a monthly limit. This aligns with the fact that billing is done monthly.

novoselt commented 2 months ago

Then let's have a single monthly limit and revisit it if there is any demand from actual users!

haraldschilly commented 2 months ago

My "perfect world" wishlist:

williamstein commented 2 months ago

To get your 'perfect world', we should have a checkbox about whether or not it is a soft or hard limit. soft = just notifications; hard = could stop/delete stuff.

williamstein commented 2 months ago

https://cloud.google.com/billing/docs/how-to/budget-api-overview

novoselt commented 2 months ago

So maybe there can be single easy to understand and configure budget limit for mere mortals and a powerful flexible API for those who really need it? CoCalc and Google users are very different groups.