This feature is not part of the community edition: it needs to be unlocked.
Session runs on a single machine and the volume of data it can handle is thus limited by the machine’s CPU and memory.
Multiple sessions, each running on a dedicated machine, can be configured to join a cluster and contribute to a QueryCube in a QuerySession.
Query cubes distribute parts of the execution of incoming queries to data cubes in the cluster, breaking away from the limitations imposed by the single-machine model.
Important: Distribution comes at a cost: the communication required between machines in the cluster adds latency and overhead.
Atoti supports NUMA and is designed to scale vertically on large servers.
Go for vertical scaling if possible since it simplifies deployment and monitoring.
If vertical scaling is not option, then this page is for you.
Here, to fit in a guide, the data cubes and the query cube will run on the same machine but, in production, the code must be rearranged so that sessions run on dedicated machines that can communicate with each other.
Setting up the first data cube
To have something to distribute to, let’s start a cube that will act as our first data cube.Setting up the query cube and the cluster
Making the data cube join the cluster
The only change required to make the query cube useful is to make the data cube join its cluster:- Dimensions
- Facts
- ID
- ID
- Region
- Region
- ID
- Facts
- Measures
- Portion
- formatter: None
- Value.MEAN
- formatter: None
- Value.SUM
- formatter: None
- contributors.COUNT
- formatter: None
- contributors.COUNT.World
- formatter: None
- update.TIMESTAMP
- formatter: None
- Portion
query_cube_ids and data_cube_ids properties give opaque IDs that can be used to check how many cubes of the other kind are connected:
Adding more data cubes
Distribution is only useful if multiple data cubes contribute to a query cube so let’s do that:ready to False so that the data cube would not join the cluster before it is fully defined.
Setting ready to True will now make it join the cluster.