LevelUp.Bifrost.Core
0.7.3
dotnet add package LevelUp.Bifrost.Core --version 0.7.3
NuGet\Install-Package LevelUp.Bifrost.Core -Version 0.7.3
<PackageReference Include="LevelUp.Bifrost.Core" Version="0.7.3" />
<PackageVersion Include="LevelUp.Bifrost.Core" Version="0.7.3" />
<PackageReference Include="LevelUp.Bifrost.Core" />
paket add LevelUp.Bifrost.Core --version 0.7.3
#r "nuget: LevelUp.Bifrost.Core, 0.7.3"
#:package LevelUp.Bifrost.Core@0.7.3
#addin nuget:?package=LevelUp.Bifrost.Core&version=0.7.3
#tool nuget:?package=LevelUp.Bifrost.Core&version=0.7.3
<h1> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs/brand/bifrost-lockup-dark.svg"> <img src="docs/brand/bifrost-lockup-light.svg" alt="Bifrost" width="300"> </picture> </h1>
Bifrost is a .NET library for running background jobs at a pace your app and its dependencies can handle.
Say 100 users request a PDF at once, and your renderer can handle 10 jobs at a time. If every request calls await RenderAsync(), all 100 can reach the renderer. With Bifrost, we can easily setup the following capabilities:
- Run up to 10 jobs at a time.
- Queue up to 50 more.
- Ask later callers to try again when the queue is full.
Register a typed handler and set your limits. Bifrost runs the jobs and lets you choose how to share worker capacity. You can give interactive jobs priority over batch work or keep one busy tenant from taking all the worker slots.
The default queue runs in your app’s memory. If accepted jobs need to survive a restart, use the optional PostgreSQL-backed service. Your app can confirm that a job is queued and let callers check its status later. On-demand and scheduled jobs can share the same worker pool.
Design
<a name="core-concepts"></a> <a name="priority-dispatch"></a>
Choose a dispatch policy
Each in-memory or PostgreSQL pool uses one policy. Delayed or blocked jobs wait. Cancelled jobs are skipped. Full queues reject immediate submissions unless you configure a cancellable wait.
| Dispatch | How it chooses the next job |
|---|---|
| FIFO | Start the oldest eligible job in the pool. |
| Keyed | Rotate among ready keys. Within the selected key, start the oldest eligible job. Set per-key concurrency limits. |
| Exact Priority | Rank across the pool by acceptance time adjusted for work class. Break ties by admission order. |
| Relaxed Priority | Approximate class priority by sampling queue heads. Use automatic stripe sizing or set the count explicitly. |
| Keyed Priority | Rotate among ready keys, then apply exact priority within the selected key. Interactive work can jump ahead within its key while other keys still get a turn. |
<a name="scheduling"></a>
From schedule to outcome
Both modes share one scheduling API. Quartz wakes the scheduler, and Bifrost admits scheduled work to the same pools as on-demand jobs. Apps without schedules can skip Quartz.
- Cadence. Five-field cron with UTC by default, intervals, or one-shots.
- Missed fires. After missing 09:01–09:03, skip all three, coalesce to 09:03, or replay each in order, up to 100.
- Full queues. Delivery retries until its admission deadline by default. You can configure immediate rejection.
- Tracking. A manual trigger returns an occurrence ID. After admission, the work ID tracks execution.
PostgreSQL recovers committed schedules and pending deliveries. Retrying an already admitted occurrence returns its original work ID. In-memory state ends on restart. Start durable deployments in a fresh namespace or empty store.
For the release candidate, see the dispatch and scheduling guide and its shared memory and PostgreSQL sample.
Packages
Bifrost targets .NET 10. Start with LevelUp.Bifrost and add the integrations you need.
| Package | Purpose |
|---|---|
LevelUp.Bifrost |
In-process queues, worker pools, dispatch, and typed handlers |
LevelUp.Bifrost.Core |
Orchestrator abstractions and options |
LevelUp.Bifrost.Concurrency |
Standalone concurrent priority queues |
LevelUp.Bifrost.Resilience |
Polly policies for submission and handler execution |
LevelUp.Bifrost.HealthChecks |
.NET health check integration |
LevelUp.Bifrost.OpenTelemetry |
Queue, worker, and handler metrics |
LevelUp.Bifrost.Scheduling |
Shared scheduling API and Quartz integration for in-memory and durable pools |
LevelUp.Bifrost.Scheduling.Core |
Shared schedule, cadence, and occurrence contracts |
LevelUp.Bifrost.Scheduling.Testing |
Fake-clock tools for testing schedule and delivery behavior |
LevelUp.Bifrost.Durable |
Durable work admission, execution contracts, and worker dispatch |
LevelUp.Bifrost.Durable.PostgreSql |
PostgreSQL storage for accepted work, execution attempts, and result references |
LevelUp.Bifrost.Durable.Quartz |
Clustered Quartz wakeups and durable occurrence delivery |
LevelUp.Bifrost.Durable.Http |
ASP.NET Core endpoints and hosting for durable execution |
LevelUp.Bifrost.Durable.Client |
Typed HTTP client for submitting work, checking status, and managing schedules |
Example
The Agent Framework sample runs one turn per chat session at a time while other sessions keep moving. It runs offline from a source checkout.
dotnet run -c Release --project samples/Bifrost.AgentFramework.Sample
The sample uses Keyed dispatch with one running turn per session. To give interactive turns priority over batch work within each session, select Keyed Priority for the pool and classify the turns by work class.
Build and contribute
Install the .NET 10 SDK specified in global.json. From a source checkout, build and run the tests.
dotnet build src/Bifrost.sln -c Release
dotnet test --solution src/Bifrost.sln -c Release
See the documentation index, releases, and Apache 2.0 license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (8)
Showing the top 5 NuGet packages that depend on LevelUp.Bifrost.Core:
| Package | Downloads |
|---|---|
|
LevelUp.Bifrost
Channel-based work orchestration library with autoscaling, resilience, health checks, and OpenTelemetry support. |
|
|
LevelUp.Bifrost.Resilience
Channel-based work orchestration library with autoscaling, resilience, health checks, and OpenTelemetry support. |
|
|
LevelUp.Bifrost.HealthChecks
Channel-based work orchestration library with autoscaling, resilience, health checks, and OpenTelemetry support. |
|
|
LevelUp.Bifrost.OpenTelemetry
Channel-based work orchestration library with autoscaling, resilience, health checks, and OpenTelemetry support. |
|
|
LevelUp.Bifrost.Scheduling
Channel-based work orchestration library with autoscaling, resilience, health checks, and OpenTelemetry support. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.3 | 75 | 12/3/2026 |
| 0.7.2 | 82 | 12/2/2026 |
| 0.7.1 | 169 | 11/30/2026 |
| 0.7.0 | 162 | 11/30/2026 |
| 0.7.0-rc.1 | 108 | 11/26/2026 |
| 0.6.3-rc.1 | 105 | 11/25/2026 |
| 0.6.2 | 176 | 11/13/2026 |
| 0.6.0 | 3,792 | 10/29/2026 |
| 0.5.2 | 19,183 | 7/7/2026 |
| 0.5.1 | 870 | 6/22/2026 |
| 0.5.0 | 2,396 | 6/16/2026 |
| 0.4.0 | 1,125 | 3/16/2026 |
| 0.3.5 | 254 | 3/15/2026 |
| 0.3.0 | 629 | 3/3/2026 |
| 0.2.0 | 190 | 3/3/2026 |
| 0.1.0 | 619 | 2/3/2026 |