Many servers
One process serves any number of servers. Most wisps never need more.
When one process can no longer keep up, split your wisp into slices: set how many on its page at developer.woosh.no, up to 4, and one more for each 1,000 servers your wisp is in past 4,000, and run one process per slice. Each server belongs to one slice, always the same one, so a server’s events stay together and in order.
var options = WispOptions.FromEnvironment() with{ Slice = 2, CursorFile = "slice-2.json",};await using var wisp = new WispClient(options);In a .NET host, set Wisp:Slice (Hosting your wisp).
const wisp = new Wisp({ id: process.env.WISP_ID!, secret: process.env.WISP_SECRET!, slice: 2, cursor: "slice-2.json",});One program can run every slice, each process started with its own slice in its environment (Hosting your wisp).
Give each slice its own place to keep (Running well).
WispClient.SliceOf(server, slices) (in TypeScript, Wisp.sliceOf(server, slices)) says which
slice a server is in, for routing work of your own, such as a database per slice.
Changing the number
Section titled “Changing the number”Set the new number at developer.woosh.no, then start one process for each new slice and stop the old ones. Each new process catches up with what it needs from what came before (Reading what came before). Deploy each slice without a gap as you would one process (Running well).
Writing your own library? How a server picks its slice is in Slices, raw.