dotnet / dotnet/aspnetcore

"CreateEmptyBuilder" but a little more robust

Open
#50,096 4 comments 0 reactions 0 assignees View on GitHub
api-suggestion area-networking
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

## Background and Motivation

I have a lot of microservices running on .net and one thing is very certain: they use a lot more memory than CPU... their are host on AKS and this is the big picture of my MEMORY OPTIMIZED pools:
image
One could argue that yeah, Azure could launch a VM set for 1cpu 8gb ram, but meanwhile, if I want to drive costs down on the hosting, I need to save memory...

Reading that "CreateEmptyBuilder" launches a app at 8.5MB brings tears to my eyes, because YESSSSS my teams will be able to run really slim microservices but also SHIIIIIIIIIT they will screw-up so bad counting on things that are usually there but won't be, like model mapping...

## Proposed API

I would like to propose the "CreateMinimalApiBuilder", with just enough to serve the API part of the "WeatherForecast" default template. Nothing else.

A alternative could be template where the builder is explicit and we could just delete/comment things out

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.