簡體   English   中英

Service Fabric Actor State:在持久模式下從哪里讀取 state?

[英]Service Fabric Actor State : where is the state read from in Persistent mode?

在持久模式下,服務結構參與者 state 持久保存在磁盤上並復制到其他節點,這在文檔中很清楚。 我的問題是對演員 state 的連續查詢,在演員的整個生命周期中,每次調用是從磁盤讀取還是在第一次調用磁盤后從 memory 中提取?

SF 團隊的 Vaclav 在這里提供了答案。

在服務中存儲數據的組件稱為 State 提供程序。 State 提供程序可以僅在內存中或在內存中 + 本地磁盤。 您通過參與者服務獲得的默認 state 提供程序是內存中 + 本地磁盤,但它僅將熱數據保存在 memory 中,因此您的存儲要求不受 memory 限制。 Contrast with the Reliable Collections state provider which currently stores all data both in-memory and on local disk, although in a future release it will also have an option to only keep hot data in memory and offload the rest to local disk.

因此,活動 Actor 的數據位於 memory 中,state 位於磁盤上用於非活動 Actor。 因此,根據通話之間的時間,它可能是兩者之一。 (因為 Actor 的生命周期由 SF 為您管理。)兩個直接相互調用的調用將從 memory 獲取數據。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM