If you're looking for an investment that provides exposure to the growth of cloud computing, Microsoft (MSFT -3.99%) stock seems a logical choice. The company's cloud businesses have become an important part of the tech giant's activities. And its cloud platform, Azure, has become a stronger challenger to the public cloud leader Amazon Web Services (AWS) as it has been gaining market share over the last several quarters. However, Microsoft's rich valuation limits investors' upside potential.

Instead, you could consider Arista Networks (ANET 2.87%). The cloud specialist should profit from Azure's growth, and its stock remains more affordable than Microsoft's.

Microsoft and the cloud

No matter how the coronavirus pandemic pans out, cloud computing is poised to grow over the long term thanks to the flexibility this technology offers compared to the legacy on-premises computing infrastructures. Enterprises have been moving some of their infrastructure and applications to the cloud to access them from anywhere and scale them on demand.

Market research specialist Kenneth Research forecasts the global cloud computing industry will grow at a strong double-digit annual compound rate (CAGR) of 17.9% through 2025.

And Canalys estimates Azure's market share in the global cloud infrastructure market increased to 17.6% during the fourth quarter of 2019, up from 14.5% the year before. Microsoft doesn't disclose the revenue Azure generates, but it indicated the cloud platform grew by 62% year over year during the last quarter. 

Microsoft doesn't communicate the total contribution of its cloud businesses either, but cloud is becoming an increasingly important part of its revenue. Its intelligent cloud segment, which includes Azure, represented 32.2% of last quarter's revenue, up from 28.9% one year ago. And Microsoft's other cloud-based high-growth solutions such as the productivity tool Office 365 and the communications platform Microsoft Teams are accounted for in other segments.

But with the recent stock market rally, the company's stock price is getting closer to its historical highs. The market now values the company at a rich trailing-12-months (TTM) price-to-earnings (P/E) ratio of 28.8, which reduces the stock price upside potential, even if the tech giant keeps on delivering strong results over the next several years.

A cut-out of a cloud in front of a row of a data center.

Image source: Getty Images.

Arista Networks as a cheaper cloud stock

In contrast with Microsoft, Arista Networks doesn't offer any software-as-service (SaaS) solution or cloud-based infrastructure platform. However, it remains exposed to the cloud industry by selling the networking equipment -- routers and switches -- and software that connect the servers and other computing devices hosted in cloud data centers. 

Over the last several years, Arista Networks has been growing its revenue and operating income thanks to its networking solutions that deliver the performance, flexibility, and scalability cloud giants demand. As a result, its market share in the high-speed data center switching market increased to 18% last year, up from 10% in 2015. 

ANET Revenue (TTM) Chart

ANET Revenue (TTM) data by YCharts

The company has recently diversified its activities into networking areas such as Wi-Fi and campus networking (on-premises data centers), but CEO Jayshree V. Ullal said during the last earnings call cloud was the company's largest vertical last year. In fact, Microsoft remained Arista Networks' largest customer in 2019, accounting for 23% of its revenue.

With its exposure to the cloud computing market and with Microsoft as one of its largest customers, Arista Networks partly depends on the success of Azure. 

That's a risk for Arista Networks as its revenue depends on a few huge customers, but it allowed the company to limit its sales and marketing expenses to only 8.9% of revenue in 2019. As a result, with scale, Arista Networks now generates operating margins above 30%, which come close to Microsoft's impressive profitability.

ANET Operating Margin (Quarterly) Chart

ANET Operating Margin (Quarterly) data by YCharts

But in contrast with Microsoft's elevated valuation, Arista Networks' lower TTM P/E ratio of 19 remains reasonable.

In addition, like Microsoft with its $64.6 billion of cash and equivalents in excess of debt, Arista Networks has accumulated a large cash position -- relative to its scale -- of $2.7 billion with no debt, which should prevent financial difficulties if a prolonged recession materializes. 

Thus, investors looking to invest in Microsoft to get exposure to cloud computing should consider Arista Networks as a cheaper alternative. And given the concentration of Arista Networks' customers, the company's quarterly results should remain volatile,  which could provide patient investors with opportunities to buy shares on the dip.