DAPR - Distributed Application Runtime Presentation

knoldus 96 views 12 slides Jul 10, 2024
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

Discover Dapr: The open-source runtime that simplifies microservices development with powerful building blocks for service invocation, state management, and more. Learn how Dapr's sidecar architecture enhances scalability and interoperability across multiple programming languages.


Slide Content

Presenter Details – Abhishek Dwivedi Technical Lead DevOps Competency DAPR : Distributed Application Runtime

Agenda Introduction: DAPR Core Building Blocks Components Resiliency Observability Security Configuration  Use cases

Introduction DAPR is a portable, event-driven runtime for building resilient applications on the cloud and edge, supporting multiple languages and frameworks. Traditional web + database architectures are shifting towards distributed microservice architectures with cloud adoption. DAPR helps you build microservices without needing deep expertise in distributed systems. DAPR provides best practices for microservices through open, independent APIs called building blocks. DAPR's building blocks support any language and framework, are fully independent, and have no usage limits. You can gradually migrate existing applications to microservices with DAPR, adopting cloud-native patterns like scaling and resiliency. DAPR is platform-agnostic, allowing applications to run locally, on Kubernetes, virtual machines, or other supported environments.

Core Building Blocks A building block is an HTTP or gRPC API you can call from your code using Dapr components. Dapr offers a set of API building blocks and allows adding new ones for extensibility. Dapr’s building blocks address common challenges in building resilient microservices. They codify best practices and patterns for microservice applications.

Components Modular Design : Components deliver functionality with defined interfaces. Interchangeable : Swap components with the same interface easily. Building Blocks : Use combinations of components for tasks (e.g., state management, pub/sub). Component Specification : Configured via YAML files stored locally or globally. Extensibility : Extend Dapr via the components- contrib repository and pluggable components. Memory Management : Set sidecar memory to prevent OOM issues. Hot Reloading : Update component configurations without restarting Dapr . Types of Components : Includes name resolution, pub/sub, workflows, state stores, bindings, secret stores, configuration stores, locks, cryptography, and middleware.

Implement fault tolerance with timeouts, retries, and circuit breakers. Monitor app health with probes and handle unhealthy apps. Use HTTP / healthz for sidecar health and readiness checks. Access guides for applying Dapr resiliency policies. Resiliency Microservices in Distributed Applications : Typically involve multiple microservices scaling across infrastructure. Complexity and Failure Risks : Growth leads to increased complexity and higher chances of system failures. Common Causes of Failures : Failures can result from hardware issues, unexpected loads, or application lifecycle events (e.g., scaling out, restarts). Critical Need for Self-Healing : Designing and implementing a robust self-healing mechanism is essential. It enables timely detection, mitigation, and response to failures to ensure system reliability and uptime.

Observability Challenges in Application Observability : Understanding system behavior involves: Monitoring internal calls and performance. Early detection of issues. Especially complex in distributed systems with multiple microservices. Importance of Observability : Crucial in production and beneficial in development. Helps identify bottlenecks, enhance performance, and debug across microservices. Instrumentation for Insight : Requires application-specific instrumentation. Collects and sends data (traces, metrics) to observability tools. Challenges include maintenance and portability across different deployments. Dapr's Role in Observability : Utilizes Dapr API building blocks for service-to-service calls and messaging. Offers built-in distributed tracing with Open Telemetry (OTEL) and Zipkin. Automates tracing context generation, simplifying integration with observability tools. Observing Dapr Itself : Monitors Dapr sidecar and control plane: Logs from sidecar and control plane services. Metrics on performance, throughput, and latency. Health endpoints for sidecar status indication.

 Features

 Configuration Dapr Configuration Overview : Purpose : Customize behavior of Dapr application sidecars and control plane system services. Format : YAML files for defining settings and policies. Application Sidecar Configuration : Example : Define ACL policies for method calls between applications. Usage : Modify behaviors like tracing endpoints or security settings. Control Plane Configuration : Global Settings : Manage settings affecting all Dapr instances. Example : Adjust certificate renewal periods for application sidecars. Deployment Methods : Self-Hosted Mode : Edit config.yaml in . dapr directory. Kubernetes : Apply configurations using kubectl or helm.

Dapr Security Features : Secure Communication : End-to-end security with service invocation and pub/sub APIs. Authentication and access policies for applications and topics. Encryption of data in transit using mTLS . Dapr to Dapr Communication : Automatic mTLS for intra- Dapr communication. Sentry service manages certificates and authentication. Secure Application Communication : API-level authentication using tokens. Ensures only authenticated applications can interact with Dapr . Operational Security : Management of mTLS certificates with automatic rotation. Middleware endpoint authorization with OAuth. Network security best practices (NSGs, DMZs, firewalls). Security Policies : Granular control over application capabilities through policies. API access policy management to reduce attack surfaces. Configuration : Easily configure mTLS and security policies through Dapr's settings. Security

Use Case Microservices Orchestration : Simplifies service-to-service communication. Manages state and event-driven workflows. Legacy System Integration : Wraps existing systems with Dapr APIs. Enables gradual migration to microservices architecture. Event-Driven Architecture : Facilitates pub/sub messaging between services. Ensures reliable event delivery and handling. Multi-Cloud Deployment : Provides abstraction for cloud-specific services. Ensures portability and consistency across clouds. Edge Computing : Runs Dapr sidecars on edge devices. Manages distributed computing and data processing. Stateful Services and Actors : Offers state management for distributed applications. Implements scalable actor models for concurrent processing. Serverless Computing : Integrates with serverless platforms for event-driven execution. Enhances scalability and resource efficiency. IoT and Device Management : Handles device connectivity and data processing. Implements IoT workflows with event-driven processing.
Tags