Tracing
The distribution layer leverages tracing to provides insights into the queries executed in the cluster. Check tracing to configure it.Logging
Without tracing activated, the distribution layer provides some logging.Logger naming
To retrieve all the distribution logs, two loggers should be activated:atoti.server.distribution(new namespace)com.activeviam.activepivot.dist(legacy namespace)
com.activeviam.activepivot.dist.impl.private_) contains internal packages and classes,
thus making it hard to filter using a more granular logger, as the full logger name hierarchy is not public, and can be changed between two bugfix versions.
The new logger (atoti.server.distribution) will provide some more granular loggers, to focus on one particular aspect of
the distribution such as “atoti.server.distribution.messaging”, …
The exhaustive list will be made available in the future, but will be fully contained under atoti.server.distribution.
As loggers will be moved gradually from com.activeviam.activepivot.dist to atoti.server.distribution,
it is recommended to activate both loggers in your project, to avoid missing any logs when upgrading to a newer bugfix version.
What is the distribution state of a query cube?
The distribution state is the view a query cube holds of its cluster. It has three levels: the query cube, its remote data cubes, and the branches of those data cubes. The state is built only from what the query cube has received, starting with the messages published by its data cubes and the JGroups cluster membership notifications. Reading it tells you how far each data cube and each branch has got: which ones the query cube has fully accepted, which are still waiting for a message, and which have failed. This section assumes familiarity with the distributed architecture and with the communication flow between data cubes and query cubes.How to request the distribution state
Every distribution observability endpoint is served under the same prefix:GET endpoints. Each one takes the name of a query cube as a path variable and returns
JSON. Each one answers 404 when no query cube goes by that name, and when distribution is not
started on that cube. They are documented request by request in the
REST service.
The state of a query cube is read from the state endpoint:
- The top object carries
queryCube, the state of the query cube itself, anddataCubes, a map keyed by data cube address. - Each entry of
dataCubescarriesdataCube, the state of that data cube, andbranches, a map keyed by branch name. - Each entry of
branchescarries the state of that branch.
data-cube-A, with a single master branch:
What are the query cube states?
The query cube reports one of two states.
The
queryCube object carries these fields.
Every field but
state is null except in the AWAITING_DISCOVERY state. See
Wait for All Applications to configure the
property that makes that state reachable.
What are the remote data cube states?
Each data cube the query cube knows reports one of six states.
Each
dataCube object carries these fields.
A reservation expires after the delay set by
Pending discovery timeout, and the number of
reservations held at once is capped by
Pending initial discoveries.
What are the remote branch states?
Each branch of a data cube reports one of four states.
Each branch object carries these fields.
Where does an event stand in the processing pipeline?
Thestate endpoint stops at what the query cube received. Four more endpoints report where that
input stands in the processing pipeline.
Which messages is a query cube holding back?
A data cube publishes its messages in a sequence. The query cube buffers a message whose predecessor in that sequence has not arrived. It keeps that message until the gap is filled. A growing buffer means the cluster is waiting on a message that never came.How to request the same information over JMX
Every endpoint above has a JMX counterpart, each carried by its own monitored child of the query cube MBean.
See JMX monitoring to connect an MBean client to the server.
listQueuedMessages is reported per data cube, as one child of DistributionState per data cube
address, while the queuedMessages endpoint returns every data cube in a single response.What to read next
- Communication flow describes the messages exchanged inside a cluster.
- Distributed properties lists the properties that drive the behavior described above.
- Distribution Observability REST service documents every endpoint of this section, request by request.
- REST APIs lists the other REST services of Atoti Server.