Stateless vs Stateful Kubernetes (2024)

WEKA. February 4, 2021

Kubernetes has become the de-facto orchestration tool and initially it was supporting stateless applications, but stateful (data-driven) applications are very common and are critical to almost all the businesses. Now, a lot of support is available for running stateful applications with Kubernetes.

In this article you’ll learn about these topics:

  • Stateless vs stateful basics
  • Containerized Stateful Application Use Cases and Their Challenges
  • Kubernetes storage and stateful applications
  • Kubernetes storage provisioning & AI workloads
  • How Weka’s Parallel File System Helps Solve Stateful Use Cases

Stateless vs. Stateful Kubernetes

At a very basic level, as the name suggests, the term “stateless” means that no past data nor state is stored or needs to be persistent when a new container is created. Stateless applications tend to include containerized microservices apps, CDN, print services, or any short term workers. and are easy for both deploying and managing resources.

Stateful applications typically involve some database, such as Cassandra, MongoDB, or MySQL and processes a read and/or write to it. Typically, it will involve requests being processed based on the information provided. The prior request history impacts the current state; hence, the server must access and hold onto state information generated during the processing of the earlier request, which is why it is called stateful.

Almost all the applications with modern workloads, such as AI/ML, financial data, and genomics sequencing are stateful and require persistent storage.

Containerized Stateful Application Use Cases and Their Challenges

Containerized applications need statefulness, as they are commonly deployed in hybrid and edge-to-core-to-cloud workloads, as well as CI/CD use cases. Here are some of the common use cases for containerized application deployments:

  • Data analytics processing and AI/ML–Hadoop, Spark, Tensorflow, PyTorch, and Kubeflow are now increasingly adopting containers. And need to go over massive amounts of data repeatedly.
  • MLOps–There are a number of stateful requirements when using containers for MLOps environments, such as checkpointing for large training jobs and sharing training and inference results.
  • Databases and messaging–Some applications recommend local flash for low latency. Using local flash on the POD’s worker nodes will limit the capabilities of moving containers between different worker nodes in the POD for additional agility. That is the reason why a high-performance shared storage like Weka, one that can provide the same or better latency while allowing for shared high performance data, would allow effectively using applications such as these:
  • – Single-instance databases like MySQL, PostgreSQL, MariaDB
    – NoSQL databases like Cassandra and MongoDB
    – In-memory databases like Redis and MemSQL and KDB+
    – Messaging apps like Kafka
    – Business critical apps like Oracle, SQL server, and SAP

Kubernetes Storage and Stateful Applications

In Kubernetes, basic storage building blocks are known as volumes. A volume is attached to a pod. A volume is like local storage, and there is no persistence to it. A volume gets released when a pod is destroyed. As such, a regular volume lacks persistence, portability, and scalability.

Persistent storage, as the name suggests, retains or stores the data generated by an application, making it suitable for stateful applications. Unlike local storage or a regular volume, a persistent volume is managed by clusters, and it’s not dependent on the pod lifecycle; therefore, the data can be retained and reused.

When creating a persistent volume for Kubernetes clusters, the storage file system and its configuration (IDs, access modes, size, names etc.) needs to be specified in a StorageClass.

There are 3 steps involved in creating a persistent volume and attaching it to a container in a pod:

  • Create a StorageClass
  • Create a PersistentVolumeClaim
  • Define the volume

Kubernetes Storage Provisioning and AI Workloads

There are two popular ways of provisioning persistent storage in Kubernetes: static and dynamic. We expanded on the topic in Kubernetes storage provisioning: what you should know before deploying containerized applications. To recap, the main difference relies on the point in which you want to configure storage. If you need to pre-populate data in a volume, you choose static provisioning. If you need to create volumes on demand, you go for dynamic provisioning.

Dynamic provisioning is no longer tied to the lifecycle of the pod. Moreover, the workload is not independent of the storage technology nor whether it is running on premises or in the cloud. That gives you more flexibility in choosing different deployment modes for different workloads. The outcome is optimal and flexible usage of resources for each specific workload.

In the past though, dynamic provisioning required changes to the Kubernetes source code. Today, Kubernetes developed a container storage interface (CSI) that provides the ability to implement and provision without changing the Kubernetes source code. CSI bundles it under a single umbrella, so it’s easier to perform dynamic and static provisioning. Then users simply install the volume plugin within the cluster and use it with a StorageClass object.

How Weka’s Parallel File System Helps Solve Stateful Use Cases

WekaFS, the world’s fastest and most scalable parallel file system, addresses the shareability, performance, and portability challenges by providing stateful, reliable storage, allowing seamless deployment on premises and easy migration to the cloud, while meeting high performance and low latency requirements. Using the WekaFS Kubernetes CSI plugin, organizations now have increased flexibility in how and where they deploy containers while delivering local storage performance and low latency.

The WekaFS CSI plugin is deployed using a Helm Chart or as a Daemonset, along with the POSIX agent on Kubernetes worker nodes, and is available in the Rancher application catalog as well. WekaFS supports volume provisioning in both the dynamic (persistent volume claim) and static (persistent volume) forms with its own storage class. It also supports ReadOnlyMany, ReadWriteOnce, and ReadWriteMany access modes.

WekaFS provides the same highest performing disaggregated storage, scalability, encryption, and data protection to all application- specific Kubernetes PODs and clusters, whether on premises or in the cloud.

Stateless vs Stateful Kubernetes (1)

Create persistent storage for your containerized applications

Using Weka Kubernetes CSI plugin

Click here

Stateless vs Stateful Kubernetes (2024)
Top Articles
How Netflix Became a $100 Billion Company in 20 Years
How to set or update a Netflix Household
Manhattan Prep Lsat Forum
Kaydengodly
Chalupp's Pizza Taos Menu
Steamy Afternoon With Handsome Fernando
Hotels Near 500 W Sunshine St Springfield Mo 65807
Elden Ring Dex/Int Build
What's New on Hulu in October 2023
Visustella Battle Core
Sunday World Northern Ireland
Remnant Graveyard Elf
Moonshiner Tyler Wood Net Worth
Tcgplayer Store
Craigslist Edmond Oklahoma
6813472639
Mile Split Fl
Urban Dictionary: hungolomghononoloughongous
Mikayla Campinos Laek: The Rising Star Of Social Media
Gayla Glenn Harris County Texas Update
Palm Springs Ca Craigslist
[Cheryll Glotfelty, Harold Fromm] The Ecocriticism(z-lib.org)
Why do rebates take so long to process?
Food Universe Near Me Circular
Rubber Ducks Akron Score
Southland Goldendoodles
Weldmotor Vehicle.com
Prey For The Devil Showtimes Near Ontario Luxe Reel Theatre
Synergy Grand Rapids Public Schools
Bleacher Report Philadelphia Flyers
Lacey Costco Gas Price
Account Now Login In
WPoS's Content - Page 34
Vlacs Maestro Login
Trust/Family Bank Contingency Plan
Fridley Tsa Precheck
Scioto Post News
Helloid Worthington Login
Foolproof Module 6 Test Answers
Kazwire
Wlds Obits
What Is Kik and Why Do Teenagers Love It?
Gun Mayhem Watchdocumentaries
התחבר/י או הירשם/הירשמי כדי לראות.
Actor and beloved baritone James Earl Jones dies at 93
Sams Gas Price Sanford Fl
2294141287
Wisconsin Volleyball titt*es
SF bay area cars & trucks "chevrolet 50" - craigslist
Asisn Massage Near Me
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 6596

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.