cloudstate
cloudstate copied to clipboard
Configurable entity passivation
Two things:
- CRDT entities don't currently support passivation, they should.
- The passivation timeout should be configurable. There should be at least two ways to configure it, the first would be in the StatefulService deployment descriptor, the second in the CloudState operator ConfigMap. A third might be to allow it to be configured by the user function itself during entity discovery (this would allow different entity types to have different passivation timeouts). Not sure if that's absolutely necessary or not though.
@jroper Do you have any idea on how this would be implemented? Is this a configuration job only, or do we need to implement it as well?
Basic outline:
- The proxies reference.conf should pick up an entity passivation timeout environment variable, if present (the same way other environment variables are referenced in reference.conf).
- The operator should add this environment variable to the pod. It should look at the stateful service descriptor (which should have the timeout added to it), and if not present there, read it from the configuration that was parsed from the config map. Potentially, it should only set the environment variable if the value differs from the default.
@jroper I was more thinking about "CRDT entities don't currently support passivation, they should." So is it the case that there is no support for it, or that it is not configurable externally right now?