My FNZ Studio Version

System Maintenance

Latest Update: 04.10.2022 |
Recipe
2024
2023
2022.2
2022.1
11
10
9
8
7

Problem

In the context of its Disaster Recovery procedures, my company wants its Platform installation to be highly available and geographically distributed. What kind of architectural set-up do we need?

Solution

Before examining the possibilities of a distributed installation across several data centers, we need to first consider a standard implementation over a cluster of computing nodes. This architecture is motivated by performance needs. Adding disaster recovery is addressed separately. When it comes to disaster recovery, we recommend an active-passive set-up.

Cluster

Among the foremost objectives of any Platform installation are:

  • Performance — the ability to respond to computing requests in a timely manner.
  • Scalability — the ability of the installation to adhere to its performance objectives as the workload increases.
  • Availability — the ability of the installation to continually respond to requests. Obviously, platform and network failures compromise availability.

Two different approaches can be taken to satisfy performance and scalability: scale-up and scale-out. In the scale-up approach, the computing resources of the platform are increased (e.g. by adding more memory, faster CPUs, faster disks, etc.). This approach is also known as "vertical scalability".

In the scale-out approach, the platform is run over a number of computing nodes. The nodes are connected together using a high-speed network connection, and the resulting architecture is called a cluster. A load balancer permits nodes of the cluster to share the computing requests between themselves. Scalability is achieved since it is easy to physically add a new node to the cluster, and doing so permits existing nodes to offload work to the new node. This approach is also known as horizontal scalability. Horizontal scalability is used, as illustrated in Figure A:


Figure A: Horizontal Scalability

The cluster has "N" computing nodes, all of which share a persistent storage. The three main characteristics of the cluster are:

  • Each node runs a Platform instance. This is a Java application server with the Platform framework bundled inside of a Java servlet.
  • Each node runs Hazelcast, which implements a Java-based distributed memory layer between all of the nodes. This enables any process Object created on one instance to be copied and stored to other nodes. An Object can be a Process Instance token set, Process data (value store), or any Object needed for a Process Instance to run. This means that a Process Instance running on one node can be run from another node of the cluster if the first node is taken down (so long as it does not rely on data in local caches or node-local file systems).
  • The Persistent Storage contains, among other things, Business Objects, message queues and Process Instance data and Value Stores for Processes earmarked as being "persistent" (which is any process that contains at least one Swimlane). Persistent Process data is saved to the Persistent Storage every 10 seconds. Thus, this storage acts as a secondary backup for Process Instances, and as a general backup for the cluster. The Persistent Storage is implemented using a cluster file system or using a decentralized database like Apache Cassandra.

The goal of the cluster is to respond to performance demands. It has an inherent amount of failure tolerance since Hazelcast can detect the departure of an instance from the cluster, and reorganize the backup of objects in consequence.

Even though there is a single Persistent Storage for the whole cluster, storage systems like Cassandra do integrate data replication mechanisms to maximize availability. Persistent Storage is not a single-point of failure since the Hazelcast layer can continue functioning when Persistent Storage is down. The objects stored in the cluster are secondary backups: Objects’ primary backups are stored in the Hazelcast memory layer of other nodes.

Disaster Recovery

The replication mechanisms inside of the cluster are not sufficient to survive a major failure at the data center. Most big companies today have a Business Continuity plan in place, which contains the technical and operational procedures needed for business to survive a catastrophic event like an earthquake, fire, or terrorist attack.

Disaster Recovery requires that an IT installation be distributed over a large geographical area. In the event of a disaster in one area, the installation can continue to run from a safe area. This essentially means that we replicate the cluster. In the following example, we have two clusters, one in Italy and one in Ireland.

When a cluster is replicated, there are two alternative modes of operation: active-passive replication as shown in Figure B, and active-active replication as shown in Figure C.

Recommended configuration for Disaster Recovery: Use an active-passive cluster replication strategy.

In the active-passive set-up, one cluster acts as the cluster that all users connect to. The second cluster is only used during disaster recovery. In Figure B, the primary site is in Italy. The site in Ireland only takes over during disaster recovery.


Figure B: Active-passive set-up

In the active-active set-up shown in Figure C, all clusters are continuously active. Users connect to the cluster "nearest" to them. A cluster acts as a back-up of another cluster, and one cluster becomes the primary cluster in the event of a disaster at another cluster's site.

This approach involves more work than the active-passive approach, as back-ups of the Persistent Storage are made in both directions. When applied to the Platform architecture, the Hazelcast distributed memory layers of each cluster are kept independent.


Figure C: Active-active set-up

An active-active mode of operation might seem attractive on the surface, since all of the computing resources are utilized under normal operation. However, on virtualized infrastructures, passive nodes are not consuming real CPU cycles. The nodes needed are activated ("elastically") only when they are truly required.

Theoretical Guidelines – the CAP Theorem

