---
title: Overview
description: Start here for a practical, production-safe DurableStack configuration baseline.
order: 31
available_in: [dotnet, nodejs]
---

DurableStack configuration is designed to be explicit, predictable, and easy for future developers to reason about.

For most teams, the right approach is:

- set important runtime options close to runtime creation/registration
- keep values in one visible startup location
- tune only after observing behavior in staging/production

## Configuration flow

- Select the storage provider.
- Set worker identity and polling behavior.
- Configure retry and lease semantics.
- Configure recurring job behavior.
- Add advanced options only when needed.

## Recommended baseline

:::code-group
```csharp
using DurableStack.Core.Options;
using DurableStack.Hosting.DependencyInjection;

builder.Services.AddDurableStackPostgres(connectionString, options =>
{
    options.WorkerName = $"orders-api-{Environment.MachineName}-{Environment.ProcessId}";
    options.JobActivation = DurableStackJobActivationMode.ScopedPerExecution;

    options.PollIntervalSeconds = 5;
    options.PollJitterEnabled = true;
    options.PollJitterRatio = 0.2;
    options.BatchSize = 50;
    options.MaxConcurrentRuns = 10;
    options.LeaseDurationSeconds = 30;

    options.RetryDelay = TimeSpan.FromSeconds(5);
    options.RetryMaxDelay = TimeSpan.FromMinutes(10);
    options.RetryJitterEnabled = true;
    options.RetryJitterRatio = 0.2;

    options.Recurring.CatchUpPolicy = RecurringCatchUpPolicy.SkipMissed;

    options.Retention.Enabled = true;
    options.Retention.RunRetentionSeconds = 86400;
    options.Retention.SweepIntervalSeconds = 300;
    options.Retention.DeleteBatchSize = 1000;
});
```

```typescript
import { createDurableStackPostgres } from "durablestack";

const { runtime, closeStore } = await createDurableStackPostgres(
  { connectionString: process.env.DATABASE_URL! },
  {
    workerName: `orders-api-${process.pid}`,
    pollIntervalSeconds: 5,
    pollJitterEnabled: true,
    pollJitterRatio: 0.2,
    claimBatchSize: 50,
    maxConcurrentRuns: 10,
    leaseDurationSeconds: 30,
    retryDelaySeconds: 5,
    retryMaxDelaySeconds: 600,
    retryJitterEnabled: true,
    retryJitterRatio: 0.2,
    recurring: {
      catchUpPolicy: "SkipMissed"
    },
    retention: {
      enabled: true,
      runRetentionSeconds: 86400,
      sweepIntervalSeconds: 300,
      deleteBatchSize: 1000
    }
  }
);

await runtime.start();
```
:::

For full option-level details, see [Configuration Schema](../reference/configuration-schema).
