r/webdev • • Oct 14 '26

What if you could completely destroy a cloud environment, then bring it back exactly when you need it?

I'm a developer exploring an idea and wanted to get some feedback before spending time building it.

One thing I've noticed with cloud providers like DigitalOcean is that you're still paying for servers even when they're powered off. For development and staging environments that are rarely used, that feels like a giant waste of money.

I am genuinely curious to know how other developers and infrastructure managers handle this

What if you could completely destroy an environment to stop compute charges, then recreate it on demand with the same configuration, application, and data? Essentially, a hibernate/wake system for cloud environments.

Would you use something like this? Or is this solving a problem that has been solved before.

Interested in hearing the technical objections too.

0 Upvotes

24 comments sorted by

3

u/ShinobiX_Samurai Oct 14 '26

Can't you use serverless architectecture that way you only charges for the requests

-3

u/codeb1ack Oct 14 '26

I prefer a "fixed" cost, plus server-less doesn't provide you the entire stack its only 1 part of it. The UI/Front-end can be components of this dev/staging environment.

3

u/mihirmusprime Oct 14 '26

Wouldn't fixed cost defeat the purpose of why you wanted this in the first place? Your post says you wanted to save money when it's not in use. Fixed cost would not help with that.

2

u/codeb1ack Oct 14 '26

Fixed implying that there is a set amount per hour I get billed for whenever it is “on” not that I intend to pay the fixed cost per month (only pay for what I use).

9

u/pod_of_dolphins Oct 14 '26

Or is this solving a problem that has been solved before.

Yes, anyone who sees this as a real problem can describe their infrastructure as code (i.e. Terraform) and create/destroy environments on demand.

9

u/shiny0metal0ass full-stack idiot Oct 14 '26

Lol buddy... Where have you been for the last ten years?

8

u/ian4tge Oct 14 '26

This is infrastructure as code. Lookup AWS CloudFormation templates. You can’t always take everything down (like storage or ALBs in the case of some work I did today) but you can turn off the heavy compute services

5

u/bunoso Oct 14 '26

yes this is the bread and butter of a DevOps engineer. terraform, cdk, cloudformation, etc

4

u/fiskfisk Oct 14 '26

You're describing Infrastructure as Code (IaC), like Terraform / opentofu, Polumi, etc.

It's a well-known concept where your definitions is the wanted state and the tools bring your platform in sync with that state.

1

u/Not_a_Cake_ Oct 14 '26

Doesn't sound too difficult to achieve, just take a snapshot of the volumes or configurations, delete them and recreate it when needed using IaC

1

u/Warm_Lobster_7900 Oct 14 '26

What's the actual number though? Every staging setup I've seen is one small droplet, so we're talking tens of dollars a month, and Terraform already tears the whole thing down and brings it back. The data is the part that's genuinely hard and the part nobody's solved with a sleep button.

1

u/zomerbk Oct 15 '26

The tricky part is what lives outside the server. If a recreated environment gets a new IP, allowlists and third-party integrations may break even when the app and data restore correctly. I’d consider it useful if waking also checked those connections and gave a predictable time until the environment was ready.

1

u/Practical_Band_4880 Oct 15 '26

honestly the bigger cost for us was forgotten load balancers and volumes, not the droplets. Would you handle those too or just compute?

1

u/[deleted] Oct 14 '26

[removed] — view removed comment

1

u/webdev-ModTeam Oct 14 '26

We do not allow any commercial promotion or solicitation. This can lead to a permanent ban from the subreddit.

-3

u/[deleted] Oct 14 '26

[removed] — view removed comment

1

u/SawToothKernel Oct 14 '26

Have you looked at Cloudflare Workers?

1

u/webdev-ModTeam Oct 14 '26

Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.

-1

u/codeb1ack Oct 14 '26

Agreed, haha got a good laugh, thanks for the feedback! A lot of people are recommending things like TerraForm and IaC, but I kinda feel like those as tools more likely being used by enterprises not the average dev using DigitalOcean or AWS EC2 - would you agree?

3

u/czshill Oct 14 '26

yeah but if they're a 15 year old vibe coding an app - their not smart enough to know they might need something like this. your system doesn't exist yet so claude doesn't know it exists to suggest it. if their a skilled developer, terraform, snapshots, or even docker solves this. so where are you positioning yourself? because an enterprise app isn't going to rely on a no name solution, and the script kiddies don't know they should do something like this.

the 2nd problem to this is - every cloud provider is different - unless you can score a job at AWS, GCP, Azure, etc and convince them your way is the better way - reselling AWS resources would price you out of the market.

1

u/codeb1ack Oct 14 '26

I wish I could comprehend what you're saying but I can't seem to. The enterprise not relying on a no name solution makes sense for now. The part about getting a job at different cloud providers and convincing them my way is better - goes over my head. How is that relevant? Genuine question. I am not saying anyone needs to convince anyone of anything, all I am saying is that in order to save costs, there could be a better way.

2

u/czshill Oct 14 '26

how is it not relevant ? terraform, docker, kubernetes - these are all well established infrastructure as code systems all the major hosting providers implement or develop in house. so if your way is better, your either re-selling someone else's server space to implement your idea for your customers or need to work for them and convince them your way is better than what their using now.

1

u/codeb1ack Oct 15 '26

No dude, I’m not trying to sell hosting/infrastructure. The idea is you take your existing environment > hibernate it (save money) then restore the entire environment when you need it again. Hopefully resulting in lower billed usage at the end of the month