Disk-Based Persistence and Message Swapping
You can control memory and disk usage with disk-based persistence and message swapping.
Use these approaches to manage a balance between memory use, messaging throughput (number of messages processed in a given time), and latency (time delay between message generation and delivery).
Disk-Based Persistence
Disk-based persistence is enabled on a by-cluster basis and, when enabled, only replicated stores perform disk persistence. Disk-based persistence is enabled in one of two modes, shown in the diagram that follows. For details, see TIBCO FTL Administration, "Persistence Architecture", "Disk-Based Persistence".
-
Sync: The client returns from the send call after the message has been written to a majority of disks. This mode generally provides consistent data and robustness, but at the cost of increased latency and lower throughput.
-
Async: The client may return before the message has been written to a majority of disks. This mode generally provides less latency and more throughput, but messages could be lost if a majority of persistence services fail simultaneously.
Figure 30: Disk-Based Persistence: Sync and Async
Disk Persistence Enabled Backup
A backup operation is available for persistence clusters that have disk persistence enabled. The backup saves a snapshot of the persisted state, corresponding roughly to the time the backup was started. Backups proceed in the background, and do not prevent sending and receiving messages while in progress. The stored messages and metadata can be automatically recovered on a full restart of the persistence cluster. For details, see TIBCO FTL Administration, "Saving and Loading Persistence State", "Restoring Backups".
Message Swapping
Messages held in process memory can be swapped to disk when message swapping is enabled per persistence cluster. Both replicated and non-replicated stores swap when swapping is enabled. Messages are swapped when configured memory limits are exceeded. The limit can be set on a per-store or per-durable basis. Adjusting these limits helps you to manage a balance between memory use, messaging throughput, and latency.