How to use live data
Using live data is a must in any IoT project. Fortunately, Grafana allows using live data since version 8.0. It uses WebSocket connections to exchange data in a quasi-real-time way.
This feature is enabled by default, with a maximum number of simultaneous connections of 100. WebSocket is a resource-intense protocol so it has to be used carefully. If you want to extend this feature to more clients, take into account the availability of resources (CPU and memory).
As we have seen in Chapter 3, Connecting IoT Devices, WebSocket initiates with an HTTP request, followed by an upgrade request. Then, the HTTP session remains open and data is exchanged between client and server using the WebSocket connection.
Features
Currently, Grafana supports the following features:
- It processes data as soon as it arrives. Instead of polling data from data sources at a specified polling period, it can manage asynchronous data in real-time.
- Whenever a dashboard...