Coffee is a serious business—especially first thing in the morning. For most of us, that first jolt is an essential (and, of course, delicious) boost that propels us into our working day.

Dunkin logoDunkin’ Donuts has been in the business of making mornings better since 1950. Today, with more than 8,800 restaurants and 6.5 million DD Perks rewards program members across the United States, the company has the scale and reach to back up its famous claim that “America runs on Dunkin’.”

And since launching On-the-go Ordering via its mobile app, Dunkin’ has been using the power of software to put those crucial cups of coffee (not to mention donuts, sandwiches, and other tasty treats) in customers’ hands faster and more efficiently than ever. To do so, the company relies on Amazon Web Services and the New Relic Digital Intelligence Platform.

“America runs on Dunkin’, and Dunkin’ mobile really does run on New Relic,” said Matt Kraft, director of software development and architecture for Dunkin’ Brands, when he appeared at FutureStack: New York last month. “It’s what makes us successful in meeting the customer’s expectations.” (Watch the video below and check out the SlideShare of Matt’s presentation at the bottom of this post.)

A digital moment of truth, every two minutes

Matt joined Dunkin’ in 2014, in an era he referred to as “The Dark Ages.” Though the Dunkin’ brand as a whole was thriving, the software side of the business was being held back by legacy architecture and a lack of Java instrumentation. Problems were addressed only after customers called in to complain. Troubleshooting those problems was arduous and inefficient—a process requiring operations engineers to send emails back and forth as they trawled through daily logs that were typically already 2GB in size by 10 a.m.

At that time, the functionality of the Dunkin’ mobile app was limited to the DD Perks program. But On-the-Go Ordering was in the works, and Matt knew big changes were needed before the new and improved app could launch.

People might be willing to wait 24 hours for a book to be delivered, or 45 minutes for a pizza, he said. But when you’re taking and fulfilling their morning coffee orders, slowness isn’t an option. “You’re experiencing a digital moment of truth every two minutes,” Matt noted.

With the clock ticking, he knew Dunkin’ needed a jolt of digital intelligence, fast.

Cleaning out the attic

“Integrating New Relic into systems I manage is always my first order of business,” Matt explained. When he did so at Dunkin’, the results weren’t initially pretty—but they were powerful.

“Deploying New Relic is like cleaning out the attic—you get visibility into things that you almost don’t want to acknowledge are going on in your system.” The implications, though not necessarily comforting, were clear. “We had to go through a massive clean-up effort.”

During what he called ‘The Renaissance” of 2015 and early 2016, as Dunkin’ moved to AWS and prepared to launch the new mobile app, Matt and his teams used the insights provided by New Relic to address critical limitations, plan architectural expansion, and eliminate system bottlenecks. Anticipating (correctly) that On-the-Go Ordering would be a big hit, they ran load tests for traffic at 10 times the previous levels.

All through the migration process, Matt said, “New Relic helped us make better decisions.” He described an integrative process of taking production data, creating simulations, running load tests, and then providing that feedback to Amazon. “All of that was driven by data coming out of New Relic APM. There was very little guessing going on.” The result? Dunkin’s cloud implementation went out of the gate right-sized, not over-provisioned. “It was a pretty big success story.”

And that was only the beginning. When one of Matt’s senior colleagues pointed out how great it would be to know about performance issues before customers had to report them, the team made that happen, too. “New Relic APM and New Relic Synthetics were the tools that really got us there.”

A new age of enlightenment

When Dunkin’ launched On-the-Go Ordering in June 2016, it was an instant success. Right now, in what Matt calls ‘The Enlightenment,” mobile ordering makes up 2% of the company’s total transactions—and that number is growing.

Dunkin

Aside from the pleasure and convenience of ordering ahead and skipping lines via mobile, the popularity of the app is attributable in large part to the reliable technology that underpins it. Thanks to the performance-monitoring capabilities offered by New Relic, Matt and his team have reduced response times for upstream outages from hours to minutes. Even better, they’re able to identify and address problems before customers complain—often before customers even notice.

Major outages are now extremely rare, Matt said, and internal system downtime is low. Best of all, his senior colleague can wake up at the beginning of the early morning rush, check Dunkin’s New Relic dashboards, and, if all is well, go back to sleep until a more civilized hour.

Getting specific

Matt likes sleeping in, too. That’s why one of his next priorities is to use New Relic to refine Dunkin’s alerting systems so that he and his fellow engineers needn’t be woken unnecessarily at the crack of dawn. “Getting very specific—slicing and dicing the types of errors we’re getting—is a big deal to us,” he said during his appearance at another FutureStack: New York presentation: Honing Mobile Monitoring with Event Data, Featuring Dunkin’ Donuts. Watch his portion of the session below:

Matt is also excited to refine the app’s interface using New Relic Insights, and to make Curbside Ordering—for drive-in pick-up, coming soon—as big a success as On-the-Go.

Whatever lies ahead for Dunkin’, Matt is confident the company has left the Dark Ages behind. Thanks to its daily fix of digital intelligence, Dunkin’s Enlightenment will surely continue.

Check out the slides from Matt’s presentation below:

B.J. Hinshaw is a freelance writer based in Northern California. View posts by .

Interested in writing for New Relic Blog? Send us a pitch!