esper ha模式對比

esper ha模式對比

**Selective State Residence ** **Capture **
Engine State 引擎狀態 Engine state is not limited to the amount of heap memory and can be much larger than available heap memory. 內存狀態不受堆內存限制,可以大于堆內存 All engine state must fit into heap memory. Therefore engine state is limited to the amount of heap memory available.
Memory management 內存管理 Comprehensive; Memory resources can be actively managed and engine state can be released from memory. 綜合,狀態可以從內存中釋放 None; all engine state must be in memory for operation. 狀態必須都在內存中
Incremental checkpoint 增量checkpoint Yes, checkpoints are always implicitly incremental. 只能增量checkpoint Yes, checkpoints can also full backup. 支持增量checkpoint & 全量checkpoint
Checkpoint pause-time checkpoint暫停時間 Minimized 最小 Pause-time spans the whole checkpoint. 整個checkpoint周期內全暫停
Store Targets 存儲目標 Multiple 文件 數據庫 redis File System 文件
Recovery State Reading 狀態恢復 Reads only engine metadata. The engine state is still available and the engine reads such state at the time of state use. 只加載引擎元數據,引擎狀態等到使用時再加載 Reads all engine state into memory. 加載所有狀態
Resilience service level configurable per statement 持久化級別配置粒度 No; All statements participate. 全局配置 Yes; Profiles can declare EPL statements to be transient, durable or resilient. statements 粒度
State management API to extract and load state 通過API導出、加載狀態 Not available 不支持 Available 支持

esperha 自動checkpoint設置

  • 示例配置
<esperha-settings>
<checkpointing enabled="true" event-count="1000" interval-msec="1000"
  thread-priority="6" />
</esperha-settings>
  • tips:
    • enabled設置成false,用于手動checkpoint

esperha ssr-持久化到fs

        <store-env-ssr name="esperha-default-store" target-name="fs-one">
            <state-management>
                <state-management-passive/>
            </state-management>
            <targets>
                <target-fs name="fs-one" >
                <homedir-file>./checkpoint</homedir-file>
                </target-fs>
            </targets>
        </store-env-ssr>
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容