Tactics for Building Background Services in .NET
summary
Compares concrete tactics: using IHostedService for reusable background loops (demo deletes temp files), installing as a Windows Service or Systemd unit, running hosted services inside ASP.NET Core, scheduling with Quartz, using HangFire with a SQL-backed HangFire UI and automatic retries, and moving to Azure Functions for cloud scale (example: processing 4 million items in ~30 seconds). Notes pitfalls: SMTP caused duplicate charges, terabytes of forgotten blobs prompted a cleanup job, HangFire needs a durable store (SQL) and can be separated into job servers.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 7:30Speaker introduction
- 10:42Why background services matter
- 11:25Types of background tasks
- 14:17Hosting options
- 16:43Introducing .NET hosted services
- 20:55Building Windows services
- 22:19Demo: Windows service
- 26:56Windows services pros and cons
- 29:03ASP.NET Core hosted services
- 30:06Demo: ASP.NET Core service
- 32:41Scheduling with Quartz.NET
- 34:48Demo: Quartz.NET
- 39:45Introducing Hangfire
- 41:55Demo: Hangfire setup
- 51:37Hangfire pros and cons
- 53:05Azure Functions for tasks
- 55:10Demo: Azure Functions trigger
- 58:44Azure Functions pros and cons
- 59:26Best practices and closing
related talks
01h 06mThe Background on Background Tasks in .NET 6
50mA Deep Dive on Running Background Tasks in .NET Core
01h 01mASP.NET Basics for Experts
01h 01mFive Azure services every developer should know
01h 01mWhy your ASP.NET Core application won't scale
01h 02mGetting the best out of ASP.NET Core in Azure
51mLifting and Shifting Legacy Web Services to Microservices in Azure Service Fabric
46mDeveloper Fundamentals of Serverless.NET Development with Azure Durable Functions
