What is Dapr.io?
Here’s a quote from dapr.io about dapr –
Dapr is a portable, event-driven runtime that makes it easy for any developer to build resilient, stateless and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks. Leveraging the benefits of a sidecar architecture, Dapr helps you tackle the challenges that come with building microservices and keeps your code platform agnostic.
Put simply, dapr (acronym for Distributed Application Runtime) is a service mesh implementation using the sidecar architecture. If you want to know more about a sidecar, read it here. What differentiates dapr from other service mesh implementations like Istio, Consul etc. is that dapr is focused on providing integrations from a developer’s perspective and not from an infrastructure management perspective.
Getting started with Dapr
Depending on your host OS, you can simply use a package manager to install Dapr. For Windows you can use winget and on MacOS you can use homebrew to install dapr CLI. You can read more about other OS like Linux and architecture options here. Dapr can work both
Once installed, you can issue dapr init to initialize dapr sidecar containers. In this mode (which is known as self-hosted mode), dapr relies on Docker to pull images and start the following containers that provide all the dapr magic –
- A Redis container that provides state management and pub-sub support.
- A Zipkin container that provides diagnostics and tracing support.
- A Dapr Scheduler container that provides scheduling capabilities.
- A Dapr Placement container which maps actors to containers.

Dapr can also be run with Kubernetes where it deploys the following services which allow dapr to provide first class integration with Kubernetes –
- dapr-operator – which manages the Kubernetes service endpoints for dapr.
- dapr-sidecar-injector – which injects Dapr into annotated deployment pods and enables user applications to communicate with Dapr easily.
- dapr-placement – which is used for mapping actor instances to pods.
- dapr-sentry – which provides mTLS support and also acts as a certificate authority.
The real advantage (and reason) for using dapr are the following building blocks that dapr provides –
- Service Invocation – which can perform direct service to service method calls securely.
- Publish/Subscribe – which can handle pub-sub messaging securely between services.
- Workflow – which can automate & orchestrate tasks within your application.
- State Management – which helps maintain application state for long running, stateless and stateful services.
- Bindings – which handles I/O bindings to external resources such as databases and queues.
- Actors – which helps encapsulate code and data in objects to help with microservice design pattern.
- Secrets – which helps securely access secrets from your application.
- Config – which helps access configuration and also notifies of any changes.
- Locks – which provides mutually exclusive locks to shared resources.
- Jobs – which can schedule tasks to run at specific time or intervals.
- Cryptography – which helps with encrypting and decrypting data.
To use Dapr within your application, Dapr provides SDK for the following languages –
- C++
- Java
- .NET
- Python
- NodeJS
- GO
- php
- Rust
In the following articles, we will discuss about each of the building blocks and also show how to use them.


Leave a Reply