So far, 2022 is a forgettable year for the stock market. Rising interest rates have knocked the wind out of equities, with investors fearing that a high interest rate environment meant to control surging inflation will increase borrowing costs and negatively impact earnings.

The Federal Reserve's hawkish stance, as well as concerns regarding a looming recession, explain why the S&P 500 has shed nearly 18.2% of its value in 2022. However, the stock market decline means that investors can buy some solid growth stocks on the cheap right now. Twilio (TWLO 1.84%) and Nutanix (NTNX 1.89%) are two such names that long-term investors may want to buy given their terrific prospects, rapid growth, and cheap valuations.

Let's see why these fast-growing cloud stocks could set investors' portfolios up for success over the next decade.

1. Twilio

Twilio is in turnaround mode following a terrible August. Share prices of the cloud communications specialist are up 9% this month. But it is worth noting that the stock has been beaten down badly this year: Twilio is down over 71% in 2022. This presents a terrific opportunity for investors looking to buy a high-growth company on the cheap.

Twilio's crash brought the stock's price-to-sales ratio down to four right now. For comparison, the stock traded at over 17 times sales last year. Buying Twilio at this sales multiple looks like a no-brainer, as it is a key player in a fast-growing industry.

The global cloud-based contact center market was worth $14.5 billion in 2021 and is expected to hit $82 billion by 2030. Twilio generated $2.84 billion in revenue last year, indicating that it controlled close to 20% of this fast-growing space. The company's robust market share means that it is on track to benefit big time from this terrific opportunity, and explains why Twilio grew at an impressive pace.

Twilio's second-quarter revenue increased 41% year over year to $943 million. It forecasts 31% year-over-year revenue growth in the current quarter to $970 million at the midpoint of the guidance range, while analysts anticipate 36% top-line growth for the full year. And Twilio should sustain its revenue growth momentum over the next few years.

TWLO Revenue Estimates for Current Fiscal Year Chart

TWLO Revenue Estimates for Current Fiscal Year data by YCharts

Even better, analysts expect the top-line growth to translate into solid bottom-line gains as well, with an estimated annual growth rate of 155% for the next five years. It wouldn't be surprising to see Twilio deliver a rapid growth rate beyond that as well given the massive opportunity it is sitting on, making it a top cloud stock investors may want to buy and hold for the next decade.

2. Nutanix

Hybrid cloud specialist Nutanix is in break-out mode this month. Shares of the company have surged 33% since Aug. 31, driven by its fiscal 2022 fourth-quarter results (for the three months ending July 31) which were released that day.

Nutanix's latest stock price surge is a result of its stronger-than-expected results. The company delivered an adjusted loss of $0.17 per share last quarter on revenue of $385.5 million. Wall Street was looking for a much bigger loss of $0.38 per share on revenue of $355 million. Nutanix finished the year with $1.58 billion in revenue, an increase of 13% over the previous fiscal year.

However, its billings and annual recurring revenue (ARR) increased at a much faster pace. Nutanix finished fiscal 2022 with an ARR of $1.2 billion, a 37% jump over the prior year. The ARR refers to the sum of the annual contract value of all Nutanix's subscription contracts that are in effect at the end of a particular period. The growth in this metric suggests that more customers are signing up to use Nutanix's hybrid cloud services, and they are also spending more money on the company's offerings.

The company's customer count was up 12% year over year last quarter to 22,600. Meanwhile, the number of customers with lifetime bookings of more than $1 million increased nearly 22% year over year to 1,841. Nutanix investors can expect the company to sustain its impressive momentum in the long run. That's because the company forecasts its total addressable market will grow to $61 billion in 2025 from $39 billion in 2020. What's more, the global hybrid cloud market is expected to grow at a nice pace through the end of the decade, with one third-party estimate projecting annual growth of nearly 30% through 2030.

Nutanix is in a good position to tap into this lucrative long-term opportunity, as it controlled nearly a quarter of the hybrid cloud market at the end of 2021, according to IDC. It is also worth noting that Nutanix has increased its market share at a solid pace, as it was controlling just 11.6% of the hybrid cloud infrastructure space at the end of 2020.

The company could further increase its market share, as its growing customer base and higher customer spending indicate. As such, investors looking to buy a cloud computing stock that could take off impressively over the next decade may consider buying Nutanix right now, as it is trading at 3.3 times sales, a discount to its five-year average sales multiple of 4.85. The stock has been rallying nicely of late, and it could get more expensive following its outstanding results.