SAN BRUNO/SUNNYVALE, Calif. (Reuters) - One of Walmart Inc’s best chances at taking on Amazon.com Inc in e-commerce lies with six giant server farms, each larger than ten football fields.

These facilities, which cost Walmart millions of dollars and took nearly five years to build, are starting to pay off. The retailer’s online sales have been on a tear for the last three consecutive quarters, far outpacing wider industry growth levels.

Powering that rise are thousands of proprietary servers that enable the company to crunch almost limitless swathes of customer data in-house.

Most retailers rent the computing capacity they need to store and manage such information. But Walmart’s decision to build its own internal cloud network shows its determination to grab a bigger slice of online shopping, in part by imitating Amazon’s use of cloud-powered big data to drive digital sales.

The effort is helping Walmart to stay competitive with Amazon on pricing and to tightly control key functions such as inventory. And it is allowing the company to target shoppers with more customized offers and improved services, two top executives told Reuters in interviews at Walmart’s San Bruno and Sunnyvale campuses in California.

“It has made a big difference to how fast we can grow our e-commerce business,” said Tim Kimmet, head of cloud operations for Walmart.

He said Walmart, for example, is using cloud data to stock items frequently ordered by customers via voice shopping devices such as Google Home.

The network is helping the retailer improve its in-store operations as well. Using data gleaned from millions of transactions, the company sped up the process by which customers can return online purchases to their local stores by 60 percent. And Walmart can adjust prices at its physical locations almost instantly across entire regions.

“We are now able to execute change faster,” Jeremy King, Walmart’s chief technology officer, told Reuters. He added that Walmart can now make over 170,000 monthly changes to software that supports its website, compared to less than 100 changes previously.

Jae Evans (C), vice president, Global Technical Engineering and Operations, Walmart e-commerce, looks on as Walmart employees work at the company’s network operations center in Sunnyvale, California, U.S. October 25, 2017. REUTERS/Nandita Bose

To be sure, Walmart, the world’s largest brick-and-mortar retailer, holds just a 3.6 percent share of the U.S. e-commerce market compared to Amazon’s 43.5 percent, according to digital research firm eMarketer.

Still, Walmart’s cloud effort is significant at a time when U.S. retail is undergoing immense disruption, and data-based decision making has become more important than ever to understand how shoppers make purchases.

Walmart’s online revenue climbed 50 percent year-over-year during the third quarter, helping it post its strongest-ever quarterly growth since 2009.

“The battle between Walmart and Amazon has been playing out on all fronts and the cloud is the latest frontier,” said Kerry Liu, chief executive of Rubikloud Technologies, which offers artificial intelligence technology services to retailers.

EXCESS CAPACITY

The cloud initiative is but one of several steps Wal-Mart is taking to boost its e-commerce business. The company has expanded its online selection and acquired smaller e-commerce retailers. Walmart is offering free two-day shipping on orders of $35 or more, and it recently asked vendors to supply it with merchandise priced at $10 and up to help it turn a profit online.

Walmart has stored information in smaller internal data centers for years. And it uses public cloud storage for non-critical data. Most retailers rent server capacity offered by companies such as Amazon Web Services, Alphabet Inc’s Google, Microsoft Corp and IBM.

(For a graphic on big players in the cloud market, see tmsnrt.rs/2EYe9Ii)

But Walmart’s decision to build a network that is not reliant on a single third-party cloud technology provider has transformed its ability to understand shoppers, who now move between store, desktop, mobile and app to make purchases. About 80 percent of Walmart’s cloud network is now in-house.

Walmart’s Kimmet said security was another big factor behind the effort, enabling the retailer to better protect customer data. That secrecy extends to the locations of its six “mega clouds” or giant server farms, and 75 “micro clouds” whose locations the company declined to disclose publicly.

Walmart shareholders so far appear supportive of its cloud strategy. The company’s shares have risen 49 percent in the last 12 months, defying the broader retail sector downturn and outperforming the wider S&P 500 index, which has risen 14 percent over the same period.

Still, some investors have expressed concerns that Walmart’s approach will make it harder for the retailer to downsize if market conditions change significantly. A few of them told Reuters they would like to see Walmart commercialize its excess capacity, much as its rival Amazon has done.

Amazon Web Services (AWS) generated $18.34 billion in revenue in 2017 and has garnered 26 percent of the cloud market, according to estimates from Jefferies Group LLC.

“Walmart is very good at following Amazon’s innovations. Now they must find a way to monetize the cloud business they are building the way AWS did,” said Charles Sizemore, founder of Sizemore Capital Management LLC, who owns shares of Walmart.

Walmart’s Kimmet said the retailer has no immediate plans to provide cloud services for other companies. But he did not rule it out as a future revenue driver.