daemonset vs statefulset. Gère le déploiement et la mise à l'échelle d'un ensemble de Pods, et fournit des garanties sur l'ordre et l'unicité de ces Pods. daemonset vs statefulset

 
Gère le déploiement et la mise à l'échelle d'un ensemble de Pods, et fournit des garanties sur l'ordre et l'unicité de ces Podsdaemonset vs statefulset  All Pods with an ordinal that

StatefulSet. Once a PV is claimed by an STS replica. StatefulSet pods have a unique identity that is comprised of an ordinal, a stable network identity, and stable storage. After learning that we should have used a StatefulSet instead of a Deployment in order to be able to attach the same persistent volume to multiple pods and especially pods on different nodes, I tried changing our config accordingly. The Vault Helm Chart uses the StatefulSet deployment model. As pods successfully complete, the Job tracks the successful completions. If there's heavy load, you can set up a HorizontalPodAutoscaler to. For example, if you have a cluster of dual-core machines, a Pod with a request of. DaemonSet - YouTube A pod is the smallest unit of computation and replication in Kubernetes. You need to change apiVersion. Does not matter in which worker node they are running. md","contentType":"file"},{"name":"client-service. Introduction What is Kruise Rollouts? Kruise Rollouts is a Bypass component that offers Advanced Progressive Delivery Features. At most one pod of the. 4. Where in the case of a StatefulSet the value of foo. But unlike Deployment, StatefulSet maintains a fixed identity for each of its pods. As nodes are added to the cluster, Pods are added to them. For the back-end component, we’ll use a StatefulSet. As nodes are added to the cluster, bookie pods are added automatically to them. You might set the Deployment to have replicas: 3 so that if one of them fails the other two can pick up the load. Intermediate; DaemonSet; Edit this Page. Kubernetes DaemonSet is a type of controller that ensures that a single instance of a pod runs on every node in your cluster or on a subset of nodes that you specify. In contrast to that, the Pods. This page shows how to delete Pods which are part of a stateful set, and explains the considerations to keep in mind when doing so. With the PVCs in place, we are ready to launch the StatefulSet with no changes to the YAML file. 1. Now the options left:- A) Run the Fluentd as a sidecar pattern along with other containers in a pod B) Change the cluster from Fargate to NodeGroup based. DaemonSet is a Kubernetes workload that ensures that specific Pods run on every node in the cluster. ReplicasSet will ensure that the number of pods (defined in our config file) is always running in our cluster. If you want to scale daemonset you need to scale your nodepool. template. Deployment. 2. However, the following command will give a clean daemonset manifest considering that "apps/v1" is the api. Deploy Elasticsearch. It’s easy to use and has a wide range of features, making it an ideal choice for managing applications in a production environment. The user can specify a different scheduler for the Pods of the DaemonSet, by setting the . Feel free to give it a read. If you want your collector to be stateful (i. You can specify how long a pod can remain bound to a node before being evicted by specifying the tolerationSeconds parameter in the pod specification. A Pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers. Chúng ta phải chú. Creating a StatefulSet. To create the kube-logging Namespace, first open and edit a file called kube-logging. Every pod in a StatefulSet has two unique, stable identities (a network ID and a. We could have done this on GKE as well, but I wanted to provide a more detailed picture of the disk. For example, enter fluentd in the search box and press Enter. Conforme se elimina nodos del clúster, dichos Pods se destruyen. Deleting a StatefulSet You can delete a StatefulSet in the same way you delete other resources in Kubernetes: use the kubectl delete command, and specify the StatefulSet. A StatefulSet is useful in guaranteeing order and uniqueness of pods, by keeping a persistent identity of each pod using unique naming conventions. As nodes are removed from the cluster, those Pods are garbage collected. 15. A DaemonSet defines Pods that provide facilities that are local to a specific node ; for example, a driver that lets containers on that node access a storage system. field to . When Pods are being deleted, they are terminated in reverse order, from {N-1. StatefulSet is also a Controller but unlike Deployments, it doesn’t create ReplicaSet rather itself. Watch the presentation below given by Ali Kahoot, DevOps Engineer & Trainer at Tarabut Gateway. To decide how to handle updates, StatefulSets use an update strategy defined in spec: updateStrategy. Container state is not saved so all of the files that were created or modified during the lifetime of the container are lost. Search Deployment Vs Statefulset In Kubernetes Statefulset In Kubernetes Explained Stateless Statefulsell goods, solutions, and more in your neighborhood. The word "state" means any stored data that the application or component needs to do its work. PVC: Every replica of a StatefulSet will have its own state, and each of the pods will be creating its own PVC (Persistent Volume Claim). Understanding ReplicaSet vs. 10 min read. Like Deployment, StatefulSet manages pods that have the same container specification. yaml. It manages the deployment and scaling of a set of Pods, and provides guarantee about the ordering and uniqueness of these Pods. DaemonSet vs. When we talk about workloads in Kubernetes, we mean the API resource types that run an application. Parallel. It can appear that StatefulSet is a way to solve at most one instance in a situation with a network partition, but that is mostly in case of a stateful replicated application like e. If you chose a different name you have to set up a corresponding volume mount matching. A daemonset can be used to run replicas of a pod on specific or all nodes in an OpenShift Container Platform cluster. The bookies deployed in a DaemonSet stores data on the local disks. Execute the following 2 commands to list the Statefulset and Service created in the above step. We are creating a StatefulSet called postgresql-db with two pods (replicas: 2). Deployment: Pods have an ID that contains the. kubectl get nodes -o wide. Reloader can watch changes in ConfigMap and Secret and do rolling upgrades on Pods with their associated DeploymentConfigs,. Unlike deployments, statefulset maintains an identity for each of the pods. kubectl proxy - Run a proxy to the Kubernetes API server. spec. How Deployments, Statefulsets & Daemonsets work. If the StatefulSet is scaled down to one replica, mysql-3 is guaranteed to exit first, followed by mysql-2. A DaemonSet in Kubernetes is like a chef in a restaurant. Nếu param backoffLimit không được setting thì mặc định của nó là 6. Use-cases: Daemonset vs StatefulSet. Gère le déploiement et la mise à l'échelle d'un ensemble de Pods, et fournit des garanties sur l'ordre et l'unicité de ces Pods. 4. By default, this is done as an anonymous user. We will be using Elastic Agent (with integrations) installed into the DaemonSet on each node of your Kubernetes cluster to ingest data into Elasticsearch. What I am looking for is to fix a node for an individual pod of a StatefulSet. Set up your Kubernetes cluster. They enable stable, ordered scaling and updates while preserving the state. As nodes are added to the cluster, bookie pods are added automatically to them. Deploy Istio and validate its installation. Statefulset have 4 update strategies. 23. DaemonSet vs. DaemonSet example-2: Rolling update & Rollback. This happens only when there is a resource shortage on the nodes. kubectl scale sts quarkus-statefulset --replicas=3. hostNetwork is an optional setting and is not necessary. Because the replicas field of the zk StatefulSet is set to 3, the Set's controller creates three Pods with their hostnames set to zk-0, zk-1, and zk-2. 2. Algunos casos de uso. 16. The StatefulSet controller scaled the number of replicas. A container image should use a fixed tag or the SHA of the image. spec. 1. DaemonSet vs. Both Application Load Balancer and Network Load Balancer are designed from the ground…The usual examples are the Kubernetes ReplicaSet, StatefulSet, and DaemonSet controllers. This might not directly apply to your situation but I hope. A StatefulSet is a controller that helps you deploy and scale groups of Kubernetes pods. The example topology has a single primary server and multiple replicas, using asynchronous row-based replication. Can be resource inefficient - if the nodes have different workloads, the configuration for the pods in the DaemonSet would have to be based off the most demanding node in the cluster. As nodes are added to the cluster, bookie pods are added automatically to them. If you use a persistentVolumeClaim in your daemonset definition, and the persistentVolumeClaim is satisfied with PV with the type of hostPath, your daemon pods will read and write to the local path defined by hostPath. DaemonSets. Summary. The identity sticks to the pod, regardless of which node it’s scheduled on. e. If you need to monitor Services, Endpoints, or Ingresses, use a StatefulSet. A DaemonSet is a unique kind of resource that K8s assigns to a pod for each Kubernetes node in the cluster. For a typical Kubernetes Pod, it will be managed by a higher-level controller like a Deployment. It is not applicable to daemonset. template. Nota: Los StatefulSets son estables (GA) en la versión 1. As opposed to the legacy check, with the Kubernetes State Metrics Core check, you no longer need to deploy kube-state-metrics in your cluster. I’ve seen confusion around what a Deployment vs. It is primarily for internal use by controllers. yaml using your favorite editor, such as nano: nano kube-logging. If you don’t specify a serviceName, a headless service will still be created automatically, but it will have a generated name based on the StatefulSet's name. Every time a new node is added to a cluster, the pod is added to it, and when a node is removed from the cluster, the pod is removed. Contrairement à un Deployment, un. DaemonSet vs. To delete all the pods from a particular node, first, retrieve the names of the nodes in the cluster, and then the names of the pods. kubectl scale daemonset sample-daemonset -. As with StatefulSet creation, the StatefulSet controller created each Pod sequentially with respect to its ordinal index, and it waited for each Pod's predecessor to be Running and Ready before launching the subsequent Pod. Note that you need a running Elasticsearch v5+ cluster to receive log data before start. A DaemonSet is typically described using a YAML file. StatefulSet と PVC の関係まとめ. 2. 1. This page shows how to run a replicated stateful application using a StatefulSet. Next, tell Kubernetes to drain the node: kubectl drain --ignore-daemonsets <node name>. Some typical uses of a DaemonSet are: running a cluster storage daemon on every node In a StatefulSet, each pod is given a name and treated individually, in contrast to a Kubernetes Deployment, where pods are easily replaceable. Let’s say you want to increase the replica count of a DaemonSet to 2, it will ensure to increase the number of pods of an application on each node to two. Nếu chúng ta không chỉ định param completions thì sẽ sẽ chạy liên tục không dừng lại. StatefulSet is the workload API object used to manage stateful applications. The downside of this method is that it's not automated like Helm and you would need to create a "patch" for every resource (each Deployment/Statefulset/Daemonset etc. yaml and remove the line replicas: 1. The extensions/v1beta1 and apps/v1beta2 API versions of DaemonSet are no longer served as of v1. With kubectl --dry-run. 0}. What's next. NOTE: DaemonSet vs StatefulSet. StatefulSet: Deployment is used to deploy stateless applications: StatefulSets is used to deploy stateful applications: Pods are interchangeable: Pods are not. Some typical uses of a DaemonSet are: running a cluster storage daemon, such as glusterd. daemonset controller, replication controller). Example-1: Using allowedCapabilities in Pod Security Policy. podManagementPolicy. dmg and drag Lens. A StatefulSet is a higher-level concept that provides a declarative way to manage stateful applications. Now replace the line kind: Deployment with kind: DaemonSet in nginx-ds. Summary. El objeto de un ReplicaSet es el de mantener un conjunto estable de réplicas de Pods ejecutándose en todo momento. 1. apiVersion: apps/v1 kind:. NOTE: DaemonSet vs StatefulSet. Tolerations allow the scheduler to schedule pods with matching taints. StatefulSets. yaml as shown below and done a helm upgrade operation using our new charts. This is useful if you. This application is a replicated MySQL database. As nodes are removed from the cluster, those bookie pods are garbage collected. Similar to a Deployment, but each pod is unique and has a persistent identifier. What is Kubernetes Daemonset? DaemonSet is a Kubernetes feature that lets you run a Kubernetes pod on all cluster nodes that meet certain criteria. 16. The user can specify a different scheduler for the Pods of the DaemonSet, by setting the . PersistentVolumes. Updating a StatefulSet. Everything remains exactly the same while the data is already restored from the snapshots. Kubelet first considers the QoS class and then the pod priority value to evict pods. In one terminal, watch the StatefulSet's Pods: Kubernetes DaemonSet is a great way to manage and deploy applications in a clustered environment. template. Check. Kubernetes defines many different resources and Controllers that manage them. Those numbers of pods and volumes don't match up. healthcheck. The Deployment creates a ReplicaSet that creates three replicated Pods, indicated by the . What is the difference between a StatefulSet, a Deployment, and a DaemonSet? Stateful vs. It automatically creates a new Pod when a new node is added and terminates it when a node is removed, maintaining the desired state of the system. kubectl Dry Run Option. Contribute to mandiladitya/K8-Workspace development by creating an account on GitHub. DaemonSet is a top-level resource in the Kubernetes REST API. The original node affinity specified at the . Editor's note: today's post is by Janet Kuo and Kenneth Owens, Software Engineers at Google. These pods are made to identical specifications, but they are not interchangeable; rather, each one has a unique identity that it keeps throughout any rescheduling. affinity. A ReplicaSet is used to ensure that a specific number of replicas (copies) of a pod are running at any given time, while a Deployment manages updates to a ReplicaSet by creating a new ReplicaSet with the updated pod template and gradually scaling it up while scaling down the old ReplicaSet. Now, if I add tolerations to my container configurations in a StatefulSet if will be common for all pods of my StatefulSet and would schedule all pods on a node with matching taint. yaml) describes a DaemonSet that runs the fluentd-elasticsearch. 3. Menghapus DaemonSet akan menghapus semua Pod yang ia buat. Description. A DaemonSet is typically described using a YAML file. Deleting a DaemonSet will clean up the pods it created. Identities are defined as: Network: A single stable DNS and hostname. Controller - StatefulSet. helmignore, which is similar in concept to . Thảo luận ban đầu xoay quanh StatefulSet và được mở rộng ra Stateful và Stateless nói chung trong cả Software Development và Devops. On an update the existing Pods will get deleted and recreated. This means that if any pod dies, it is immediately noticeable. kube_daemonset_status_number_unavailable # 应该运行守护程序容器且没有任何守护程序容器正在运行并且可用的节点数 kube_daemonset_updated_number_scheduled # 正在运行更新的守护程序pod的节点总数 kube_daemonset_metadata_generation # 代表所需状态的特定生成的序列号。. A DaemonSet ensures that a single instance of a pod is running on each node in a cluster. Now, we have upgraded our cluster to Istio 1. You can also use a preexisting disk in a StatefulSet. Now let’s take a look at the stateful set itself. It is important to remember that you cannot set requests that are larger than resources provided by your nodes. StatefulSets handle the deployment and scaling of sets of Kubernetes pods, providing guarantees about their uniqueness and ordering. A DaemonSet is an active Kubernetes object managed by a controller. This is especially useful for system. StatefulSet vs. 14: kubectl edit pvc <name> for each PVC in the StatefulSet, to increase its capacity. The name of a Job must be a valid DNS subdomain value, but this can produce. 每种采集方式都有其对应的 优缺点 ,这里简单总结如下:. When a DaemonSet is deleted, Kubernetes removes all the pods. deployment vs. kubectl create daemonset <daemonset_name> – Create a new. roles=master seed nodes and a daemonset of data (all roles) nodes. Some provides will not allow hostPath, for writing, and then you are stuck. How do they differ while persisting data. The logs are particularly useful for debugging problems and monitoring cluster activity. Kubernetes replicas. apiVersion: extensions/v1beta1 ->. Do the traffic switch. How to run stateful applications in Kubernetes. yaml. 10 min read. The StatefulSet guarantees that a given network identity will always map to the same storage identity. Learn more about debugging an init-container. StatefulSet est l'objet de l'API de charge de travail utilisé pour gérer des applications avec état (stateful). readiness. Creating Persistent Disks to Store our Images and Themes. Double-click Lens- {version}. It’s easy to use and has a wide range of features, making it an ideal choice for managing applications in a production environment. Using allowPrivilegeEscalation with Kubernetes SecurityContext. Implementing peer discovery through DNS. PVC: Every replica of a StatefulSet will have its own state, and each of the pods will be creating its own PVC (Persistent Volume Claim). The common format of a kubectl command is: kubectl action resource This performs the specified action (like create, describe or delete) on the specified resource (like node or deployment). The following example describes the features of a DaemonSet configuration file using an nginx image: yml. {"payload":{"allShortcutsEnabled":false,"fileTree":{"gke":{"items":[{"name":"README. DaemonSet 方式 :在 K8S 的每个 node 上部署日志 agent,由 agent 采集所有容器的日志到服务端。. DaemonSets vs StatefulSets. Helm hooks provides a means to hook into events in the release process and take action. How Deployments, Statefulsets & Daemonsets work. kubectl scale daemonset sample-daemonset --replicas=5. 6. 7. DaemonSet is a Kubernetes controller used for cluster-level operations, ensuring that a specific Pod runs on every node in the cluster. spec. Understanding how StatefulSets deal with node failures. * DaemonSet, Deployment, StatefulSet, and ReplicaSet resources will no longer be served from extensions/v1beta1, apps/v1beta1, or apps/v1beta2 by default in v1. The following command performs this requirement. 1. But what is the best for this case ? This Pod is stateful (I am using volume hostPath to keep the data) and is deployed using nodeSelector to keep it always on the same Node. Making use of the right one means that you express your intent clearly, and that Kubernetes can help you. DaemonSets. StatefulSet. OF THE TALKKubernetes provides different resources for deploying applications, we will be lookin. A Replica set is used to ensure that a specific set of Pods is running at all times. You can use DaemonSet to run a cluster storage, log collection, and node monitoring demon on each node. A DaemonSet ensures that a single instance of a pod is running on each node in a cluster. apiVersion: apps/v1 kind: StatefulSet metadata: name: hello-world spec: replicas: 1 selector: matchLabels: app: hello-world template: metadata: labels: app: hello. StatefulSets vs. You create a StatefulSet using the kubectl create or the kubectl apply command - for example: PowerShell. Stateful and Stateless Applications. DaemonSet memastikan semua atau sebagian Node memiliki salinan sebuah Pod. DaemonSet is, and what they can or cannot do. As nodes are removed from the cluster, those bookie pods are garbage collected. A diferencia. Deployment is the easiest and most familiar resource for deploying your application, Deployment is largely used for stateless applications. Note the client provided takes precedence over the configured transport values. StatefulSet merupakan salah satu objek API workload yang digunakan untuk aplikasi stateful. StatefulSet vs. DaemonSet example-3: Rolling Rollback. Author: Matthew Cary (Google) Kubernetes v1. Since Elasticsearch maintains state, we need to use StatefulSet which is a deployment that can maintain state. The following command performs this requirement. 5 or later. They enable stable, ordered scaling and updates while preserving the state. As soon as a node joins the cluster, the DaemonSet ensures that it has the necessary pods running on it. 1. We will select the value of the container that consumed the most in each moment. 1. stateless applications The difference between StatefulSets and Deployments reflects. 25. 6 or above version client. Deployment? The StatefulSet offers:As above daemonset, the buffer is kept on the disk, and it works okay until pod is terminated. Watch the presentation below given by Ali Kahoot, DevOps Engineer & Trainer at Tarabut Gateway. Chapter 3. A DaemonSet ensures that all (or some) nodes run a pod of bookie instance. ) One thing of note, we use pod anti-affinity to ensure the pods would evenly distribute across the nodes. A DaemonSet ensures that all (or some) Nodes run a copy of a Pod. Each replica in a StatefulSet will also have a unique network identifier in the way of a hostname that is made up of the. 0. Pods deployed by Deployment are identical and interchangeable, created in random order with random hashes in their Pod names. kubectl describe daemonset <daemonset-name>: This command retrieves detailed information about a specific DaemonSet, including its status, events, and the pods it is managing. DaemonSet databases occupy entire sets of nodes. This application is a replicated MySQL database. As nodes are added. 1. -- Kubernetes. apps "es-cluster" created Check the data through the curl request sent to one the Elastic pods. ; The Linode block storage was used in the volumeClaimTemplates. You can use --help after the subcommand to get additional info about possible parameters (for example: kubectl get nodes --help). This improves database security and reduces resource dependencies. kubectl describe svc nginx-app1. apiVersion: apps/v1 kind: Deployment metadata: name: test-app-onkar spec: selector: matchLabels: app: test-app-onkar replicas: 1 template: metadata: name: test-app-onkar labels: app: test-app-onkar. gitignore, defines patterns to ignore when creating the package. 其實是分別由以下三種資訊所組成:. hostPathのVolumeと相性がよいのは、各ノードで1つのみPodが稼働することが保証されるDaemonSetの場合です。IBM Cloud Privateの実装をみても、DaemonSetとして稼働しているコンテナからhostPathのVolumeをマウントしているケースが多くあります。 (補足)daemonset과 statefulset은 위와 같은 방법들을 이용하면 쉽게 aggregation 가능 합니다. )StatefulSet también es un controlador, pero a diferencia del deployment, no crea ReplicaSet sino que crea el Pod directamente con una nomenclatura única. 101 1 6. Kubernetes DaemonSet is a great way to manage and deploy applications in a clustered environment. $ kubectl drain foo --grace-period=900 Options: --delete-emptydir-data=false: Continue even. For instance, you can create a DaemonSet on a cluster with five nodes, and the DaemonSet will schedule a total of five. Monitors Kubernetes deployments in cluster using Prometheus. Desired Number of Nodes Scheduled: 0 Current Number of Nodes Scheduled: 0 Number of Nodes Scheduled with Up-to-date Pods: 0 Number of Nodes Scheduled with Available Pods: 0 Number of Nodes Misscheduled: 0 Pods Status: 0 Running / 0 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=traefik Service. Deployments #kubernetes #replicaset #statefulset #daemonset #deployments #comparsion ALB vs NLB in AWS — Application load balancer vs Network load balancer. However, Kubernetes by default won’t necessarily prioritize fulfilling all requests from one StatefulSet over. If there are pods managed by a DaemonSet, you will need to specify --ignore-daemonsets with kubectl to successfully drain the node. A StatefulSet, unlike a deployment, continues using a persistent identity for each of its pods. Use a DaemonSet instead of a ReplicaSet for Pods that provide a machine-level function, such as machine monitoring or machine logging. DaemonSets are useful for deploying ongoing background tasks that you need to run on all or certain nodes, and. yml. A DaemonSet guarantees that all (or some) nodes have a copy of a pod running. To check your version of Kubernetes, run kubectl version. Kind of like a watch dog. I tested this on kubernetes 1. Conforme se añade más nodos al clúster, nuevos Pods son añadidos a los mismos. kubectl get daemonset – List one or more daemonsets. For clarity the issue with statefulsets is that volumeClaimTemplate doesn't support hostPath out of the box, and LPVs require you to. Some explanation: You do not need a PVC to mount the configmap as a volume to your pods. 스테이트풀셋 API에 대해 이해하기 위해 StatefulSet 오브젝트 정의를 읽는다. Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods. Persistent storage: Kubernetes StatefulSet can manage the creation and deletion of PVCs while. 安定したネットワーク識別子. 3. Kubernetes deploy manifestsedit. This is because the back-end component requires persistent storage and needs to maintain its identity across restarts. A StatefulSet is a Kubernetes API object for managing stateful application workloads. StatefulSet (STS) PersistentVolume (PV) PersistentVolumeClaim (PVC) STSs schedule stateful pods, which can claim PVs through PVCs and mount them as volumes. Likewise, StatefulSets are a great choice for assigning unique resources to containers and maintaining application state. Images may be defined in the values. The key difference between stateful and stateless applications is that stateless applications don’t “store. I’ve seen confusion around what a Deployment vs. Taints are the opposite -- they allow a node to repel a set of pods. 1 require YAML 2. image-pull-policy: kubernetes pods imagePullPolicy kompose. Replace ${NAMESPACE} with your namespaceThe fastest hack is to create a deployment file using. 1. As nodes are removed from the cluster, those bookie pods are garbage collected. Before you begin This is a fairly advanced task and has the potential to violate some of the properties inherent to StatefulSet. md","path":"gke/README. kubernetes. Although they had ReplicaSet, DaemonSet is the K8 object they added. yaml. A DaemonSet ensures that all (or some) nodes run a pod of bookie instance. StatefulSetの概要. Nota: Los StatefulSets son estables (GA) en la versión 1. These pods have a lifetime that is tied to a machine lifetime: the pod needs to be running on the machine before other pods start, and are safe to terminate when the machine is. What is Kubernetes Daemonset? DaemonSet is a Kubernetes feature that lets you run a Kubernetes pod on all cluster nodes that meet certain criteria. StatefulSet is the workload API object used to manage stateful applications. nodeAffinity field (if specified) is taken into consideration by the DaemonSet controller when evaluating the eligible nodes, but is replaced on the created Pod with the node. An example for their usage is a database, such as Postgres. The way I see it, since Fluent Bit is a DaemonSet, I would want. Just like StatefulSets, Kubernetes Deployments let you define the state of the application, and the Deployment’s controller is responsible for maintaining this state.