Skip to main content

Multi-cluster Storage for Row Record

Worksheet is the module with the largest volume of application core data in HAP, as described in Application Data Store Architecture, you can see that each worksheet physically corresponds to a database table. In MongoDB, there is an upper limit to the number of tables (Collection) that can be created in each database instance. Though this upper limit can be modified, considering the resource consumption of the database instance itself, it is not recommended to set it too large. With the increase of tables, you can choose to separate the database in the current cluster or choose a new cluster, but separating databases in the same cluster still consumes resources of the current cluster, which is not a good choice in the long run, so HAP currently chooses a multi-cluster mode.

The implementation is based on a routing table (table id + cluster instance number of the row record database) that lists in which cluster instance the corresponding row record database table for each worksheet is stored.