Store and Forward
💡Have feedback for this page? Let us know on the IA Forum.
The Store and Forward system provides a reliable way for Ignition to store data to the database. In Ignition, systems such as the Tag Historian and SQL Bridge (Transaction Groups) use Store and Forward to ensure that data reaches its destination in the database, and is stored in an efficient manner. The Store and Forward system can be configured in a number of ways, offering both memory buffering for performance and local disk caching for safe storage.
Store and Forward engines are automatically created for each Database Connection.
Primary Features and Benefits​
The Store and Forward system offers a number of benefits over other systems that log directly to the database, such as:
- Data loss prevention
- Data is removed from the system only when the write to the database has executed successfully.
- Guaranteed ordering
- Data is forwarded in the same order that it arrived, even if a database connection is not currently available.
- Enhanced performance
- By first buffering the data in memory, the Store and Forward system can optimize writes, and prevent the originating systems from blocking. This means that the system is less likely to lose data samples in the event of system slow downs.
Store and Forward Data Flow​
Although the system offers settings that can affect the pipeline, by default the data flow occurs as follows:
- Data is generated in some system.
- Data is placed in a memory buffer.
- If the data is not removed from the memory buffer within the specified Store Settings parameters, it is placed in the disk cache. The Store Settings include:
- Time Threshold
- Data Threshold
- Batch Size
- A data sink, based on the database connection and data type, pulls data from the local store and then from the memory buffer. The rate at which data is forwarded can be adjusted with the Forward Rate setting under Engine Settings.
- If the data fails to forward, either due to an error in the connection or in the data itself, it is returned to the buffer or cache.
- If the data errors out too many times, it becomes quarantined.
- Quarantined data can be managed through the Gateway, and can be deleted or un-quarantined, once the error is resolved.
Store and Forward Connection Policy​
Database connections by default have a pool of eight connections. The Store and Forward engine is multi-threaded, meaning the engine can take advantage of more than one of these connections at a time. This also means that if the Store and Forward engine is storing a particular type of data, such as tag history, that action will not block the engine from concurrently storing a different type of data, such as Alarm Journal or Audit Profile data.
There are six different types of data that can be stored and forwarded, meaning up to six of your available connections can be used at the same time. Each available data type is listed below:
- Alarming
- Auditing
- Scripting
- SECS/GEM
- Tag history
- Transaction Group
Store and Forward for Reliability​
The Store and Forward system settings, while seemingly limited, offer a good deal of flexibility to fine-tune configurations for different types of situations and goals.
When the safety of the data is a concern, the goal is to get the data stored to disk as quickly as possible in order to minimize risk of loss due to a power outage or system failure. The local cache plays a crucial role in this, allowing the system to store data locally for any amount of time until the remote database can accept it. This protects against network failures and database failures, as well.
By setting the Forward Rate to a low value, the data spends less time in the memory buffer. While the memory buffer can be set to 0 to bypass it completely, this is not usually recommended, as the buffer is used to create a loose coupling between the history system and other parts of Ignition that report history. This setup improves performance and protects against temporary system slowdowns. In fact, it is recommended that for reliable logging, this value be set to a high value, to allow the maximum possible amount of data to enter the system in the case of a storage slowdown.
Legacy Data Conversion​
If you are upgrading your Gateway from 8.1 to 8.3, Ignition will convert your serialized data to be compatible with version 8.3. This process is automatic, and begins when the engine starts up. Ignition will check to see what version your Gateway is currently using to see if any conversion is necessary, and will display a message once the process is complete. If any data remains unconverted after the process concludes, the leftover data within the .hsql file should be moved to the %IgnitionInstallationDirectory%/data/local/store-forward/quarantined-databases/
.
Due to serialization updates, 8.3 Gateways will not be able to forward data to a remote 8.1 Gateway. It is recommended to first upgrade the central server hosting data to 8.3 before upgrading any remote 8.1 Gateways. See the 8.3 Upgrade Guide for more information.