DEV Community

Cover image for Kubernetes Patterns : The Stateful Service Pattern
Ahmed Atef
Ahmed Atef

Posted on • Originally published at magalix.com

Kubernetes Patterns : The Stateful Service Pattern

Most of the components that Kubernetes offers (Pods, Deployments, Jobs, CronJobs, etc.) consider that you are working with a stateless application. A stateless app is made up of several identical components that can be easily replaced. If you’ve heard the famous example of pets vs. cattle, stateless apps are regarded as cattle. If not, let me quickly shed some light on it: when you have several nodes hosting your application (those could be physical nodes, virtual nodes, or containers) you can either treat them as pets or as cattle. When you have a pet, you name it; you feed it, it’s unique among your other pets (you have a dog, a cat, and a turtle, each with distinctive characteristics). If one of your pets got sick, it’s immediately noticeable; you must do something about it.
for more informations visit: https://www.magalix.com/blog/kubernetes-patterns-the-stateful-service-pattern

Top comments (0)