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. I used similar tools for years before building DurableStack -- so this isn't about declaring a winner, but about sharing where a newer option might fit your needs better.
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 two pain points while staying lightweight and database-native.
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.
- 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.
- 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 |
| Observability | OpenTelemetry + hosted platform | Built-in dashboard + extensions |
| Hosted monitoring/alerting | Yes (optional) | No |
| 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 multi-language support on the roadmap.
Hangfire remains an excellent choice for many applications -- especially simpler ones or teams already deeply invested in its ecosystem.
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 Repo: https://github.com/durablestackhq/durablestack-dotnet
- Docs & Quick Start: https://docs.durablestack.com
- 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.