Using a redundant in-memory state

In some cases, you may want to keep a transient state in-memory. Distributed caching is a common case. Time-sensitive information is another one. For these use cases, there is no need for persistent storage, and multiple pods accessed through a service may be just the right solution. We can use standard Kubernetes techniques, such as labeling, to identify pods that belong to the store redundant copies of the same state and expose it through a service. If a pod dies, Kubernetes will create a new one and, until it catches up, the other pods will serve the state. We can even use the pod's anti-affinity alpha feature to ensure that pods that maintain redundant copies of the same state are not scheduled to the same node.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset