DEV Community

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

Posted on • Originally published at magalix.com

1

Kubernetes Patterns : The Stateful Service Pattern

Stable Network Identity.
If you have a pet, you must give it a name so that you can call it. Similarly, a stateful application node must have a well-defined hostname and IP address so that other nodes in the same application knows how to reach it. A ReplicaSet does not offer this functionality as each Pod receives a random hostname and IP address when it starts or is restarted. In stateless applications, we use a Service that load-balances the Pods behind it and offers a URL through which you can reach any of the stateless Pods. In a stateful app, each node may want to connect to a specific node. A ReplicaSet cannot serve this purpose.
Learn more about Kubernetes Stateful Service Patterns: https://www.magalix.com/blog/kubernetes-patterns-the-stateful-service-pattern

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay