Is it better to take gains by selling growth stocks that deliver big returns, or should you keep riding your stallions higher? There's definitely wisdom to sticking to your guns, and you wouldn't want to miss out on more gains in the future.

Your best performers are probably flying high for a good reason, and you can't be scared to stick with them. Still, there are some instances when the job's already been done. Make sure that you're balancing risk with reward, especially when a stock's valuation outpaces its fundamentals by too much.

1. MongoDB

MongoDB (MDB 4.88%) offers products and services that allow other businesses to store, manage, access, and analyze data, which is a necessary function in software development and operation. The company has nearly 30,000 customers around the world, making it an important contributor to the operations of numerous enterprises.

MongoDB is an accomplished player in a high-growth industry. It has exciting growth prospects, so it's certainly earned the optimism surrounding it. It reported 44% sales growth in its most recent quarterly earnings release. Sales from its cloud database platform nearly doubled over the prior year, as it grew to contribute more than 50% of total company revenue.

That all sounds good, but MongoDB is expensive after rising 600% over the past three years.

MDB Total Return Level Chart

MDB Total Return Level data by YCharts

Those excellent returns have driven its price-to-sales ratio to 50. To put that number in perspective -- assume that the company maintains the 35% sales growth rate that's forecast for next year and achieves a 30% profit margin, which is about average for tech giants. Even if MongoDB met those optimistic forecasts, it would still take five full years with zero shareholder returns to have the same valuation ratios common in FAANG stocks.

Person on a scale balancing risk and reward.

Image source: Getty Images

Success is already assumed in the stock's price, which creates imbalance between risk and reward, especially with MongoDB's competitive position. It has a respectable 5% market share, but its direct competitors are heavy hitters with deep pockets. The outstanding results already baked into the price aren't going to come easy.

MongoDB is fine if you're in for the extreme long haul. There's every reason to think that this sort of company could be worth more than $36 billion a decade from now. However, it might be time to take some gains and move capital to another promising growth stock with a cheaper valuation. There's a good chance MongoDB is available for this price or cheaper in the next few years.

2. Cloudflare

Cybersecurity stock Cloudflare (NET 5.04%) is similar. It has excellent results in a high-growth industry, but the valuation might have gotten a bit ahead of itself.

Cloudflare is a rockstar tech stock that's expanded into a few different fields. It launched a platform to optimize website performance and has since expanded into cybersecurity. It has great traction among enterprise customers, and its net revenue retention rate is close to 125%. Cloudflare boasts a 50% annual sales CAGR over the past three years, which it maintained in its most recent quarter. These are all indications that this trend is likely to continue.

That's catalyzed nearly 1,000% shareholder returns over the past three years, and 200% over the past 12 months alone. Perhaps there was unrealized value in the stock prior to recent periods, but it's going to be almost impossible for fundamentals to keep up with that rate of return.

With a price-to-sales ratio that's extremely high at 103, it's unlikely that valuation inflation can also push the stock price higher. As is the case with MongoDB, it will take years of sustained growth for its current price to match FAANG valuations. Cloudflare is still cash-flow negative as it invests in growth, and it counts Amazon among its competitors. There's plenty of execution risk here.

Cloudflare's returns have already validated investors, delivering results years ahead of schedule. If you bought this stock more than a year ago, it's probably a much larger proportion of your total portfolio. Only now, it's got more risk to fall and less room to appreciate. You don't want to give back a bunch of those gains if the market corrects over the next year. Consider moving some capital to stocks that could be the next Cloudflare.

3. Confluent

Confluent (CFLT 8.61%) is a data analytics stock that burst onto the investing scene with its IPO in June. The company offers a popular cloud-based data infrastructure platform. That's a lot of technology jargon, but it means that Confluent helps businesses to access and analyze data quickly and efficiently. That leads to better customer experiences and superior operations, so Confluent's value to its own customers is pretty obvious.

Confluent has nearly doubled in price in less than half a year, fueled by excellent earnings reports. Two quarters in a row, it smashed Wall Street estimates while sales grew nearly 70%. The company's full-year forecast suggests that the top-line expansion should slow, though recent quarters indicate that Confluent's management likes to promise low and deliver high.

Better-than-expected results are usually good for stock prices, but it can't just charge upward infinitely. At some point, share prices fully reflect all of the stock's fundamental opportunity. Confluent's price-to-sales ratio is above 70. It's burning more than $20 million each quarter to achieve its growth rate. Even the revenue growth forecast by management isn't enough to sustain that valuation. Confluent will drop a lot more than the market if there's a correction, and there are plenty of opportunities with just as much long-term return potential.

All three of these stocks are on my watch list, but I'm waiting for prices to be more rational.