Skip to main content

Application Data Storage Architecture

HAP application data mainly includes modules such as worksheets, workflows, reports, roles, and permissions. This data is stored in MongoDB and uses MongoDB's flexible BSON document structure to support dynamic application structure changes and efficient retrieval.

Storage Mode

Application data is stored in separate databases by module. By default, multiple databases can be deployed in the same MongoDB cluster. When the data scale grows or stronger resource isolation is required, different databases can also be deployed to independent MongoDB clusters. For more information, see Multi-cluster Storage for Application Data.

On top of database separation, non-worksheet application structure data is logically isolated by application ID. Worksheet data uses physical isolation: each worksheet in an application corresponds to an independent Collection in MongoDB.

Worksheet Structure

Worksheets support dynamic structure changes through visual field definitions. After an administrator adds, modifies, or deletes fields on the page, the system synchronizes the corresponding Collection field structure.

Because each worksheet is stored independently, the system can maintain necessary field indexes for each worksheet, reduce data interference between worksheets, and improve retrieval performance for business field queries.

Single-cluster storage architecture