Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ Testing for resiliency cannot always be done the same way that you test applicat

Application resiliency is a must for handling problematic requested operations. But, it's only half of the story. Next, we cover resiliency features available in the Azure cloud.

> [!TIP]
> [Aspire's service defaults](https://aspire.dev/fundamentals/service-defaults/) configure standard resilience pipelines for `HttpClient` automatically, reducing the need for manual Polly configuration.

>[!div class="step-by-step"]
>[Previous](resiliency.md)
>[Next](infrastructure-resiliency-azure.md)
3 changes: 3 additions & 0 deletions docs/architecture/cloud-native/definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ The Microsoft .NET platform is an excellent choice. Free and open source, it has

[.NET](https://github.com/dotnet/core) is maintained by Microsoft and the .NET community on GitHub.

> [!TIP]
> For the modern cloud-native developer experience with .NET, see [Aspire](https://aspire.dev/get-started/what-is-aspire/). Aspire provides orchestration, service discovery, resilience, and telemetry for distributed apps out of the box.

### Microservice challenges

While distributed cloud-native microservices can provide immense agility and speed, they present many challenges:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ As Figure 4-17 shows, real-time HTTP communication means that you can have serve

SignalR is a good way to achieve real-time communication for pushing content to the clients from a back-end server. Since communication is in real time, client apps show the changes almost instantly. This is usually handled by a protocol such as WebSockets, using many WebSockets connections (one per client). A typical example is when a service communicates a change in the score of a sports game to many client web apps simultaneously.

### Additional resources

- **Service discovery in Aspire** \
<https://aspire.dev/fundamentals/service-discovery/>—Aspire provides built-in service discovery for inter-service communication in .NET distributed apps.

>[!div class="step-by-step"]
>[Previous](direct-client-to-microservice-communication-versus-the-api-gateway-pattern.md)
>[Next](asynchronous-message-based-communication.md)
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ var retryPolicy = Policy
- **Marc Brooker. Jitter: Making Things Better With Randomness**
<https://brooker.co.za/blog/2015/03/21/backoff.html>

- **Aspire service defaults** \
<https://aspire.dev/fundamentals/service-defaults/>—Aspire provides convention-based resilience setup for `HttpClient`, replacing manual Polly configuration.

>[!div class="step-by-step"]
>[Previous](use-httpclientfactory-to-implement-resilient-http-requests.md)
>[Next](implement-circuit-breaker-pattern.md)
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ Finally, if you're storing all the event streams, you can use Microsoft Power BI
- **Azure Monitor** \
<https://azure.microsoft.com/services/monitor/>

- **Health checks in Aspire** \
<https://aspire.dev/fundamentals/health-checks/>—Aspire's service defaults project configures health check endpoints automatically.

>[!div class="step-by-step"]
>[Previous](implement-circuit-breaker-pattern.md)
>[Next](../secure-net-microservices-web-applications/index.md)
3 changes: 3 additions & 0 deletions docs/architecture/microservices/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Docker is becoming the de facto standard in the container industry, supported by

In addition, the [microservices](https://martinfowler.com/articles/microservices.html) architecture is emerging as an important approach for distributed mission-critical applications. In a microservice-based architecture, the application is built on a collection of services that can be developed, tested, deployed, and versioned independently.

> [!TIP]
> For the modern .NET developer experience for distributed apps, see [Aspire](https://aspire.dev/get-started/what-is-aspire/). Aspire provides orchestration, service discovery, and built-in integrations for common services like databases, caches, and messaging.

## About this guide

This guide is an introduction to developing microservices-based applications and managing them using containers. It discusses architectural design and implementation approaches using .NET and Docker containers. To make it easier to get started with containers and microservices, the guide focuses on a reference containerized and microservice-based application that you can explore. The sample application is available at the [eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers) GitHub repo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ Yet another drawback with this direct client-to-service approach is that it make

As mentioned in the architecture section, when designing and building a complex application based on microservices, you might consider the use of multiple fine-grained API Gateways instead of the simpler direct client-to-microservice communication approach.

> [!TIP]
> [Aspire](https://aspire.dev/get-started/aspire-architecture/) directly addresses many of these distributed-app challenges—including deployment complexity, service discovery, and inter-service communication—with a code-first orchestration approach.

**Partitioning the microservices**. Finally, no matter, which approach you take for your microservice architecture, another challenge is deciding how to partition an end-to-end application into multiple microservices. As noted in the architecture section of the guide, there are several techniques and approaches you can take. Basically, you need to identify areas of the application that are decoupled from the other areas and that have a low number of hard dependencies. In many cases, this approach is aligned to partitioning services by use case. For example, in our e-shop application, we have an ordering service that is responsible for all the business logic related to the order process. We also have the catalog service and the basket service that implement other capabilities. Ideally, each service should have only a small set of responsibilities. This approach is similar to the single responsibility principle (SRP) applied to classes, which states that a class should only have one reason to change. But in this case, it is about microservices, so the scope will be larger than a single class. Most of all, a microservice has to be autonomous, end to end, including responsibility for its own data sources.

## External versus internal architecture and design patterns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ For faster startup, runtime images also automatically set aspnetcore\_urls to po
- **Building Docker Images for .NET Applications**
[https://learn.microsoft.com/dotnet/core/docker/building-net-docker-images](/aspnet/core/host-and-deploy/docker/building-net-docker-images)

- **Migrate from Docker Compose to Aspire** \
<https://aspire.dev/app-host/migrate-from-docker-compose-to-aspire/>—Aspire offers a code-first alternative to Docker Compose with built-in service discovery and health checks.

> [!div class="step-by-step"]
> [Previous](data-driven-crud-microservice.md)
> [Next](database-server-container.md)
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ A production-ready solution with support for RabbitMQ.
- **Rebus** - Open source .NET Service Bus \
<https://github.com/rebus-org/Rebus>

- **Aspire integrations** - Aspire can manage RabbitMQ as a resource with `builder.AddRabbitMQ()`. See the [Aspire integrations gallery](https://aspire.dev/integrations/) for available hosting extensions.

> [!div class="step-by-step"]
> [Previous](integration-event-based-microservice-communications.md)
> [Next](subscribe-events.md)
1 change: 1 addition & 0 deletions docs/core/containers/sdk-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,4 @@ docker image rm 25aeb97a2e21
- [Review the Azure services that support containers](https://azure.microsoft.com/overview/containers/)
- [Read about Dockerfile commands](https://docs.docker.com/engine/reference/builder/)
- [Explore the container tools in Visual Studio](/visualstudio/containers/overview)
- [What is Aspire?](https://aspire.dev/get-started/what-is-aspire/)—Orchestrate containers, .NET projects, and dependencies together for multi-service apps.
1 change: 1 addition & 0 deletions docs/core/deploying/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,3 +536,4 @@ For more information about container deployment, see [.NET SDK container creatio
- [.NET Runtime Identifier (RID) catalog](../rid-catalog.md)
- [Select the .NET version to use](../versions/selection.md)
- [Publishing for macOS](macos.md)
- [What is the Aspire AppHost?](https://aspire.dev/get-started/app-host/)—Manage multi-container orchestration during development with a code-first approach.
4 changes: 4 additions & 0 deletions docs/core/diagnostics/observability-otlp-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,7 @@ The dashboard shows a list of traces with summary information. Whenever spans wi
[![Spans in standalone dashboard](./media/aspire-dashboard-spans-thumb.png)](./media/aspire-dashboard-spans.png#lightbox)

Selecting a span shows its details including any properties on the span, such as the `greeting` tag that you set in [step 3](#3-create-an-api-endpoint).

## See also

- [Standalone Aspire dashboard](https://aspire.dev/dashboard/standalone-aspire-dashboard/)—The canonical Aspire documentation for the standalone dashboard.
1 change: 1 addition & 0 deletions docs/core/diagnostics/observability-with-otel.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ For more details on Aspire see:
- [Aspire Overview](/dotnet/aspire/get-started/aspire-overview)
- [Telemetry in Aspire](/dotnet/aspire/fundamentals/telemetry)
- [Aspire Dashboard](/dotnet/aspire/fundamentals/dashboard/explore)
- [Aspire dashboard overview](https://aspire.dev/dashboard/aspire-dashboard-overview/) (aspire.dev)

### Reuse Service Defaults project without Aspire Orchestration

Expand Down
1 change: 1 addition & 0 deletions docs/core/docker/build-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,3 +512,4 @@ Use the `docker images` command to see a list of images installed.
- [Azure services that support containers](https://azure.microsoft.com/overview/containers/)
- [Dockerfile commands](https://docs.docker.com/engine/reference/builder/)
- [Container Tools for Visual Studio](/visualstudio/containers/overview)
- [Docker Compose to Aspire AppHost](https://aspire.dev/app-host/docker-compose-to-aspire-apphost/)—If your app has multiple services, consider Aspire as a code-first alternative to Docker Compose.
1 change: 1 addition & 0 deletions docs/core/extensions/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,4 @@ To delete values in the distributed cache, call one of the `Remove` APIs:
- [Cache in-memory in ASP.NET Core](/aspnet/core/performance/caching/memory)
- [Distributed caching in ASP.NET Core](/aspnet/core/performance/caching/distributed)
- [HybridCache library in ASP.NET Core](/aspnet/core/performance/caching/hybrid)
- [Redis distributed caching in Aspire](https://aspire.dev/integrations/redis-distributed-caching/)—With Aspire, Redis is configured as a resource and connection strings are injected automatically.
1 change: 1 addition & 0 deletions docs/core/extensions/service-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,4 @@ If service discovery was added to the host using the `AddServiceDiscoveryCore` e
## See also

- [Service discovery in Aspire](/dotnet/aspire/service-discovery/overview)
- [Service discovery](https://aspire.dev/fundamentals/service-discovery/) (aspire.dev)—Aspire is the primary consumer and orchestrator for this library.
1 change: 1 addition & 0 deletions docs/core/extensions/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,4 @@ You'd obviously need to add real logic to the `RunAsync` method, but this exampl
- [Create a Windows Service using `BackgroundService` in .NET](windows-service.md)
- Custom <xref:Microsoft.Extensions.Hosting.IHostedService> implementation:
- [Implement the `IHostedService` interface in .NET](timer-service.md)
- [What is the Aspire AppHost?](https://aspire.dev/get-started/app-host/)—Building a distributed app with workers? Aspire can orchestrate workers, APIs, and dependencies together.
4 changes: 4 additions & 0 deletions docs/core/resilience/http-resilience.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,7 @@ The issue can be fixed by updating .NET Application Insights to version **2.23.0
services.AddApplicationInsightsTelemetry();
services.AddHttpClient().AddStandardResilienceHandler();
```

## See also

- [Service defaults](https://aspire.dev/fundamentals/service-defaults/)—Aspire's service defaults project configures standard resilience pipelines for `HttpClient` out of the box.
1 change: 1 addition & 0 deletions docs/core/resilience/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ The preceding code executes the delegate within the `ExecuteAsync` method. When

- [Build resilient HTTP apps: Key development patterns](http-resilience.md)
- [Challenges of idempotent handling of retried calls](/azure/architecture/reference-architectures/containers/aks-mission-critical/mission-critical-data-platform#idempotent-message-processing)
- [Service defaults](https://aspire.dev/fundamentals/service-defaults/)—Aspire's service defaults project configures resilience pipelines for `HttpClient` automatically.
4 changes: 4 additions & 0 deletions docs/fundamentals/networking/telemetry/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,7 @@ It's possible to implement the enrichment of the `HTTP client request` activity
## Need more tracing?

If you have suggestions for other useful information that could be exposed via tracing, create a [dotnet/runtime issue](https://github.com/dotnet/runtime/issues/new).

## See also

- [Service defaults](https://aspire.dev/fundamentals/service-defaults/)—Learn how Aspire's service defaults project configures tracing and other telemetry automatically.
Loading