Not that many years ago, consumers would order a product to come through the mail, and it would take weeks to arrive. Sometimes, there was an option to pay more -- usually a lot more -- for faster service, but the phrase "wait four to six weeks for delivery" was a familiar one.

Those days have gone the way of pay phones and 12 CDs for a penny, as Amazon.com (NASDAQ:AMZN) has fundamentally changed consumer expectations of delivery. The paid Amazon Prime service has made two-day delivery the bare minimum, and that led to Walmart (NYSE:WMT) embracing two-day shipping while offering it for free (with certain restrictions).

The problem with offering two-day shipping is that it's expensive and cuts into already thin margins. That has forced both Amazon and Walmart to rethink how they ship items, both to their warehouses and stores and to end customers.

A Walmart tractor trailer

Walmart has been adding experienced truck drivers. Image source: Walmart.

What are Amazon and Walmart doing?

Of the two retailers, Amazon has been more innovative. The online leader has been building out its own delivery network, which includes increasing its fleet of tractor-trailers to helping entrepreneurs build van-based delivery businesses that bring goods directly to customers' doors.

Amazon has also made a bold pitch to not just serve its own needs but also to help third-party sellers on its platform. The company recently expanded its Amazon Shipping program beyond its initial test markets of London and Los Angeles, reports The Wall Street Journal (subscription required).

To entice shippers to use its service, Amazon has dropped many of the fees that rival shippers UPS (NYSE:UPS) and FedEx (NYSE:FDX) normally charge. That includes "extra charges to deliver packages to homes, during the peak holiday season, or on weekends," the paper reports.

These residential surcharge fees are not small, running around $3.80 per package for both carriers, or about 40% of the average ground delivery charge, WSJ's Paul Ziobro added. By dropping them, as well as other charges, such as seasonal or fuel surcharges, Amazon can grab more business, theoretically making its trucks more efficient by allowing for more deliveries at a lower cost.

Walmart isn't being as bold. It is, however, expanding its army of truck drivers. The company added 1,400 in 2018 and has plans to add hundreds more this year.

The retail giant is hiring not just drivers, but experienced drivers who have at least 30 months under their belt, and is paying them well. The company is offering wages that come out to just under $90,000 a year. That's a number that should be very attractive in an industry where the average median salary comes in at $53,000 a year, according to a 2018 American Trucking Association survey.

Walmart's starting rates for truck drivers should give it an edge over UPS and FedEx, which pay drivers closer to $60,000 per year, based on data from TruckDriverSalary.com. Benefits and bonuses may bring the numbers closer, but in a time where there's a significant shortage of experienced truck drivers, Walmart's hiring spree may hurt the established players in the space.

Is a shipping war coming?

Amazon is taking on more of its own shipping both for efficiency and to hedge against price increases -- not from UPS and FedEx, but from the United States Postal Service. It's also banking on the idea that its technology and ability to predict what will be ordered and where will allow it to increase shipping efficiency -- something that will increase as it adds more volume through increased third-party business.

Walmart's efforts are more traditionally disruptive. The company has acknowledged that there aren't enough experienced drivers to go around, and it has made its play to hire the ones it needs, which may come at the expense of the traditional employers in the field.

The two retailers are serving their own needs first, but their efforts are going to have a ripple effect. It's possible that UPS and FedEx will have to raise wages to attract or retain drivers, and it's equally likely that both trucking companies will have to work to lower costs or risk losing business to Amazon.

This isn't a full-fledged shipping war yet, but it threatens to become one. Walmart and Amazon both need to keep pushing delivery costs down, a need that will only increase as one-day and even same-day shipping becomes more common. FedEx and UPS will have to keep up, or else they'll find themselves shut out of segments of a market they once dominated.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Daniel B. Kline has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon and FedEx. The Motley Fool has a disclosure policy.