Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code to Cloud with .NET Aspire

David Fowler
February 16, 2024

Code to Cloud with .NET Aspire

In this session, Distinguished Engineer David Fowler and .NET Product Architect Damian Edwards will talk about how .NET 8 makes building cloud-native apps easier than ever, with powerful new features to turbocharge the development experience.

David Fowler

February 16, 2024

More Decks by David Fowler

Other Decks in Programming


  1. What is it? .NET Aspire is an opinionated stack for

    building resilient, observable, and configurable cloud-native applications with .NET. It includes a curated set of components enhanced for cloud- native by including service discovery, telemetry, resilience, and health checks by default. Combined with a sophisticated but simple local developer experience, .NET Aspire makes it easy to discover, acquire, and configure essential dependencies for cloud- native apps on day 1 as well as day 100, for new and existing .NET apps using .NET 8+.
  2. But what is it? • .NET Aspire is a “stack”

    that aims to make cloud native development easier for .NET developers.
  3. How we got here: Fundamentals • Microsft.AspNetCore.*, • APIs •

    gRPC • SignalR • Microsoft.Extensions.* • Hosting • Configuration • Dependency Injection • IHttpClientFactory • Open Telemetry support (ILogger, Activity, Meter) • Worker Services • Health Checks • YARP • Container Build • …
  4. How we got here: Project Tye R e a c

    t i o n People loved the developer experience – orchestration, containerization, the dashboard – but saw no real value in the K8S deployment part. C u s t o m e r E x p e r i e n c e • YAML file to describe solution/topology • Developer dashboard • Run as containers or processes • Deploy directly to K8S via a temporary manifest Go a l Make building and deploying .NET cloud apps running on Kubernetes trivial.
  5. How we got here: 1st Party New Libraries filling gaps

    or enhancing our existing libraries • Libraries like log redaction and resiliency • Many of these shipped in Microsoft.Extensions.* as part of .NET 8 Glue libraries • Customize a dependency or wrap it to meet the team’s needs • Configure or wrap Polly, or Redis connections • Integrate w/ASP.NET Core DI After evaluating large amounts of internal libraries written to help teams build services with millions of active users, we observed that these libraries fell into 2 broad categories:
  6. What is missing? • How do we put it all

    together? • Service Discovery (talk to services using friendly names) • High Quality client libraries • Available in DI container • Configurable (via IConfiguration) • Resilient (the network is unreliable) • Observable (logs, traces, metrics, health) • Testable • Project templates that put it all together • Instructions for how to use the Lego pieces together
  7. What was missing? • Running multiple services locally (aka Orchestration)

    • Ability to describe dependencies on local or remote services • Can’t be cloud native without support for the cloud • We needed first-class support for Kubernetes, Azure, AWS, GCP etc.
  8. .NET Aspire: Principles • Build for developers • Build on

    our existing stack • Don’t re-invent the world. • Build new features into the right layers • We will build new capabilities, but general-purpose features will be usable outside of aspire. • The stack must work well together, but make sure they aren’t tightly coupled. • Choose how much of the stack you want to adopt • More glue less abstractions • Contribute to the community where we can
  9. Timeline • Preview 3 (Today) • Preview 4 • Preview

    5 • … • GA (before “Summer”, not Australian Summer…)