Service Fabric Actor 状态:在持久模式下从哪里读取状态?
Service Fabric Actor State : where is the state read from in Persistent mode?
在持久模式下,服务结构参与者的状态持久保存在磁盘上并复制到其他节点,这一点从文档中可以清楚地看出。我的问题是连续查询 actor 状态,在 actor 的整个生命周期中,每次调用是从磁盘读取还是在第一次调用磁盘后从内存中提取?
SF团队的Vaclav给出了答案。
The component that stores your data in your service is called a State
Provider. State providers can be in-memory only or in-memory + local
disk. The default state provider you get with an actor service is
in-memory + local disk but it only keeps hot data in memory so your
storage requirements are not memory bound. 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.
因此,活动 Actors 的数据在内存中,非活动 Actors 的状态在磁盘上。因此,根据调用之间的时间,它可能是两者之一。 (因为 Actor 生命周期由 SF 为您管理。)两个紧随其后的调用将从内存中获取数据。
在持久模式下,服务结构参与者的状态持久保存在磁盘上并复制到其他节点,这一点从文档中可以清楚地看出。我的问题是连续查询 actor 状态,在 actor 的整个生命周期中,每次调用是从磁盘读取还是在第一次调用磁盘后从内存中提取?
SF团队的Vaclav给出了答案
The component that stores your data in your service is called a State Provider. State providers can be in-memory only or in-memory + local disk. The default state provider you get with an actor service is in-memory + local disk but it only keeps hot data in memory so your storage requirements are not memory bound. 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.
因此,活动 Actors 的数据在内存中,非活动 Actors 的状态在磁盘上。因此,根据调用之间的时间,它可能是两者之一。 (因为 Actor 生命周期由 SF 为您管理。)两个紧随其后的调用将从内存中获取数据。