DurableStack vs Hangfire: Horizontal Scaling & Modern Observability
A practical comparison of DurableStack and Hangfire for teams that need safer horizontal scaling and better production observability in distributed .NET environments.
If you've worked with background jobs in .NET, you've probably used (or at least considered) Hangfire. It's a battle-tested library that's helped countless teams move heavy work out of the request path. For modern, web-hosted systems that run on relational databases and scale horizontally, though, DurableStack is usually the better default.
Why Look Beyond Hangfire?
Hangfire excels at fire-and-forget, delayed, and recurring jobs with a familiar API and solid SQL Server (or other) storage. However, as applications grow -- especially distributed ones -- teams often run into friction around scaling workers horizontally and observing what's actually happening across instances.
DurableStack was built from the ground up to address these pain points while staying lightweight and database-native, with a four-table SQL footprint.
1. Seamless Horizontal Scaling (No Code or Infra Changes)
One of the biggest operational headaches with many job systems is safely running multiple worker instances without duplicate work, stuck jobs, or complex setup.
DurableStack's approach:
- Lease-based distributed execution with heartbeats and automatic reclaim on failure.
- Works out of the box with your existing database (PostgreSQL, MySQL, SQL Server, SQLite, or even InMemory for dev).
- No Redis, RabbitMQ, or extra queue infrastructure required.
- Four lightweight SQL tables for durable coordination state.
- Add more worker instances (on the same machine or across a cluster) without changing code or deployment scripts.
You get true distributed safety by default. Spin up more pods/instances as load increases -- DurableStack handles claiming and coordination cleanly.
Hangfire supports distributed scenarios too (especially with its storage options), but often requires more careful configuration around polling, locks, and scaling to avoid overlap or performance issues at higher throughput.
2. Modern Observability: Hosted Platform + OpenTelemetry
The classic built-in dashboard is useful for small setups, but falls short in production distributed environments. You want centralized visibility, historical trends, alerting, and integration with your existing monitoring stack.
DurableStack offers:
- First-class OpenTelemetry integration for traces, metrics, and custom event sinks.
- An optional hosted observation platform (free tier available at app.durablestack.com) with dashboards, alerting rules, job history, and insights across all your workers.
- Worker-offline alert templates that can provide early warning when instances disappear, often before customer-facing impact becomes obvious.
- No need to expose or manage your own dashboard instance.
This means you can monitor everything from one place, set up notifications for failed/recurring jobs, and get better visibility into performance without extra ops work.
Hangfire's dashboard is powerful for a single app but typically requires self-hosting and additional effort to centralize across multiple services or environments.
Side-by-Side Comparison
| Feature | DurableStack | Hangfire |
|---|---|---|
| Database-native | Yes (multiple providers) | Yes (strong SQL Server support) |
| Horizontal scaling | Built-in lease/heartbeat model | Supported with config |
| No extra infra (queues) | Yes | Often not required but common |
| SQL footprint | Four lightweight tables | Larger framework/storage footprint |
| Observability | OpenTelemetry + hosted platform | Built-in dashboard + extensions |
| Hosted monitoring/alerting | Yes (optional) | No |
| Instance-down alerts | Built-in templates (optional) | Custom implementation |
| Recurring + durable jobs | Yes (cron with timezone support) | Yes |
| Learning curve | Familiar .NET patterns | Very approachable |
When to Choose DurableStack
- You're running (or planning) multiple worker instances and want scaling to "just work."
- You want better production visibility and alerting without managing another dashboard.
- You prefer staying close to your existing database and avoiding additional messaging infrastructure.
- You're looking for a modern, actively evolving tool with .NET and Node.js support available today.
Hangfire remains a strong choice for teams already deeply invested in its ecosystem. For most horizontally scaled SQL-backed apps, DurableStack typically yields better reliability semantics and lower operational drag.
Try It Yourself
Getting started is straightforward:
dotnet add package DurableStack.Hosting
services.AddDurableStack(options =>
{
options.UsePostgreSql(connectionString);
// Optional: Connect to hosted observability
// options.TenantId = "...";
});
- GitHub: https://github.com/durablestackhq
- Docs & Quick Start: https://docs.durablestack.com/docs/v1
- Hosted Observation Platform: https://app.durablestack.com
I'd love your feedback -- especially if you've used Hangfire in production. Drop a comment, open an issue, or reach out if you try it.