Version v1.x
MySQL
Available in
.NET
Node.js
Python
Configure DurableStack with MySQL for durable shared-state execution.
MySQL is a durable provider option for teams already operating MySQL in production.
It supports shared worker coordination through DurableStack's standard run/lease contract.
Registration
using DurableStack.Hosting.DependencyInjection;
var connectionString = "Server=localhost;Port=3306;Database=durable_stack;User ID=root;Password=postgres;SslMode=Preferred";
builder.Services.AddDurableStackMySql(connectionString, options =>
{
options.WorkerName = $"orders-api-{Environment.MachineName}-{Environment.ProcessId}";
});
import { createDurableStackMySql } from "durablestack";
const { runtime } = await createDurableStackMySql(
{ connectionString: process.env.MYSQL_URL! },
{
workerName: `orders-api-${process.pid}`
}
);
Operational notes
- Validate throughput and lock behavior with expected worker count.
- Prefer secure transport and least-privilege database credentials.
- Keep retention settings aligned with storage cost and debugging needs.