Introduction to Dapr: Features, Architecture, and Installation Guide
This article introduces Dapr, a cloud‑native sidecar runtime for building resilient microservices, explains its core features such as service invocation, state management, pub/sub, bindings, actors, observability, and secrets, and provides step‑by‑step installation instructions for CLI, binaries, Kubernetes, and Helm.
1. What is Dapr
Official overview: Dapr is a portable, event‑driven runtime that enables developers to easily build resilient stateless and stateful applications that can run on cloud platforms or edge environments, supporting multiple programming languages and frameworks while abstracting infrastructure concerns.
Additional clarification:
Dapr stands for Distributed Application Runtime, an open‑source project launched by Microsoft in October 2019.
It uses a sidecar architecture to provide infrastructure capabilities such as bindings, pub/sub, and service discovery via HTTP and gRPC APIs.
SDKs for Go, Java, Python, .NET and other languages are provided to help developers get started quickly.
Sidecar mode separates common application functions into a separate process, and in Kubernetes a sidecar container runs alongside the main business container within the same pod to provide shared functionality.
1.1 Problems Solved
Decouples infrastructure from business logic by delivering infrastructure as sidecars, allowing developers to focus on core features.
Mitigates large‑scale middleware SDK upgrades that could delay business development.
Avoids jar‑file conflicts between infrastructure and business components.
1.2 Release History
Brief overview:
October 2019 – Dapr 0.1 released.
February 17, 2021 – Dapr v1.0 announced, growing from 114 to over 700 contributors in 16 months.
Current stable version is v1.5, the fifth minor release after v1.0, adding many new components and extensive testing.
For detailed release notes, see the official blog: https://blog.dapr.io/posts
2. Dapr Features
Service‑to‑service invocation with retries and mDNS‑based load balancing.
State management – persisting key/value data via APIs to stores such as Redis or MySQL.
Publish and subscribe – services publish messages that subscribed services consume.
Resource bindings – input bindings trigger application calls from external events, while output bindings let applications emit events such as email notifications.
Actors – a low‑level compute unit that processes one message at a time, avoiding complex locking and improving concurrency handling.
Observability – includes tracing, logging, and metrics.
Secrets management – integrates with cloud and on‑premise secret stores.
Configuration management – similar to Apollo, Nacos, Consul; a Redis‑based demo is provided.
3. Dapr Installation
3.1 Dapr CLI Installation
The CLI can be installed on Linux, Windows, macOS, or via binaries.
Linux installation:
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bashIf no version is specified, an error may occur. Fix by specifying the version:
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O v1.5.0 | /bin/bashAlternatively, install via binaries:
Download the archive: wget https://github.com/dapr/cli/releases/download/v1.5.0/dapr_linux_amd64.tar.gz
Extract it: tar -zxvf dapr_linux_amd64.tar.gz
Move the binary to /usr/local/bin : mv dapr /usr/local/bin
Initialize Dapr locally: dapr init
Verify installation: dapr --version
Uninstall the CLI: dapr uninstall && rm /usr/local/bin/dapr
3.2 Kubernetes Installation
Default k8s installation:
dapr init -kIf the request to the GitHub releases API fails, use Helm:
Add the Helm repo: helm repo add dapr https://dapr.github.io/helm-charts/
Update the repo: helm repo update
Search for versions: helm search repo dapr --devel --versions
Create the namespace: kubectl create namespace dapr-system
Install Dapr version 1.5.0: helm upgrade --install dapr dapr/dapr --version=1.5.0 --namespace dapr-system --wait
Verify all pods are Running: kubectl get pods --namespace dapr-system
Uninstall Dapr via Helm: helm uninstall dapr --namespace dapr-system
4. Summary
The article covered Dapr’s definition, architecture, problems it solves, release history, core features, and detailed installation procedures for both CLI and Kubernetes environments.
Reference documentation: https://docs.dapr.io/
政采云技术
ZCY Technology Team (Zero), based in Hangzhou, is a growth-oriented team passionate about technology and craftsmanship. With around 500 members, we are building comprehensive engineering, project management, and talent development systems. We are committed to innovation and creating a cloud service ecosystem for government and enterprise procurement. We look forward to your joining us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.