Guidelines from the CAP Theorem (PDF), formulated by Berkeley professor Eric Brewer in 2000, help justify our choice of the active–passive configuration.

The "CAP" in the title stands for Consistency, Availability and Partition Tolerance:

  • Consistency is the property that a data read in the system is guaranteed to return the most recent write to that data.
  • Availability is the property that a non-failed node can answer a data read or write request.
  • Partition tolerance is the property that a distributed system can continue to serve requests even in the presence of network partitions.

The theorem basically states that you can have at most two of the CAP properties in a distributed system. For instance, in the event of a network partition, a write to a data in a node of one partition is not reflected in a cached version of that data in another partition. This compromises consistency, since a read in the second partition does not return the most recent write. To achieve consistency, we require the end to the network partition, but waiting for this compromises availability.

In practice, network partitions are inevitable and unavoidable. So the CAP theorem is essentially saying that we need to favor availability over consistency, or to favor consistency over availability. Both approaches are taken in today's distributed systems. Let's consider the case of availability over consistency first.

DIRTy Applications: Availability over Consistency

Data-intensive, real-time (DIRTy) applications consume and produce huge volumes of data. Examples of these applications in the business domain include Big Data analysis of social media feeds to establish market trends, analyzing customer buying patterns or financial index trends, etc. The key characteristics of these applications are the following:

  • Large volumes of data are processed. Data is distributed to nodes to parallelize the processing in the interests of performance.
  • There is a low level of collaboration between nodes. Each node can consume and produce data independently of others. New data can then be copied towards other nodes.
  • Calculations on nodes are repeatable — if one node fails while producing its results, we can simply restart the calculations on other nodes.
  • The programming paradigms reflect this low level of collaboration. Interactions of programs with the persistent storage are local, and seek to manage data produced by the calculations. The major programming model used is Map/Reduce (where large numbers of independent workers produce new data in the map phase, which is reprocessed more collaboratively in the reduce phase), and the popular storage paradigm is NoSQL (where availability is prioritized and the consistency properties typical of relational databases are relaxed).

From the CAP Theorem perspective, DIRTy applications clearly prefer availability over consistency in the event of network partitions. In the context of a cluster architecture, this is best achieved with the active–active setup. The clusters are continuously available. Inconsistencies arising during network partition are tolerated for the duration of the partition.

Business Process Applications: Consistency over Availability

Business process applications present characteristics that are quite opposite to data intensive applications.

  • Business processes are not data intensive applications. The data processed are generally extracted from the system of records of the businesses running the applications, e.g. the client and accounts database. The nature of the computations are standard database CRUD operations on these records.
  • There is a high level of collaboration between nodes. Business applications are multi-user and workflow-oriented (e.g. a front-office employee sends a dossier to his manager for processing), and user sessions process objects from the node where users are logged in. Objects are thus actively shared between nodes, and this is one reason why the Platform architecture employs the distributed memory sharing layer of Hazelcast: Reads issued on objects can be serviced in shorter time due to data locality.
  • Calculations on nodes are not repeatable – if a node fails while processing data, it is generally not acceptable to ask business users to repeat the tasks from the failed node.
  • The programming paradigms employed by business applications reflect this high level of collaboration. Rule-based models like BPMN are generally used to describe the dynamic flow of control in the application. The system of records is generally implemented with relational databases with ACID guarantees.

From the CAP Theorem perspective, workflow applications clearly prefer consistency over availability in the event of network partitions. In the context of a cluster architecture, this is best achieved with the active-passive setup. The clusters might be continuously available, but forcing all users to a primary cluster means that data is consistent on that cluster, even though network partition yields unavailability to those outside of the active cluster's partition.

A further reason for avoiding the active-active approach in our context is that the business object repositories of each cluster would be populated with the business objects of the other cluster's applications. This would inevitably require that storage at each site integrates, potentially costly, error detection mechanisms to prevent corruption if the other clusters' storage fails.

One question concerns how the Hazelcast layers interact. In our proposed solution, each cluster has its own Hazelcast distributed memory layer, and there is no interaction between each. Hazelcast WAN solution does aim at replicating cluster data over wide-area networks, and we are currently examining this solution. In the example of Figure D, there is a single distributed map over the two clusters. The nodes in the Italy cluster keep back-ups on the Ireland cluster.


Figure D: Single distributed map

This approach has the advantage that the architectural set-up is conceptually the same as the set-up for the standard cluster architecture. Yet this approach cannot be recommended for two reasons:

  • The latency involved in communicating between the Hazelcast layers on the instances could be too expensive for it not to have a serious impact on the performance of the platform.
  • Network partitions impede Hazelcast from making backups on other nodes and from implementing the distributed locking protocol. This means that the Hazelcast layer would still need to ensure that each node maintained a backup of its objects on other nodes within the same cluster.

Comments

Questions and explanations regarding strategy

© 2026 Appway AG. All Rights Reserved