Keep up to date with the latest news

Tech’s High-Stakes Arms Race: Costly Data Centers Inc. upped the ante this week, announcing plans to plunk down a massive collection of data centers in Stockholm. It is the latest move in a high-stakes race to own the biggest piece of a market that is expected to reach into the hundreds of billions of dollars.

Amazon and its chief rivals— Microsoft Corp. and Alphabet Inc. are aggressive players in so-called hyperscale computing, which provides digital horsepower that scales quickly when needed in real time, like when NFL fans crush a fantasy-sports site before kickoff.

Combined, Amazon, Microsoft and Alphabet doled out $31.54 billion in 2016 in capital expenditures and capital leases, according to company filings. That is up 22% from 2015.

Not every dollar of that is spent on data centers that deliver infrastructure as a service, but each company describes the cloud as a major investment area. Amazon, the leader in providing such web-based, on-demand resources, didn’t disclose the cost of the new cluster of data centers in Stockholm, known in industry-speak as a “region.” Analysts peg the price tag of a region at several hundred million dollars.

Investors are willing to tolerate the hefty tab, as they often do for energy exploration, or by telecommunications companies unfolding vast networks of fiber. That’s because the potential payoff is big: a piece of the roughly $500 billion businesses spent last year on computing, storage, networking, database technology and more, according to research firm Gartner Inc.

That spending is shifting from customers’ own servers to the cloud, and “being concentrated in the hands of a few companies,” said Gartner analyst Ed Anderson.

The massive investment is creating a barrier for would-be rivals that would need to spend tens of billions of dollars to match the computing capacity Amazon, Microsoft and Google already have, Deutsche Bank Securities Inc. analyst Karl Keirstead said.

“They’ve created a powerful moat,” he said.

One rival that isn’t shying away: Oracle Corp. Last summer, the business-software maker unveiled cloud-infrastructure services it brashly said would challenge Amazon’s dominance. But Oracle’s spending on cloud infrastructure pales in comparison with that of Amazon, Microsoft and Google. In the four quarters through February, Oracle’s capital spending, which includes data-center development, was $1.7 billion.

Oracle’s senior vice president of product marketing, Steve Daheb, said capital expenditures don’t paint a complete picture. He believes Oracle’s infrastructure services outperform the industry giants, allowing the company to compete without spending as much on data centers.

“Dollars of capex in isolation are interesting but hardly conclusive,” Mr. Daheb said in an email, adding that Oracle’s spending is “exactly where we want it to be.” Oracle has plenty of catching up to do. In the most recent quarter, its infrastructure-as-a-service revenue grew 17% to $178 million. Net sales at Amazon Web Services, comprised largely of Amazon’s infrastructure-as-a-service business, grew 47% to $3.54 billion in its most recent quarter.

Deutsche Bank ’s Mr. Keirstead believes the “game is over” for any company to crack the market of providing “general purpose” cloud-infrastructure services Amazon, Microsoft and Google now lead.

Oracle might have a better chance providing infrastructure services to customers moving their databases running on Oracle software from their own servers to the cloud, Mr. Keirstead said. “It’s not too late if Oracle has narrower ambitions,” he added.

Oracle’s expertise in both legacy and cloud computing should help it appeal to a wide swatch of customers, Mr. Daheb wrote.

Some early entrants to the market have shifted strategies. In 2015, Hewlett-Packard Co. closed its Helion Public Cloud, which struggled to generate revenue. International Business Machines Corp. bought SoftLayer Technologies Inc. in 2013, in part, to better compete with AWS. These days, IBM, which spent $3.73 billion in capital expenditures in 2016, sells infrastructure services but places more emphasis on higher-margin offerings such as data analytics.

The pace at which the big cloud-infrastructure providers are opening regions isn’t likely to slow. In addition to Stockholm, which is expected to open next year, Amazon has announced plans to open regions in the coming months in Paris and Ningxia, China. Microsoft is set to soon add locations in France, Texas and Arizona. And Google announced plans last month to open regions in California, Canada and the Netherlands.

The amount of money required to build a global data-center footprint is enormous, though companies rarely detail the expense. In a speech at an Amazon conference in Las Vegas in November, James Hamilton, an AWS vice president, gave some indication. AWS regions comprise two to five “availability zones,” and several include 300,000 custom-designed servers.

Regions at Google have cost $300 million to $600 million, said Urs Hölzle, senior vice president for technical infrastructure. That doesn’t include maintenance costs, power-consumption fees, hardware upgrades and more that make running the data centers costly as well.