-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Problem
In a production environment there are generally multiple Clay instances running at one time, whether it be multiple servers/containers or even a cluster on a single instance. At startup time Clay bootstraps data for components/sites, something we only need/want to run on one individual instance in a cluster/deployment group.
Proposal
Add semaphore support to the storage API, allowing whichever storage module is chosen to dictate how the data is stored. The data we might send across:
- Which node has begun bootstrapping. Could be determined with the
osmodule using a hostname/pid combination to generate the key. - Which deploy is being handled. Can we rely on the package.json version of the clay instance? Multiple environments are not always going to see this increment
- The state of the startup process: Not started, running, finished, failed? 0, 1, 2, 3?
Questions
- What happens if the startup process fails and needs to be restarted?
- Should plugins be able to use the same semaphore data to determine how they startup? For example, amphora-search does not ALWAYS need to check for the presence of indices on every Clay instance.
Metadata
Metadata
Assignees
Labels
No labels