Clustering
Run multiple instances to distribute workloads
bun add @stricjs/clusterimport { Router, macro } from '@stricjs/router';
import { spawn, worker } from '@stricjs/cluster';
if (worker) {
const app = new Router().get('/', macro(
() => new Response('Hi')
));
Bun.serve(app);
} else spawn(4);Last updated