-
Notifications
You must be signed in to change notification settings - Fork 44
Flux runtime modes
Flux offers the following distinct runtime modes:
- Combined Mode
- Orchestration Mode
- Execution Mode
The Combined or Managed mode is the simplest of deployments that combines both the Orchestration and Execution modules into one runtime. This mode is suitable during Development, Functional testing and for teams that have small number of deployment units. In this mode, a single runtime comes up and loads up all deployment units into it. This also means this mode can cause issues for deployments that have conflicting classpath dependencies or in cases where the dependency libraries are too many. In this mode, resource isolation is at Task level where each Task has an execution Thread pool. You can run Flux Initializer in Combined mode like so (note there are no parameters i.e. combined mode is the default mode):
java -cp <classpath> com.flipkart.flux.initializer.FluxInitializer start
The runtime view of the Combined mode with embedded Orchestration and Executon modules and interaction with Flux clients is as depicted here :
The low level design sequence is as follows:
In the Orchestration Mode, the Flux runtime manages state for executing State Machines. This instance handles all data persistence for state transitions, Event data and the Re-driver's data storage. In this mode, the Flux Orchestrator can act as a gateway for executions that are delegated to another Flux runtime operating in Execution mode where the actual workflow and task executions happen. The Orchestration mode is always used in tandem with another Execution mode runtime and the points of integration/invocation is assumed to be a network load-balancer - typically an Elastic Load Balancer (ELB) infrastructure that routes requests to multiple Execution mode instances behind it. You can run Flux Initializer in Orchestration mode like so :
java -cp <classpath> com.flipkart.flux.initializer.FluxInitializer start orchestration
The Execution mode is used in tandem with an Orchestration mode Flux runtime instance; used to host & run Flux tasks in an isolated environment. The first degree of isolation is realized by separating all state management (in Orchestration runtime) and a shared task execution (Execution mode) runtime. The shared Execution runtime is useful where deployment units from multiple teams may be co-hosted on a single runtime. For further isolation, teams may deploy their own Execution runtime instances, fronted by an ELB. Team specific clusters allows for workload and infrastructure isolation, more control on deployment schedules.
You can run Flux Initializer in Execution mode like so :
java -cp <classpath> com.flipkart.flux.initializer.FluxInitializer start execution
The runtime view of separate Orchestration and Execution runtimes, along with typical client invocations is depicted below:
The low level design sequence is as follows: