Skip to content

[Standard] Stabilize node distribution standard #639

Closed

Description

@cah-hbaum

Follow-up for #524
The goal is to set the Node distribution standard to Stable after all discussion topics are debated and decided and the necessary changes derived from these discussions are integrated into the Standard and its test.

The following topics need to be discussed:

Activity

  1. added
    Container
    standards
    SCS is continuously built and tested
    SCS is standardized
    SCS-VP10
    on Jun 17, 2024
  2. self-assigned this
    on Jun 17, 2024
  3. moved this from Backlog to Blocked / On hold in Sovereign Cloud Stackon Jun 17, 2024
  4. moved this from Blocked / On hold to Doing in Sovereign Cloud Stackon Jun 17, 2024
  5. cah-hbaum commented on Jun 24, 2024

    @cah-hbaum
    ContributorAuthor

    Topic 1: How is node distribution handled on installations with shared-control planes nodes?

    e.g. Kamaji, Gardener, etc

    This question was answered in Container Call 2024-06-27:

    For example, regiocloud supports the Node Failure Tolerance case but not the Zone Failure Tolerance.

  6. cah-hbaum commented on Jun 25, 2024

    @cah-hbaum
    ContributorAuthor

    Topic 2: Differentiation between Node distribution and things like High Availability, Redundancy, etc.

    I think to discuss this topic correctly, most of the wording/concepts need to be established first. I'm going to try and find multiple (if different) sources and link them here for different things.


    High Availability

    The main goal of HA is to avoid downtime, which is the period of time when a system, service, application, cloud service, or feature is either unavailable or not functioning properly. (https://www.f5.com/glossary/high-availability)
    High availability means that an IT system, component, or application can operate at a high level, continuously, without intervention, for a given time period. ... (https://www.cisco.com/c/en/us/solutions/hybrid-work/what-is-high-availability.html)
    High availability means that we eliminate single points of failure so that should one of those components go down, the application or system can continue running as intended. In other words, there will be minimal system downtime — or, in a perfect world, zero downtime — as a result of that failure. (https://www.mongodb.com/resources/basics/high-availability)

    So things termed with High Availability in general try to avoid downtime of their services with the goal of having zero downtime, which is most times not achievable. This can also be seen in this section: ... In fact, this concept is often expressed using a standard known as "five nines," meaning that 99.999% of the time, systems work as expected. This is the (ambitious) desired availability standard that most of us are aiming for. ... (https://www.mongodb.com/resources/basics/high-availability).
    To achieve these goals, services, hardware or networks are most times provided in a redundant setup, which allows automatic fail-over if instances go down.


    Redundancy
    In engineering and systems theory, redundancy is the intentional duplication of critical components or functions of a system with the goal of increasing reliability of the system... )https://en.wikipedia.org/wiki/Redundancy_(engineering))
    In cloud computing, redundancy refers to the duplication of certain components or functions of a system with the intention of increasing its reliability and availability. (https://www.economize.cloud/glossary/redundancy)

    HINT: WILL BE CONTINUED LATER

  7. changed the title [-][Standard] Follow-Up Node distribution standard[/-] [+][Standard] Stabilize node distribution standard[/+] on Jun 27, 2024
  8. martinmo commented on Jun 27, 2024

    @martinmo
    Member

    I brought this issue up in today's Team Container Call and edited the above sections accordingly. As part of #649 we will also get access to Gardener and soon Kamaji clusters.

    One thing I want to make you aware of @cah-hbaum: in the call, it was pointed out that term shared control-plane isn't correct. The control-plane isn't shared, instead, the control-plane nodes are shared and thus we should always say shared control-plane node.

    (I edited above texts accordingly as well to refer to shared control-plane nodes.)

  9. joshmue commented on Aug 8, 2024

    @joshmue
    Contributor

    Another potential problem with the topology.scs.community/host-id label:

    The concept of using the "host-id" may not play nice with VM live migrations.

    I do not have any operational experience with e. g. Openstack live migrations (who is triggering them, when, ...?), but I guess that any provider-initiated live migration (which might be standard practice within zones, I guess) would invalidate any scheduling decision that Kubernetes made based on the "host-id" label. As Kubernetes does not reevaluate scheduling decisions, pods may end up on the same host, anyway (if the label even ends up updated). That in turn may be worked around by using the Kubernetes descheduler project.

    If I did not miss anything, I guess there are roughly the following options:

    • Rule out live migrations
    • Remove the "host-id" label requirement
    • Specify how certain scenarios should play out in the standard (e. g. requiring descheduler)
  10. 19 remaining items

  11. mbuechse commented on Nov 15, 2024

    @mbuechse
    Contributor

    Standard says:

    The control plane nodes MUST be distributed over multiple physical machines.

    So we need to be able to validate that.

    It also says

    At least one control plane instance MUST be run in each "failure zone"

    But you could have only one failure zone. Then, still, the control plane nodes must be distributed over multiple physical hosts.

    The host-id field is not necessarily meant for scheduling (particularly for the control plane, where the user cannot schedule anything, right)?

    Does that make sense?

  12. mbuechse commented on Nov 15, 2024

    @mbuechse
    Contributor

    BTW, I'm open to improving the wording to avoid any misunderstanding here. At this point, though, we first have to agree on what's reasonable at all.

  13. joshmue commented on Nov 15, 2024

    @joshmue
    Contributor

    The control plane nodes MUST be distributed over multiple physical machines.

    Did not see that, actually!

    Still, let's go through some cases of what "failure zone" may mean:

    • zone equals one of many co-located buildings
    • zone equals one of many rooms within a building
    • zone equals one of many racks within a room
    • zone equals one of many machines within a rack

    If topology.kubernetes.io/zone is defined as any of these things, it can be used to test the standard and the above requirement is satisfied (In a world where a single VM is always local to one hypervisor at any point of time).

    Theoretically, one may define "failure zone" as something like:

    • zone equals one of many isolation groups within a machine

    But the standard already implicitly says that the smallest imaginable unit is a single unit machine.

    Zones could be set from things like single machines or racks up to whole datacenters or even regions

    EDIT: But yes, introducing this specific requirement may be a bit confusing, having the other wording referring to logical failure zones. And mandating it may only be checked by having a "host-id" with some strict definition - or (better) defining that topology.kubernetes.io/zone must be at least be a physical machine.

  14. joshmue commented on Nov 15, 2024

    @joshmue
    Contributor

    But you could have only one failure zone.

    I see that this is not explicitly forbidden in the standard, but all the texts hints towards it being forbidden, so I assumed it:

    It is therefore necessary for important data or services to not be present just on one failure zone

    At least one control plane instance MUST be run in each "failure zone"

    Since some providers only have small environments to work with and therefore couldn't comply with this standard, it will be treated as a RECOMMENDED standard, where providers can OPT OUT.

  15. piobig2871 commented on Nov 15, 2024

    @piobig2871

    Theoretically, one may define "failure zone" as something like:

    * zone equals one of many isolation groups within a machine
    

    Like a network?

    But you could have only one failure zone.

    I see that this is not explicitly forbidden in the standard, but all the texts hints towards it being forbidden, so I assumed it:

    It is therefore necessary for important data or services to not be present just on one failure zone

    I have thought about it like we have 1 failure zone by one control plane and the workers may be diverse on the different machines physical or virtual

    At least one control plane instance MUST be run in each "failure zone"

    Like here is mentioned

  16. mbuechse commented on Nov 15, 2024

    @mbuechse
    Contributor

    Well. It seems that the concepts of failure zone and physical host are a bit at odds.

    From the Kubernetes POV two physical hosts within the same failure zone seem to be considered not much better than just one host. In other words, they just don't care that much about hosts. Failure zones can be defined by the CSP in any way they deem appropriate, so smaller CSPs could indeed say each host is a failure zone or each rack is a failure zone. It would probably be better to have multiple zones that are just hosts or racks than to have only one zone. Therefore, we could mandate to have multiple zones and then drop the whole part about the physical hosts (including the host-id label). Is that what you mean?

    If that's all true, then I'm wondering why the hosts have been introduced in the first place. There must have been discussions about that in Team Container with intelligent and experienced people involved.

  17. joshmue commented on Nov 18, 2024

    @joshmue
    Contributor

    Theoretically, one may define "failure zone" as something like:

    * zone equals one of many isolation groups within a machine
    

    Like a network?

    I just wanted to give an example of a theoretically viable, yet hypothetical runtime unit within a single machine.

    Well. It seems that the concepts of failure zone and physical host are a bit at odds.

    From the Kubernetes POV two physical hosts within the same failure zone seem to be considered not much better than just one host. In other words, they just don't care that much about hosts. Failure zones can be defined by the CSP in any way they deem appropriate, so smaller CSPs could indeed say each host is a failure zone or each rack is a failure zone. It would probably be better to have multiple zones that are just hosts or racks than to have only one zone. Therefore, we could mandate to have multiple zones and then drop the whole part about the physical hosts (including the host-id label). Is that what you mean?

    Yes. CSP's with hosts as failure zones still would have problems with live-migrations and the assumption that topology labels do not change, but by removing the "host-id" requirement, this problem should be exclusive to such small/tiny providers.

    On another note, the recommendation here...

    At least one control plane instance MUST be run in each "failure zone", more are RECOMMENDED in each "failure zone" to provide fault-tolerance for each zone.

    does not seem to take etcd quorum and/or etcd scaling sweet spots into account ( https://etcd.io/docs/v3.5/faq/ ). But it does not strictly mandate questionable design choices (only slightly hints at them), so I will not go into too much detail, here.

  18. piobig2871 commented on Nov 18, 2024

    @piobig2871

    Well. It seems that the concepts of failure zone and physical host are a bit at odds.

    From the Kubernetes POV two physical hosts within the same failure zone seem to be considered not much better than just one host. In other words, they just don't care that much about hosts. Failure zones can be defined by the CSP in any way they deem appropriate, so smaller CSPs could indeed say each host is a failure zone or each rack is a failure zone. It would probably be better to have multiple zones that are just hosts or racks than to have only one zone. Therefore, we could mandate to have multiple zones and then drop the whole part about the physical hosts (including the host-id label). Is that what you mean?

    If that's all true, then I'm wondering why the hosts have been introduced in the first place. There must have been discussions about that in Team Container with intelligent and experienced people involved.

    You raised an important point about the potential misalignment between the concepts of failure zones and physical hosts. AFAIU from Kubernetes' perspective, failure zones are abstract constructs defined to ensure redundancy and fault isolation. The actual granularity of these zones (e.g., a rack, a data center, or even an individual physical host) depends on the cloud service provider's (CSP's) design.

    Kubernetes treats all nodes within a failure zone as equally vulnerable because the assumption is that a failure impacting one could potentially affect all others in the same zone. This approach is why zones matter more than individual hosts when scheduling workloads. For smaller CSPs, defining each host or rack as its own failure zone might be a practical approach to increase redundancy, especially when physical resources are limited. It aligns with your suggestion to mandate multiple zones while dropping specific focus on physical hosts.

    At least one control plane instance MUST be run in each "failure zone", more are RECOMMENDED in each "failure zone" to provide fault-tolerance for each zone.

    does not seem to take etcd quorum and/or etcd scaling sweet spots into account ( https://etcd.io/docs/v3.5/faq/ ). But it does not strictly mandate questionable design choices (only slightly hints at them), so I will not go into too much detail, here.

    Etcd’s own documentation highlights the challenges of maintaining quorum and scalability in distributed systems, particularly as the cluster size increases beyond the optimal sweet spot of 3-5 nodes.

    Right now I am wondering what alternative strategies could be employed to balance the need for fault tolerance across failure zones while adhering to etcd’s quorum and scaling best practices?

  19. garloff commented on Nov 18, 2024

    @garloff
    Member

    Well. It seems that the concepts of failure zone and physical host are a bit at odds.

    From the Kubernetes POV two physical hosts within the same failure zone seem to be considered not much better than just one host. In other words, they just don't care that much about hosts. Failure zones can be defined by the CSP in any way they deem appropriate, so smaller CSPs could indeed say each host is a failure zone or each rack is a failure zone. It would probably be better to have multiple zones that are just hosts or racks than to have only one zone. Therefore, we could mandate to have multiple zones and then drop the whole part about the physical hosts (including the host-id label). Is that what you mean?

    If that's all true, then I'm wondering why the hosts have been introduced in the first place. There must have been discussions about that in Team Container with intelligent and experienced people involved.

    We have an availability zone standard (0121), you probably know it better than me.
    Many providers do not have several AZs, either because they are too small or because they use shared-nothing architectures with several regions rather than several AZs.

    I would highly discourage to now disconnect the notion of infra-layer availability zones from "Failure Zones" in Kubernetes. A recipe for confusion.

    Single hosts can fail for a variety of reasons, e.g. broken RAM or broken PSU or broken network port or even just a regular maintenance operation (hypervisor or firmware upgrade). In a data center, these events happen much more often than the outage of a complete room/zone/AZ. We want to avoid one host to take down several control plane nodes in the cluster, that is the whole point of having several nodes in the first place. Yes, multi-AZ is nicer, but that is a luxury that we don't always have. Having multiple physical hosts is much better than not. If we can not succeed with an upstream host-id label, we have a difficult time to test this from within the cluster. We can still easily test this if we have access to the IaaS layer that hosts the cluster, of course. Not ideal, but no reason to drop the requirement, IMVHO.

  20. piobig2871 commented on Nov 19, 2024

    @piobig2871

    Single hosts can fail for a variety of reasons, e.g. broken RAM or broken PSU or broken network port or even just a regular maintenance operation (hypervisor or firmware upgrade). In a data center, these events happen much more often than the outage of a complete room/zone/AZ. We want to avoid one host to take down several control plane nodes in the cluster, that is the whole point of having several nodes in the first place. Yes, multi-AZ is nicer, but that is a luxury that we don't always have. Having multiple physical hosts is much better than not. If we can not succeed with an upstream host-id label, we have a difficult time to test this from within the cluster. We can still easily test this if we have access to the IaaS layer that hosts the cluster, of course. Not ideal, but no reason to drop the requirement, IMVHO.

    With that comment can we assume that the Node distribution and High Availability topics will be separated for the standard purposes? Would separated standards be more clear than creation of the corner cases?

  21. piobig2871 commented on Nov 19, 2024

    @piobig2871

    Also, I have found that in standard k8s-node-anti-affinity there is a note already regarding high availability but it still not defines how those machines has to be connected to each other.

    In a productive environment, the control plane usually runs across multiple machines and
    a cluster usually contains multiple worker nodes in order to provide fault-tolerance and
    high availability.

    That is why I have created a separate scs-0219-v1-high-availability to consider on my branch in a draft mode to discuss

  22. piobig2871 commented on Nov 22, 2024

    @piobig2871

    points established on the container call (21.11.2024):

    • drop any mention of this label (host-id) from the standard - remove host-id label and we have to start looking on the infrastructure during updates in order to be able to test if the configuration uses OpenStack (because we cantest it) otherwise provider has to implement the check if the control plane is on another node

    • in the meantime: just demand an assertion by the CSP?

    • The test script can not do its jobs currently due to the missing host-id label, need to rewrod the language to make sense before stabilization

      ToDo: Check whether we just stick to v1 then or whether we can do a quick fix for v2 (@piobig2871, @garloff)

    • More generic K8s HA work (@piobig2871): issue standards/#639, PR standards/#806

      Needs renumbering (0219->0220)
      Good work that should continue
      Will possibly supercede 0214 some day

    • External etcd (or even redis) is possible (and does not contradict any of our standards)

  23. mbuechse commented on May 7, 2025

    @mbuechse
    Contributor

    The standard has been stable since November 21st, 2024 -- see #835

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ContainerSCS is continuously built and testedSCS is standardizedSCS-VP10standards

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions