State Backed

State Backed

Go from signing up to deploying your state machine backend in 10 minutes or less.

Choose a plan below or continue with our forever free plan, which provides 1,000 transitions and 10,000 reads every month with 7 day transition retention.

Check out our docs and download the smply client to get started.

Understand pricing and limits

Overview

  • All machines are defined as XState machines. Just write a javascript file that default exports an XState state machine and an allowRead and allowWrite function.
  • All plans allow you to create as many machines with as many versions as you like. A machine version refers to specific code that you deployed.
  • All plans allow you to create as many instances of your machines as you like. You might make an instance per user or per document. However, every machine instance performs at least one transition when initializing.
  • Machine instances execute transitions in response to events you send them or schedule. Machines may perform multiple transitions for a single event if, for instance, you create a service that causes a transition when it completes.
  • You can read the state and public context of a machine at any time. Any data you store under the 'public' key is considered public context.

Limits

  • When you send an event, your machine has 10 seconds to complete any work it needs to do to reach a steady state. A steady state is defined as no running services. After 10 seconds, we will stop running services and preserve the state. Error events will be delivered for stopped services prior to executing the next event.
  • You may use delayed events. They will be persisted and the event will be delivered to your machine instance in an observably exactly once fashion but, in rare cases, delivery may be delayed.
  • Any delayed event scheduled within the 10 second work window will run within the original work window as part of the original event's processing.
  • The context for an instance cannot exceed 400kb of uncompressed JSON.
  • One transition consists of up to 10kb of uncompressed JSON context. A transition with an 11kb uncompressed JSON context would count as 2 transitions.

Pricing dimensions

  • Every XState macro-step (essentially any time onTransition would be called) is considered a transition. If an event causes a transition to a state that always transitions to a third state, that single event would cause 2 transitions. Additionally, transitions that result in an uncompressed JSON context size > 10kb are counted as 1 transition for every 10kb of context.
  • Every call to GET api.statebacked.dev/machines/{your-machine}/i/{your-instance} will count as 1 read. Reads that occur as part of sending an event (calls to POST api.statebacked.dev/machines/{your-machine}/i/{your-instance}) are not counted as reads (they are counted against transitions).
Message [email protected] with any questions.