cloudstate icon indicating copy to clipboard operation
cloudstate copied to clipboard

Configurable entity passivation

Open jroper opened this issue 6 years ago • 3 comments

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 avatar Sep 25 '19 04:09 jroper

@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?

viktorklang avatar Oct 14 '19 08:10 viktorklang

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 avatar Oct 14 '19 23:10 jroper

@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?

viktorklang avatar Oct 15 '19 07:10 viktorklang