The Compute Modules feature is in beta and may not be available on all enrollments.
Compute modules enable you to run serverless Docker images in Foundry and horizontally scale them up or down based on load in your frontend applications (such as Workshop and Slate).
Some common use cases for compute modules include:
Compute modules are not recommended for:
Each compute module consists of a number of replicas. The number of replicas changes as the request volume changes.
Each replica contains the same set of one or many isolated containers. One container serves as the entry point, and it must implement a client that forever polls for events to process. The other containers can contain anything.
By default, there are few guardrails for setting up a many-container compute module. One suggested method is to have them communicate using standard networking protocols; another suggestion is to used shared volume mounts. Containers in the same replica can communicate via those methods (and more), but containers cannot communicate across replicas, and you should not rely on any state they may accrue.
To get started, see the guides for building a compute module in Foundry or for building a compute module on your local machine.