Load Balancing
Load balancing solves the issue of many simultaneous requests and their processing. More requests can be processed simultaneously by connecting several X4 Server instances behind a load balancing system. Thus, you can achieve higher computing power. This enables a high demand-driven scalability. However, it must be ensured that the shared data of the X4 systems is known to all systems. Therefore, there are different scenarios depending on the application.
Scenario I – Few Mainly Reading Database Accesses
If the processes contain mainly calculations or additional services are addressed, a load distribution can be realized over several X4 Servers, each of them managing its system database, and another database containing the shared data. Here, two expansion stages can be distinguished.
Simple – Direct database access
Figure: Direct database access
Access to the shared data can be managed directly via the database' access layer. This is the simplest solution to the problem and a good solution for small systems since the database itself cannot be easily decoupled.
Complex – Shared access via an X4 instance
Figure: Shared database access via an X4 instance
If the database should be decoupled, it is a good idea to insert a service layer between the database and the X4 Servers. It encapsulates the common database and thus makes the data storage layer exchangeable. This is important for larger systems in order to better guarantee maintainability, testability and integrity.
Scenario II – Shared Access via Message Queue
Figure: Shared database access via Message Queue
Another possibility to decouple the database is via a middleware. This is recommended for critical applications where no messages may be lost between the X4 Servers and the X4 Server of the shared database. The middleware ensures that messages are kept persistent until they have been processed by the recipient.