.NET Aspire — Distributed Applications in .NET 8

NGUYEN UT HIEN

--

.NET Aspire is an opinionated, cloud ready stack for building observable, production ready, distributed applications.​ .NET Aspire is delivered through a collection of NuGet packages that handle specific cloud-native concerns. Cloud-native apps often consist of small, interconnected pieces or microservices rather than a single, monolithic code base. Cloud-native apps generally consume a large number of services, such as databases, messaging, and caching.

A distributed application is one that uses computational resources across multiple nodes, such as containers running on different hosts. Such nodes must communicate over network boundaries to deliver responses to users. A cloud-native app is a specific type of distributed app that takes full advantage of the scalability, resilience, and manageability of cloud infrastructures.

Prerequisites

To work with .NET Aspire, you’ll need the following installed locally:

Create the .NET Aspire template

Enter a Project Name of AspireSample.

Make sure .NET 8.0 (Long Term Support) is selected.

Ensure that Use Redis for caching (requires Docker) is checked and select Create.

Visual Studio creates a new solution that is structured to use .NET Aspire.

Press F5

Monitoring with .NET Aspire Dashboard

.NET Aspire Dashboard

Dashboard has view different information about the .NET Aspire app:

Console logs

  • Projects: Lists basic information for all of the individual .NET projects in your .NET Aspire app, such as the app state, endpoint addresses, and the environment variables that were loaded in.
  • Metrics: Displays various instruments and meters that are exposed and their corresponding dimensions for your app. Metrics conditionally expose filters based on their available dimensions.

--

--

No responses yet

Write a response