About Multi-tenancy
This page describes Serialized's multi-tenancy support.In order to build business-to-business applications where the application serves many customers it is common to build a multi-tenant system. This means that multiple customers share the use of the same system instance but their data is separated at the storage level.
Serialized provides a convenient way of building multi-tenant systems by enabling this feature on project level.
Data separation
Within a multi-tenant project, each tenant has its own data store. The following data is isolated per tenant:
- Aggregates
- Events
- Feeds
- Projections
- Reactions
Shared configuration
To simplify development and use of multi-tenant systems, configuration of projects is shared between tenants. This means that the following data is shared between tenants:
- Projection definitions
- Reaction definitions
- Logs
- API keys
The multi-tenancy support is carefully designed to support easy upgrades of your application's features. For example, if you want to change a projection definition to your application, you will only need to provide a single call to update the projection definition and Serialized will automatically rebuild all projections for all tenants to match the new definition.
Tenant identifiers
Each tenant has a unique identifier. This identifier is used to identify the tenant for all requests that are made to a specific tenant's data store. When writing data, querying projections or
Tenant references
Each tenant can have an optional reference. This reference can be used either as a human-readable identifier (such as a customer name) or the ID of the tenant in a different system. The reference is not used by Serialized in any way, but it is useful for identifying tenants in the Serialized Console and for cross-referencing tenants in your own systems.