If DigitalOcean (DOCN 3.73%) were a real ocean, it would be the Arctic -- it's a small player going up against Pacific Ocean-sized competitors like Amazon Web Services (AWS) and Google Cloud. To illustrate the magnitude of the competitive disparity, DigitalOcean hopes to generate $1 billion in revenue by 2024. For comparison, AWS has more than $100 billion in remaining performance obligations (RPO) under contract right now.

However, the ocean metaphor quickly breaks down. Whereas the Arctic is cold, DigitalOcean's business is red-hot. And it may just have what it takes to carve out its own lucrative spot in a market expected to be worth more than $1 trillion by 2030.

How DigitalOcean makes money

DigitalOcean provides cloud-computing services to small and medium-sized businesses (SMBs). But you may need to tweak your thinking on SMBs. We're not necessarily talking about corner bakeries and mom-and-pop landscaping outfits. We're more talking about SMBs like PlayKids, which makes educational mobile apps, and companies like Rockerbox that use data to help other companies make marketing decisions. Both are DigitalOcean customers.

DigitalOcean already had 623,000 customers as of June. According to management, its customers choose DigitalOcean over its larger competitors, because it's easy to use and has a simple pricing strategy. The majority of customers simply pay month-to-month (not on a long-term subscription) and increase their spending with higher usage or for access to additional DigitalOcean products.

Because revenue generation is proportional to customer usage, those who use DigitalOcean's services the most account for most of the revenue. Roughly 105,000 customers spend $50 or more monthly -- less than 20% of the total customer base. But these customers accounted for 85% of the company's revenue in the second quarter of 2022.

Management estimates there are 100 million SMBs worldwide. Therefore, DigitalOcean has plenty of room to grow. And it's important to note the company already has global reach with customers in 185 countries.

Here's what's holding DigitalOcean back

DigitalOcean stock is down more than 70% from its all-time high as of this writing. That's bad, but the stock has managed to track closer to the S&P 500 over the past six months, which is better than many other tech stocks.

On one hand, the global economy is in turmoil, and the market is worried this could disproportionately affect DigitalOcean's SMB customer base. For perspective, SMBs employed about 45% of U.S. workers going into the Great Recession but accounted for 62% of lost jobs during that time, according to research from Brookings. Therefore, if the global economy gets worse from here, DigitalOcean's customers would likely use its services less and thus spend less too.

That said, its malleable pricing strategy means, in a worst-case scenario, DigitalOcean's customers will simply spend less -- they won't leave the platform altogether. And this is actually playing out in real time. The net dollar retention rate (NDR) measures existing customer spend from one year to the next, and it was "only" 112% in the second quarter. This indicates customers spent roughly 12% more this year than last year. But the rate did decline from its NDR of 117% in the first quarter and 113% in 2021.

Simply put, economic conditions aren't great for DigitalOcean's customer base, and they're not growing their spending at the same pace as a result. This partly explains why DigitalOcean stock is down. But its customers are still there and still upping their spend all the same, which is why the stock has held up better than some peers.

Is DigitalOcean stock a buy?

There are two big reasons investors should consider buying DigitalOcean stock today.

First, if spending growth slows because of economic conditions, the company can compensate for this with overall customer growth. As already mentioned, the potential market is huge and expanding. This infrastructure-as-a-service space could deliver a mind-blowing 25% compound annual growth rate (CAGR) through 2030, according to Allied Market Research, giving the company plenty of upside.

Moreover, this isn't just a top-line growth story -- DigitalOcean is rapidly scaling profits. Current CFO Bill Sorenson was hired in 2019 and tasked with fixing the company's negative cash flows. Sorenson delivered as DigitalOcean's free-cash-flow (FCF) margin in the second quarter was 7% with the goal of reaching 20% in 2024. 

If DigitalOcean hits its $1 billion revenue target that same year, it could be generating around $200 million in FCF, which would be meaningful considering its current market capitalization is just $3.5 billion. That makes it a growth stock worth considering for a diversified portfolio.