No business is fully immune to a recession as caution and spending cuts ripple through the economy. As economic confidence wanes, even the strongest companies can get hit by weak demand.

Some companies will do better than others. Any company that can save its customers money, whether those customers are consumers, small businesses, or large enterprises, has the potential to grow stronger throughout a recession. There are no guarantees, but Cloudflare (NET 3.77%) looks like a good cloud stock to bet on as economic uncertainty grows.

Cloud bills matter again

Running your infrastructure on a cloud computing platform like Amazon Web Services is not cheap. If you're a start-up with access to easy funding and focused solely on growing as fast as you can, an exploding cloud bill isn't a problem. Dedicating resources to keeping cloud costs in check means diverting resources away from growth.

When funding gets harder to come by, and when profitability starts mattering again, cloud computing bills become easy targets. Spending on AWS can quickly get out of hand if you don't care about optimization, and bandwidth can become particularly problematic. If you're transferring data that doesn't really need to be transferred because it was easier than spending time on optimization, your bill will reflect taking that shortcut.

The easy way out of this situation is to stick Cloudflare's platform in front of resources running on AWS. On top of likely speeding up access to those resources and adding a layer of protection against attacks, Cloudflare can dramatically reduce cloud computing bills. Every piece of data that's cached on Cloudflare and delivered from its global network is a piece of data that won't rack up bandwidth charges on AWS .

Putting Cloudflare in front of the major cloud platforms takes just a few minutes. Once a company does that, even if they start out using Cloudflare's free service, it opens the door for that company to make use of the rest of Cloudflare's platform. Cloudflare offers advanced security features, image optimization, and a slew of other products that can easily be tacked on.

Cloudflare Workers is another potential money saver . Workers allows customers to run chunks of code directly on Cloudflare's edge network. Depending on the use case, Workers can be a lot less expensive that running virtual servers or serverless functions on the major cloud platforms. Workers is capable of hosting entire applications, or it can be used in a more piecemeal fashion.

Winning in the enterprise

Cloudflare offers free services to anyone, but it makes around 60% of its revenue from large customers spending at least $100,000 annually. That's good news, because these large customers are much less likely to go through the pains of switching providers. Cloudflare is seeing elevated churn among its pay-as-you-go customers, and that will likely continue as long as economic uncertainty remains. But it hasn't been a big enough problem to really hurt Cloudflare's growth rate.

Startups will be more concerned about spending in a tough economy, but so will large enterprises. Again, the cloud isn't cheap. Enterprises that have let their cloud spending get out of control as they've executed their "digital transformation" strategies over the past few years will find that Cloudflare is an easy way to bring those costs down. Cloudflare gained a record 212 new large customers in the second quarter, and the company's strong value proposition should lead to many more wins over time.

Cloudflare's growth rate will almost certainly slow at least somewhat, but a recession will be an opportunity for the company to win customers who may have not considered it in the past when cost cutting wasn't a priority. Of any cloud computing company, Cloudflare looks likely to come out the other side of a recession stronger than ever.