Skip to main content

Microservices

Build resilient microservices with service discovery, state management, and reliable messaging patterns, decoupled from underlying infrastructure across on-premises and cloud environments.

From Development to Production

While Dapr provides the APIs and patterns for building microservices, Catalyst takes you from code to production with enterprise-grade reliability, governance, and deep observability. Learn more about Running Microservices with Catalyst.

app_map overview

Resilient Orchestration

In microservices architectures, ensuring data consistency and coordinating long-running business processes across services is challenging when each service owns its data. Dapr Workflow provides stateful, fault-tolerant orchestration that makes it easy to express multi-step business logic, handle retries, and maintain consistency across services.

One common pattern is the Saga pattern, which breaks distributed operations into a sequence of local transactions, each executed within its own service and database. If any step fails, compensating actions revert previous changes to keep the system consistent.

Key capabilities:

  • Workflow orchestration - Define complex business processes in code with guaranteed execution through durable, stateful workflows that survive failures and restarts
  • Saga pattern - Orchestrate interactions across multiple services with reliable consistency without relying on distributed transactions
  • Transactional outbox pattern - Automatically propagate database changes to other services using asynchronous pub/sub
  • Compensation logic - Roll back or undo operations when workflows fail partway through to maintain consistency in distributed systems

Service-to-Service Communication

Synchronous request-reply remains one of the most common communication patterns in microservices, but doing it reliably in production requires service discovery, secure communication, and handling transient failures.

The Dapr Service Invocation API enables applications to discover and communicate with each other securely, with built-in resiliency and observability.

Key capabilities:

  • Service discovery - Automatically locate and route to target services in dynamic environments
  • Built-in resiliency - Reliable service-to-service communication with retries, timeouts, and circuit breakers to protect against transient failures and prevent cascading failures
  • Secure communication - mTLS authentication and encryption for all service-to-service traffic
  • Observability - Automatic distributed tracing and metrics for all service calls

State Management

The Dapr State API provides a key/value-based interface with pluggable state stores for persistence, enabling microservices to maintain state across requests and service restarts.

state gif

Rather than being locked into a single database, Dapr's state management lets you choose from different state store providers, from Redis and PostgreSQL to AWS DynamoDB and Azure Cosmos DB.

Key capabilities:

  • Transactional operations - Perform atomic multi-item transactions across state stores, ensuring data consistency
  • State TTL - Set time-to-live values on state entries for automatic expiration and cleanup
  • Encryption at rest - Protect sensitive data at rest with provider-agnostic encryption and key rotation
  • Querying - Query state stores using rich query syntax for filtering and sorting
  • Bulk operations - Read or write multiple state entries in a single request for improved performance

Job Scheduling

Many microservices need scheduled work - running nightly database backups, executing daily ETL pipelines, sending periodic email reports, or settling financial transactions at the end of the business day. The Dapr Jobs API provides an orchestrator for scheduling jobs to run at specific times or intervals.

Key capabilities:

  • Job scheduling - Schedule one-off or recurring jobs to run at specific times or intervals with durable execution guarantees
  • Reliable execution - Jobs are durable and survive process restarts and infrastructure failures, ensuring scheduled tasks still run

Infrastructure Portability

Dapr's component model decouples your application code from underlying infrastructure resources, enabling true portability and multi-cloud deployment. Your microservices can be deployed on your preferred infrastructure, whether on-premises or in any cloud environment.

When you use Dapr APIs such as pub/sub, you can change your message broker by swapping a YAML configuration file - moving from RabbitMQ to Kafka or from Azure Service Bus to Google Pub/Sub. The same applies to state stores, where you can switch from Azure Cosmos DB to AWS DynamoDB by updating configuration only. No changes are required to your application code.

Key capabilities:

  • Infrastructure portability - Switch between message brokers, databases, secret stores, and other components without modifying application code
  • Multi-cloud deployment - Run the same application code across different cloud providers (AWS, Azure, GCP) or on-premises environments
  • Bindings integration - Connect to external cloud services and systems through input and output bindings

Running Microservices with Catalyst

Catalyst provides an enterprise-grade platform for running microservices in production with built-in reliability, governance, and deep observability.

Reliability and Resiliency

Ensure your microservices remain reliable in production with platform-level resiliency features:

  • Resiliency policies - Define retry, timeout, and circuit breaker policies at the platform level that apply consistently across all services
  • Health monitoring - Automatic health checks and readiness probes for service availability
  • Graceful degradation - Circuit breakers prevent cascading failures when downstream services become unhealthy
  • Rate limiting - Protect services from overload with configurable rate limits

Governance and Security

Control access and enforce policies across your microservice architecture:

  • Access control policies - Define which services can communicate with each other and what operations they can perform
  • mTLS encryption - Automatic mutual TLS for all service-to-service communication with certificate rotation
  • Audit logging - Complete audit trails of service interactions for compliance and security analysis
  • Secret management - Centralized secrets storage with automatic injection into applications

Observability and Debugging

Understand your microservice architecture with visual tools and deep insights:

connectivity overview

  • Application graph - Visualize how services interact with each other and their infrastructure dependencies, showing synchronous calls and asynchronous messaging flows
  • Metrics dashboards - Monitor service health using golden metrics - latency, throughput, and error rates
  • API call inspection - Drill into individual API calls to analyze failures, latency, and end-to-end behavior
  • Workflow visualization - View workflow execution paths and inspect each activity to understand long-running processes
  • Distributed tracing - Follow requests across service boundaries with automatic trace propagation

Getting Started