Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Packaging for a clustered environment is identical to packaging for a single-VM environment, except for the additional requirement of including a plan.xml file in the contribution META-INF directory. The plan file maps a deployable composites composite (i.e. composites a composite specified for deployment in the sca-contribution.xml manifest) to a zone as shown below:

Code Block
xml
xml
<plan xmlns:test="urn:org.fabric3.test" name="testPlan">
    <mappings>
        <mapping deployable="test:Composite1" zone="zone1"/>
        <mapping deployable="test:Composite2" zone="zone2"/>
    </mappings>
</plan>

Single Contribution Deployment

A single contribution can be deployed to one zone or multiple zones. It is important to note that zones in Fabric3 are homogenous. That is, each runtime in the zone acts as a replica running with the same configuration and hosting the same services. Consequently, If a contribution is deployed to one zone, it will be horizontally scaled as a single unit as illustrated in the following diagram:


All services will run   

Image Removed

 

Image Removed

 This single contribution deployment to the same zone is the most common cluster topology supported by Fabric3. It is simple to setup, easy to maintain, and straightforward to scale-out. Sometimes however, it may be necessary to scale-out selected services in a contribution. This is done by targeting deployable composites to different zones, as shown below:  


Image Added

Deploying composites to different zones is done in the plan.xml file. The following plan specifies the zones for the two composites in the previous picture:

Code Block
xml
xml
<plan xmlns:test="urn:org.fabric3.test" name="testPlan">
    <mappings>
        <mapping deployable="test:Composite1" zone="zone1"/>
        <mapping deployable="test:Composite2" zone="zone2"/>
    </mappings>
</plan>

Multi-Contribution Deployment

The most common deployment topology for multi-VM domains consists of multiple contributions deployed to individual zones. This setup is illustrated by the following picture:

Image Added

Packaging an application as multiple contributions and deploying them to separate zones provides greater modularity and loose coupling: not only are implementation classes isolated, but the scaling characteristics of subsystems are as well. This makes it possible to more accurately scale-out by adding more processing power to the application services which are under the most load.