<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q" -->

---
title: Health Checks in ASP.NET Core: A Complete Guide (.NET 10)
description: A comprehensive guide to implementing health checks in ASP.NET Core on .NET 10, covering the full spectrum from basic setup to production-grade patterns. Key...
canonical: https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Health Checks in ASP.NET Core: A Complete Guide (.NET 10) | daily.dev
og:description: A comprehensive guide to implementing health checks in ASP.NET Core on .NET 10, covering the full spectrum from basic setup to production-grade patterns. Key...
og:url: https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q
og:image: https://api.daily.dev/og/posts/uVHi3T78q.png
og:image:alt: Health Checks in ASP.NET Core: A Complete Guide (.NET 10)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Health Checks in ASP.NET Core: A Complete Guide (.NET 10)

**[Code with Mukesh](https://daily.dev/sources/codewithmukesh)** · [@iammukeshm](https://daily.dev/iammukeshm) · 24 min read · 14 upvotes · 1 comments

## Summary

A comprehensive guide to implementing health checks in ASP.NET Core on .NET 10, covering the full spectrum from basic setup to production-grade patterns. Key topics include: returning structured JSON responses, adding database (EF Core, PostgreSQL) and Redis checks, writing custom IHealthCheck implementations with the Degraded state, and the critical liveness vs. readiness vs. startup probe split. The guide explains how putting a database check in a liveness probe can trigger cascading restart loops across all replicas. It also covers graceful traffic draining before pod shutdown using AddApplicationLifecycleHealthCheck and a preStop sleep hook, probe cost arithmetic (up to 138,000 dependency round trips per day at idle), and mitigation via ShortCircuit, output caching, and IHealthCheckPublisher. A notable finding: the Health Checks UI 9.0.0 package pulls in a KubernetesClient version with a moderate CVE, and its EF Core 8 InMemory storage provider crashes at runtime when used with EF Core 10 unless explicitly pinned.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://codewithmukesh.com/blog/health-checks-in-aspnet-core>

## Questions this post answers

### Why does my ASP.NET Core app crash with MissingMethodException on startup after adding the Health Checks UI on EF Core 10?

The AspNetCore.HealthChecks.UI.InMemory.Storage package (version 9.0.0) pins Microsoft.EntityFrameworkCore.InMemory to 8.0.11, while Npgsql and the Microsoft health check package pull EF Core core to 10.0.0, so an EF Core 8 provider ends up running against an EF Core 10 core and calls an internal method whose signature changed. Fix it by adding an explicit package reference to Microsoft.EntityFrameworkCore.InMemory version 10.0.0.

_Teams juggling EF Core version mismatches can track fixes like this one on daily.dev before they hit production._

### Should a database health check go in the Kubernetes liveness probe or the readiness probe?

Database and other dependency checks belong in the readiness probe, never liveness. Putting a database check in liveness means a brief database failover fails every pod's liveness check simultaneously, causing Kubernetes to restart every pod at once, which then slams the recovering database with fresh connection attempts and triggers a cascading restart loop that outlasts the original outage.

_Developers configuring Kubernetes probes can compare approaches like this on daily.dev before shipping a broken rollout._

### How much overhead do Kubernetes health check probes actually add to a database?

Health check results are never cached, so every probe request executes every registered check from scratch. With four replicas probing every 10 seconds and four dependency checks each, that's 96 dependency round trips per minute, or roughly 138,000 per day, even with zero user traffic. Mitigations include calling .ShortCircuit() on the endpoint, enabling short-window output caching with AllowCachingResponses, or pushing status via IHealthCheckPublisher instead of polling.

_Engineers tuning probe intervals and database load can dig into tradeoffs like these on daily.dev._

## Similar posts on daily.dev

- [Green Dashboard, Dead Application — Daily DevOps & .NET](https://daily.dev/posts/green-dashboard-dead-application-daily-devops-net-utgxsxuen) · We Are .NET · 1 upvotes · 0 comments
- [Before Your .NET API Goes to Production, Check These 8 Things](https://daily.dev/posts/before-your-net-api-goes-to-production-check-these-8-things-h5svp9eu5) · Waseem .NET Newsletter · 15 upvotes · 1 comments
- [When “Healthy” Isn’t Healthy: Rethinking Kubernetes Health Checks for Real-World Systems](https://daily.dev/posts/when-healthy-isn-t-healthy-rethinking-kubernetes-health-checks-for-real-world-systems-pg3f8xgmn) · Cloud Native Now · 0 upvotes · 0 comments
- [Privacy Health Checks: Beyond Database Connectivity — Daily DevOps & .NET](https://daily.dev/posts/privacy-health-checks-beyond-database-connectivity-daily-devops-net-gsnmgndoy) · We Are .NET · 1 upvotes · 0 comments
- [Cloud Bits: Beyond Pings – Checks for Cloud-Native Reliability – Distributed Computing Musings](https://daily.dev/posts/cloud-bits-beyond-pings-checks-for-cloud-native-reliability-distributed-computing-musings-sy2dxsdcp) · Distributed Computing Musings · 0 upvotes · 0 comments

---

Tags: [#kubernetes](https://daily.dev/tags/kubernetes), [#.net](https://daily.dev/tags/.net), [#aspnetcore](https://daily.dev/tags/aspnetcore)

[View this post on daily.dev](https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Health Checks in ASP.NET Core: A Complete Guide (.NET 10)","url":"https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q"},"datePublished":"2026-07-27T17:37:41.612Z","dateModified":"2026-09-13T20:00:16.210Z","description":"A comprehensive guide to implementing health checks in ASP.NET Core on .NET 10, covering the full spectrum from basic setup to production-grade patterns. Key...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5e21346e424f87da00a6b6dddd2d7658?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5e21346e424f87da00a6b6dddd2d7658?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Code with Mukesh","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Person","name":"Mukesh Murugan","url":"https://daily.dev/iammukeshm","image":"https://lh3.googleusercontent.com/a-/AFdZucr2UBIpOeVTWohK8XKuXPOutNG6hgyQMz7CYj7LEA=s100","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":800}},"commentCount":1,"discussionUrl":"https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":14},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"kubernetes,.net,aspnetcore","timeRequired":"PT24M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Code with Mukesh","item":"https://daily.dev/sources/codewithmukesh"},{"@type":"ListItem","position":3,"name":"Health Checks in ASP.NET Core: A Complete Guide (.NET 10)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/health-checks-in-asp-net-core-a-complete-guide-net-10--uvhi3t78q#faq","mainEntity":[{"@type":"Question","name":"Why does my ASP.NET Core app crash with MissingMethodException on startup after adding the Health Checks UI on EF Core 10?","acceptedAnswer":{"@type":"Answer","text":"The AspNetCore.HealthChecks.UI.InMemory.Storage package (version 9.0.0) pins Microsoft.EntityFrameworkCore.InMemory to 8.0.11, while Npgsql and the Microsoft health check package pull EF Core core to 10.0.0, so an EF Core 8 provider ends up running against an EF Core 10 core and calls an internal method whose signature changed. Fix it by adding an explicit package reference to Microsoft.EntityFrameworkCore.InMemory version 10.0.0. Teams juggling EF Core version mismatches can track fixes like this one on daily.dev before they hit production."}},{"@type":"Question","name":"Should a database health check go in the Kubernetes liveness probe or the readiness probe?","acceptedAnswer":{"@type":"Answer","text":"Database and other dependency checks belong in the readiness probe, never liveness. Putting a database check in liveness means a brief database failover fails every pod's liveness check simultaneously, causing Kubernetes to restart every pod at once, which then slams the recovering database with fresh connection attempts and triggers a cascading restart loop that outlasts the original outage. Developers configuring Kubernetes probes can compare approaches like this on daily.dev before shipping a broken rollout."}},{"@type":"Question","name":"How much overhead do Kubernetes health check probes actually add to a database?","acceptedAnswer":{"@type":"Answer","text":"Health check results are never cached, so every probe request executes every registered check from scratch. With four replicas probing every 10 seconds and four dependency checks each, that's 96 dependency round trips per minute, or roughly 138,000 per day, even with zero user traffic. Mitigations include calling .ShortCircuit() on the endpoint, enabling short-window output caching with AllowCachingResponses, or pushing status via IHealthCheckPublisher instead of polling. Engineers tuning probe intervals and database load can dig into tradeoffs like these on daily.dev."}}]}
```

