Getty Images

Dapr brings microservices principles to platform engineering

With microservices now mainstream -- and past the trough of disillusionment -- a framework developed for them appeals to platform engineers with shared services consistency.

Proponents of a distributed application framework that emerged as a bridge between microservices now see it playing a key role in the new era of platform engineering.

Early hype around microservices has cooled into a more pragmatic set of practices in recent years, with the recognition that it isn't necessarily appropriate for every app or API. First coined in 2011, the term microservices describes an architectural approach to software deployment that uses modular, independently built sets of services to form a larger logical application. By 2016, early-adopter cloud companies such as Netflix had embraced the concept and open sourced a microservices orchestration framework called Conductor. Pivotal Labs released version 1.0 of its Java-based Spring Cloud Stream microservices framework the same year. By late 2018, IDC predicted that 90% of all enterprise applications would feature a microservices architecture by 2022.

However, disillusionment with the cost and complexity of microservices quickly followed. Mentions of microservices architecture fell by 42% between 2019 and 2020, according to a 2021 Gartner media analysis. Microservices ennui culminated in a high-profile case study published by Amazon's Prime Video development team in 2023 about the 90% cost savings it realized by moving away from microservices and back to a monolith.

"There are two major trends concerning microservices in the industry at present," said Stephen O'Grady, co-founder and analyst at RedMonk. "The first is determining where they're appropriate; the industry pendulum had swung too far and tried to apply them to every API, including some cases in which they were not appropriate. ... And second, in those cases, customers are looking … for more broadly capable, integrated platforms to manage their various microservice instantiations." 

Dapr rides CNCF momentum into platform era

Dapr, a microservices framework developed at Microsoft in 2019, was donated to the Cloud Native Computing Foundation (CNCF) in 2021. Dapr is a distributed application runtime that exposes a standard set of APIs to link microservices applications written in multiple programming languages with an assortment of shared elements that they need to run. These elements, which Dapr terms components, include a variety of state and secret stores such as Redis and HashiCorp Vault and messaging services such as Kafka, as well as encryption and observability tools.

As with microservices themselves, Dapr benefited from an association with containers and Kubernetes, and is often deployed as a sidecar within container clusters, although it supports serverless and VM-based apps as well. By 2023, Dapr was the 11th-largest project within CNCF, with more than 3,000 contributors, according to officials at Diagrid, a startup vendor founded in 2021 that hosts Kubernetes and Dapr API managed services. Dapr is also part of the plumbing for the early-stage Radius Microsoft developer platform project that emerged last November.

There's a natural affinity between standardized APIs for microservices and the APIs used by centralized platform teams to give developers access to shared resources, according to Mark Fussell, Dapr's co-creator and founder and CEO at Diagrid.

"People have to produce a set of platform engineering APIs in order [for developers] to integrate into their platform, and many companies have included Dapr APIs as part of [that] app platform engineering play," Fussell said. "[It] helps break fragmentation and do consistent messaging, build applications across cloud and on-premises platforms and allows [them] to achieve cloud portability."

Moreover, these APIs form an abstraction layer that allows underlying platform services to be changed without the same kind of disruption that can come from rewriting direct custom integrations, Fussell said.

Despite its multi-language support, Dapr remains associated with Microsoft .NET in practice, said Matt Brasier, an analyst at Gartner. But within that ecosystem, Dapr has found a home at companies that must contend with managing distributed apps and their associated infrastructure services within internal developer platforms -- regardless of whether they meet the full technical definition of microservices.

Frameworks like Dapr still have a part to play … whether you go from one monolith to three components, or one monolith to 300 components.
Matt BrasierAnalyst, Gartner

"In the modern world with a higher pace of change, in many use cases, a single monolith is not the right architecture, but that doesn't mean you need 500 or 1,000 microservices -- it might just mean you break the monolith down into three components," Brasier said. "But frameworks like Dapr still have a part to play in that, whether you go from one monolith to three components, or one monolith to 300 components."

Still, Dapr is hardly leaving microservices in the dust. Most recently, the project has begun to expand beyond a collection of individual microservices components into formal microservices orchestration with the Dapr Workflow beta project, due for general availability later this year. Dapr Workflow is competitive with tools from microservices orchestration vendors such as Temporal and Cadence, according to its creator, but with polyglot, multi-tool support.

"We're just using … code in the language of your choice to actually define the workflow execution. You can even attach debuggers to this while the workflow's running and see what's happening," said Chris Gillum, partner architect at Microsoft and creator of Dapr Workflow, during a presentation at KubeCon + CloudNativeCon North America 2023. "If you've ever heard of Temporal, Cadence or even Azure Durable Functions, it's effectively the same idea that we've taken and put into the Dapr project to make it available in a cloud-agnostic way."

Dapr components list
Dapr components are a standardized set of building blocks that link together distributed applications and common shared services in an interchangeable way.

Zscaler gets pub/sub flex in Dapr, eyes platform use

