diff --git a/.vscode/settings.json b/.vscode/settings.json index fd13810..81d66d5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -134,6 +134,7 @@ "cryptsetup", "csma", "daemonless", + "dapr", "datagram", "datasource", "datasources", diff --git a/knowledge base/cloud computing/dapr.md b/knowledge base/cloud computing/dapr.md index 8f9fed4..eac3138 100644 --- a/knowledge base/cloud computing/dapr.md +++ b/knowledge base/cloud computing/dapr.md @@ -1,37 +1,51 @@ -# DAPR - -> TODO +# Distributed APplication Runtime Portable, event-driven runtime for building distributed applications across cloud and edge. - - 1. [TL;DR](#tldr) +1. [Self-hosted mode](#self-hosted-mode) +1. [Clustered mode](#clustered-mode) 1. [Further readings](#further-readings) 1. [Sources](#sources) ## TL;DR - - +## Self-hosted mode + +Dapr runs as a separate sidecar process **for each** service.
+This sidecar can be called via HTTP or gRPC to use state stores, pub/sub, binding components, and the other building +blocks. + +Use the Dapr CLI to run Dapr-enabled applications on one's local machine. + +```sh +brew install 'dapr/tap/dapr-cli' +dapr init +``` + +This: + +- Fetches and installs the Dapr sidecar binaries locally. +- Creates a development environment to streamline application development with Dapr. + +The development environment includes: + +- Running a Redis container as a local state store and message broker. +- Running a Zipkin container for observability. +- Creating a default components folder with component definitions for the above. +- Running a Dapr placement service container for local actor support. +- Running a Dapr scheduler service container for job scheduling. + +## Clustered mode + +
+ In Kubernetes + +Dapr runs as a sidecar container alongside the application container in the same pod by using the +`dapr-sidecar-injector` and `dapr-operator` control plane services. + +The `dapr-sentry` service acts as a certificate authority to enable mutual TLS between Dapr sidecar instances.
+This provides secure data encryption as well as providing identity via [Spiffe]. + +
+ +
+ On clusters of machines + +Dapr's control plane services can be deployed in high availability mode to machines. + +Dapr uses multicast DNS by default to provide name resolution via DNS for the applications running in the cluster.
+This can be optionally replaced by Hashicorp's Consul. + +
+ ## Further readings - [Website] @@ -58,7 +121,12 @@ Portable, event-driven runtime for building distributed applications across clou --> +[clustered mode]: #clustered-mode +[self-hosted mode]: #self-hosted-mode + +[spiffe]: ../spiffe.md + [codebase]: https://github.com/dapr/dapr