Device figures
What each device figure in Console counts, when it is exact or an estimate, and how fresh it is.
Console shows the devices of a Relay project in three places. The Devices view shows the project totals above the list of registered devices. The project overview shows Connected now as a link to the Devices view. The page of one device shows its activity, its mailbox, and a live read. Relay computes every figure. Console keeps no count of its own.
Project totals
- Registered devices: the devices registered in the project.
- Devices with pending messages: the devices that have one or more messages that wait for them. The Devices view shows Pending or None for each device, not a count.
- First message: the first message of the project. It is accepted when Relay stores it for a device, and acknowledged when that device acknowledges it.
Relay reports the first acceptance and the first acknowledgment of each device to the project at once. After that, a device that gets pending messages or clears them reaches the project count normally within 30 minutes, and later when a report retries.
Active days
Relay counts active devices by UTC day. A device is active on a day when it connects, takes a delivery, or acknowledges one. Each day ends at midnight UTC.
- Active today: the devices active on the current UTC day.
- Active in the last 7 days: the devices active on one or more of the last 7 UTC days, today included.
- Active in the last 30 days: the devices active on one or more of the last 30 UTC days, today included.
- Bars: the devices active on each of the 30 UTC days that end on the current UTC day.
The figures are not live. An active day can take 30 minutes or more to show.
The page of one device shows its last active day, its active days in the last 7, 30, and 60 days, and one bar for each of the last 60 UTC days. The Last active filter of the Devices view counts back from the current UTC day, as the project totals do.
The midnight limit
A connection that stays open past midnight counts on the new day only at its next delivery or acknowledgment. A device that stays connected through midnight and takes no delivery is not active on the new day. Thus Connected now can include a device that is not active today.
Connected now
Relay counts a device as connected from its first open connection to its last close. When a connection drops and Relay receives no close, the device can stay counted until it connects again. The count can include such devices, and the margin does not cover them.
The count is exact for a project with 4,096 registered devices or fewer. Relay then tracks the connection of every device of the project.
Sampling and margin
For a project with more than 4,096 registered devices, Relay tracks the connections of a sample of the devices. A device is in the sample when the low bits of its device handle are zero at the sample level of the project. About 1 in 2^level devices is in the sample, and no more than 4,096 devices are in it.
The count is the connected devices in the sample times 2^level. Console shows this estimate as "About N" and the margin as "± M at 95% confidence". The true count is within M of the estimate with 95% confidence. The margin is 1.96 standard deviations of the estimate:
margin = ceil(1.96 × sqrt((c + 1) × (1 − p)) / p)In this formula, c is the connected devices in the sample and p is 2^-level.
Under the count, bars are the peak connected devices of each of the 24 UTC hours through the current hour. An hour without a connection or a close keeps the count of the hour before. When the count is an estimate, the bars are estimates too.
The Connection filter of the Devices view lists the devices connected now. Console shows the filter only when every registered device of the project is in the sample. Relay can estimate the connected devices of a larger project, but it cannot list them.
Live read
The Live section of a device page reads the figures of the device from Relay when you select Read now. A project can make 12 live reads each UTC day. Relay refuses a read after the last one. Reads start again at 00:00 UTC.
- Connection: Connected now when the device has an open connection that answered in the last 75 seconds. This value is exact at every project size.
- Last seen: the last time that Relay had evidence of the device on a connection. This is the time of a close, or the last answer of a connection that is open, stale, or failed. Not yet means that Relay has no such time for the device.
- Pending messages: the exact count of the messages that wait for the device.
- One-time EC prekeys and One-time Kyber prekeys: the one-time prekeys that the device has left. Console marks a count of 10 or fewer as Missed refill.
- Signed prekey age and Kyber last-resort key age: the time since Relay accepted each signed key.
- Accepted in a month, Accepted, lifetime, and Removed, lifetime: the usage counts of the current mailbox of the device. Console shows one Accepted in row for each open UTC month. A message is removed when the device acknowledges it or when it expires.
A live read returns counts, ages, times, and the connection state only. It returns no key material, no account address, and no device ID.
Freshness
| Figure | When it changes |
|---|---|
| Connected now and its bars | Relay records each open and close at once. |
| Active days | Normally within 30 minutes of the activity, and later when a report retries. |
| Devices with pending messages | At once for the first message of a device. Otherwise normally within 30 minutes, and later when a report retries. |
| Live read | Exact when you read it. It does not refresh. |
The Devices view and the project overview read the project totals again every 30 seconds while the tab is visible. While one of them is open, the Devices row in the sidebar shows Connected now from the same read, and makes no read of its own. After the first message of the project is acknowledged, Relay can serve the same totals for up to 60 seconds.
Read device lifecycle and recovery for how a device links, unlinks, and recovers.