Dapr has its own learning curve, especially when the open source version is deployed via Kubernetes sidecar, according to one software engineer who began using it for a specific development project in 2022.

Josh Carlisle, principal software engineer, ZscalerJosh Carlisle

"We had to get our engineers comfortable with the development cycle [using the Dapr API]," said Josh Carlisle, principal software engineer at Zscaler, a cloud security vendor in San Jose, Calif. "They need to understand, 'Hey, before you can execute code, spin up the Dapr CLI and have this running.' … It wasn't any kind of heavy lift … but it was probably a good two or three weeks into development before engineers got comfortable with the new workflow."

Carlisle led a developer team at Zscaler that used Dapr to add observability and resiliency features such as retries and circuit breaking to an internally hosted Kafka messaging platform last year. Even with the initial developer learning curve, he estimated using Dapr instead of building from scratch cut the time it took to complete that project by about a quarter to one-third.

"Kafka is a great platform, [but] it's exceedingly complex to run and manage [and] we knew that, in general, down the line, Kafka might not be the best [choice]," he said. "We used Dapr to abstract away our code from the implementation so that down the road, if we wanted to go from pub/sub [with Kafka] to something cloud native, like [AWS] SNS or SQS, or RabbitMQ … our [platform] code doesn't change."

Carlisle has since been tasked to create an internal developer platform for more of the company's 5,000 employees to use. He plans to include Dapr in that effort.

"Where I see Dapr fitting into the platform development story is as a foundational component for a platform team to say, 'Here's a blueprint' … something to use that has success [to] give everybody a starting point."

Platform teams have a wide array of tools to choose from in building such "golden paths" to production for developers, including service mesh and event-driven automation along with other microservices orchestration tools. This fact was not lost on some of Zscaler's engineers when Carlisle first proposed using Dapr, he said.

"There are some features that we used, where engineers were like, 'Well, why don't we just use service mesh?'" he said. "[But Dapr] also allowed us to use service meshes at a network level … but if we want to do [asynchronous] calls and apply the same kinds of features, like with messaging, it doesn't do as good a job. ... If you already have service mesh, it doesn't mean you have to uninstall it, but if you don't want to have the heavy lift of a service mesh, you can still get some of the [same] things."

Similarly, Carlisle said Dapr Workflow might make for a lighter-weight alternative to existing microservices orchestration tools.

"We have some relatively simple use cases, things like fan-out and fan-in, that just can't justify spinning up Temporal or Cadence and bigger platforms," he said. "I did a lot of serverless stuff years and years ago with Azure Functions, and Azure Functions has that durable task framework. [Workflow] is very reminiscent of that."

SharperImage.com leans on Diagrid's Dapr services

A smaller company without a dedicated platform team used Diagrid's managed services to play a platform engineering role for its developers.

Camelot SI LLC, which manages online retailer SharperImage.com, began to replace a homegrown microservices framework created by a former employee with Diagrid's Conductor in 2022 to run Dapr on its Amazon EKS clusters.

Aaron Olds, senior software engineer, Camelot SI LLCAaron Olds

"I just wanted developers to be able to worry about writing ASP.NET Core applications and not have to worry about all this configuration they had to do on their local machine in order to get the environment correct," said Aaron Olds, senior software engineer at Camelot.

Diagrid Catalyst makes for quicker developer onboarding, flexibility in the company's use of the underlying AWS service and ensures that configurations are consistently correct, Olds said. As with Zscaler's Carlisle, Olds said Dapr presented a learning curve for him and an engineering colleague initially, but Diagrid hosted a hackathon and introductory training course that helped.

Now that the shift to Conductor is complete, it's a time-saver for Olds and five other developers who manage some 60 microservices for the company.

"It's been able to help us actually diagnose issues that we didn't know were there because the prior framework had issues with caching and queuing. … It would be loading data and our services weren't doing anything yet," he said. "Conductor tells us what the sidecar is requesting in terms of resources, and it also gives us notifications if it's over- or under-provisioned."

Following the frenetic growth of the COVID-19 pandemic in e-commerce, Camelot is now focused on cutting IT costs. It's currently considering using serverless container offerings such as AWS App Runner, bringing workloads back in-house that had been handled by SaaS providers, or changing which providers it works with -- all areas where Diagrid's Catalyst could play a role, Olds said. The service, launched in November, manages Dapr APIs including Workflow in areas beyond the Kubernetes environment.

"I would love to be able to say, 'We're not going to run Kubernetes anymore,'" Olds said. Regardless of the underlying infrastructure, "The implementation of our microservices is faster [with Dapr] -- we don't have to worry about all the ceremony that went with the previous framework."

Beth Pariseau, senior news writer at TechTarget, is an award-winning veteran of IT journalism. She can be reached at [email protected] or on X -- formerly known as Twitter -- @PariseauTT.

Dig Deeper on DevOps

Software Quality
App Architecture
Cloud Computing
SearchAWS
TheServerSide.com
Data Center
Close