Inside The World Of One-Click Grocery Delivery

FORTUNE — It all seems so simple: Hit the "place order" button online and get a head of lettuce, a dozen eggs, or a gallon of milk delivered to your doorstep within 24 hours. But behind the scenes, the burgeoning market of online grocery delivery involves a surprisingly delicate dance to ensure that perishable food gets from producer to consumer in just enough time to avoid (quite literally) a spoiled delivery.

With demand on the rise, giants such as Wal-Mart (WMT) and Amazon (AMZN) are jumping into the fray as investors bet millions on a crop of startups with names like Good Eggs, Relay Foods, and Farmigo. Yet actually turning a profit and managing the logistics of food delivery is tricky, says Leslie Hand, a director at IDC Retail Insights, a market research firm. Unlike shipping books or durable products via UPS, fresh food delivery requires specific short routing, planning, technology, and a race against the clock.

"We're sprinting hard behind the scenes," says Mike Brennan, chief operating officer of Peapod, an online grocer in Stokie, Ill. that offers next-day deliveries in 24 East Coast and Midwest markets. "It's a race every day. The faster you go, the fresher it is."

To read the rest of the story, please go to: CNN Money