Microsoft's .NET Aspire 9.3 adds reverse proxy, enhanced dashboard

11 hours ago 1

Microsoft’s .NET Aspire 9.3 adds reverse proxy, enhanced dashboard which phones telemetry home by default

Microsoft has updated .NET Aspire to version 9.3, including reverse proxy support, MySQL integration, easier integration with Azure blog storage, and preview support for Azure App Service – though developers should note that the new version now sends dashboard telemetry to the company by default, whereas before this was opt-in.

The Aspire project addresses the challenge of building containerised, observable distributed applications: common characteristics of enterprise applications. 

Aspire is mainly focused on the development experience. Dev-time orchestration means Aspire launches all the required services on which an application depends automatically when testing and debugging. This is done via an App host project which runs the apps and services that form the project, including Dockerfiles that define containers. Aspire also automates configuring telemetry, health checks and service discovery, again designed for development rather than production.

New in Aspire 9.3 is preview integration with YARP (Yet Another Reverse Proxy), a toolkit for building fast proxy servers in .NET that apparently emerged from the needs of internal teams at Microsoft who decided to work together on a common requirement. Aspire now supports this based on a simple builder.AddYarp statement.

Aspire has built-in integration with databases including SQL Server, PostgreSQL and MySQL, but until now the MySQL support did not work as expected, with the AddDatabase API not actually creating a database. This is fixed in 9.3, though the Oracle integration still lacks the ability to provision a new database.

Aspire deployment to production has been one of the weaker points of the project, requiring manual steps and/or use of a separate project called Aspir8 that generates deployment YAML for Kubernetes. In the previous version Microsoft previewed a new approach called publishers, which allows configuration of a deployment target via a statement such as builder.AddDockerComposePublisher(). This has now been replaced with a new preview where the equivalent statement would be builder.AddDockerComposeEnvironment(). The latest approach allows different services within an application to be mapped to different deployment targets, with preview support for Docker Compose, Kubernetes, Azure Container Apps, and Azure App Service.

Azure App Service has apparently been widely requested and Microsoft has posted specific instructions on how to use this with Aspire.

Context menus in the Aspire dashboard; image from this Microsoft post.

The most eye-catching feature of Aspire is its developer dashboard, which shows the health of a running application with access to logs, traces and metrics, though this is primarily designed for developer rather than production use. Aspire 9.3 adds new context menus, opened via right-click on nodes in an Aspire resource graph view, which provide access to logs, traces, metrics, or external URLs related to the resource. There is also now Copilot support for assistance in interpreting this data.

Microsoft has also made a change to the data it collects from dashboards running in developer environments. “Starting with .NET Aspire 9.3, dashboard usage telemetry is enabled by default,” the docs state. Data collected by Microsoft does not include code or personal data and is intended only to provide dashboard and Copilot usage statistics, and there is a way to opt-out using an environment variable or by configuring Visual Studio or Visual Studio Code.

The popularity of the dashboard has caused the team to provide a standalone .NET Aspire dashboard which can be used with any Open Telemetry application, though the documentation states that it is designed as a “development and short-term diagnostic tool,” partly because telemetry is held in memory and not persisted; old data is discarded when limits are reached. Another issue is security, which requires further attention if the dashboard is used outside a developer environment. 

Microsoft may be in two minds about adapting the dashboard for production since it may not want it to compete with paid Azure services. For example, this post describes how to use it with Azure Container Apps but adds that it is not intended to replace the Azure Application Insights service or other APM (Application Performance Monitoring) tools.

Aspire does have momentum, with one indication being the number of integrations that are available for third-party products, now including Apache Kafka, Elasticsearch, Keycloak identity and access management, Milvus vector database, RabbitMQ and Redis. A community toolkit adds support for hosting applications using Java, Bun, Deno, Go, Rust and more, as well as integration with SQLite. AWS has a project integrating Aspire with its cloud services.

That said, some aspects of Aspire are not yet mature, particularly in the still-evolving deployment story.

Read Entire Article