Documentation
¶
Overview ¶
Command fspersist is a simple server used as an actor workload. It listens on port 80 and, on each request, returns the IP of the pod where it is running along with a history of past appends read from a file on its root filesystem.
It exists alongside the counter demo to show that two ActorTemplates running two entirely different binaries can share a single WorkerPool. Whereas the counter demo proves that *memory* survives gVisor suspend/resume by returning an incremented in-memory count on each request, this binary proves that the *filesystem* does: on each request it prepends a line recording the current pod IP and a running count to a history file (capped at 20 lines), and the count is read back from that persisted file rather than from memory. Because the file follows the actor across checkpoint/restore, its history accumulates and the recorded pod IPs reveal each move onto a new worker.