We have application built with Pega 8.8 and running as stateful sets in the client managed Kubernetes environment. We got request from infrastructure team to change all to deployments instead of stateful sets. Can you please suggest webUser,Search,Stream,BackgroundProcessing can be run as Deployments or needs to be statefulset
Deployments:
- Best for: Stateless applications. These are applications where data doesn’t need to be persisted across pod restarts or rescheduling. Think web servers, API gateways, etc.
- Characteristics:
- Pods are interchangeable. If a pod dies, it’s replaced with an identical one. The order of pod startup/shutdown doesn’t matter.
- Updates are rolled out gradually, ensuring minimal downtime.
- Easy scaling up or down.
- Use cases:
- Web applications
- RESTful APIs
- Microservices (stateless components)
- Proxy servers
StatefulSets:
- Best for: Stateful applications. These are applications that require persistent storage, unique network identifiers, and ordered startup/shutdown. Think databases, distributed caches, etc.
- Characteristics:
- Pods have a stable, unique network identity (e.g.,
pod-0,pod-1, etc.). - Persistent storage is attached to each pod, ensuring data survives pod restarts.
- Ordered startup and shutdown. Pods are created and terminated in a specific order.
- Pods are not interchangeable. Each pod has a specific role and identity.
- Pods have a stable, unique network identity (e.g.,
- Use cases:
- Databases (MySQL, PostgreSQL, Cassandra, etc.)
- Distributed caches (Redis, Memcached)
- Message queues (Kafka, RabbitMQ)
- Stateful microservices
Not Recommended to go from Statefulsets to Deployments.
Search / Hazelcast & Stream are required to be Statefulsets for Pega as they need persistent storage, network and instance state to maintain during the restarts.
It’s NORMAL that, Cloud team ask to switch your app to deployments from statefulsets for them to maintain easily. But As an APP Admin, It’s difficult for us.
Infact, Pega will not recommend that too. If beyond all this, you still want to implement from Statefulset to Deployment conversion, Pega will not support the issues and it’s highly predictable that from Pega to say…It’s a customized configuration which needs Professional consulting support from Pega or it’s a Client RISK.