3 comments

  • stackskipton3 hours ago
    SRE here, Strong disagree with do not fail readiness and liveness checks on upstream dependencies failing. There are several reason to do so and unless you have extreme start up time, what&#x27;s the problem with restarting?<p>Maybe DNS has changed on you but you are stuck with bad local cache because you poorly respect TTLs (Looking at you Java), reseting the process will clear that cache away.<p>Maybe TCP connections are in stuck weird state, resetting the process generally helps with that.<p>Maybe someone gave you bad ENV VARs and you cannot connect to database, by refusing to progress the rollout, no outage generated.<p>So yea, if you are not ready to do work including critical upstream dependencies, don&#x27;t lie to system and say you are.
    • dilyevsky2 hours ago
      1. was already mentioned in sibling - cascade failures<p>2. you&#x27;ll have massive number of restarts for various flake reasons and missing things that got papered over with restarts until you hit 1 and everything is broken. another popular version of this is &quot;just restart when memory leaks too much&quot;
    • arccy2 hours ago
      Thundering herd &#x2F; cascading outages. You take out a large enough portion of your fleet, and the remaining load overloads your remaining nodes one by one as they restart, so you can never have enough healthy nodes.
      • erulabs2 hours ago
        <i>SRE team debates correctness versus availability for the 540th time this year</i><p>You&#x27;re both correct, of course!
        • solatic1 minute ago
          You&#x27;d be surprised how many engineering leaders don&#x27;t understand the CAP theorem and will fail engineers on interviews for picking the one they don&#x27;t agree with instead of communicating their expectations clearly (dodged a bullet on that one ...)
        • atmosx2 hours ago
          What this guy said :point_up:<p>My personal take-away is this: whatever you choose, make sure it&#x27;s consistent across services (not serviceA behaves like X and serviceB like Y) and make sure eng teams know _how_ these are configured and what can go wrong. They&#x27;ll figure out the rest.
      • jaggederest1 hour ago
        That&#x27;s a problem for circuitbreakers on these kinds of actions, not lying on health checks.<p>Something like healthcheck fails -&gt; restart -&gt; healthcheck fails -&gt; restart -&gt; healthcheck fails -&gt; circuit breaker trip, alarm raised, give up until manual intervention or X minutes have passed
        • deathanatos1 hour ago
          That circuitbreaker exists, by default. It is &quot;CrashloopBackoff&quot;, here, and TFA covers it. (&amp; it&#x27;s an &quot;until X minutes have passed&quot; kind, by default.)
          • dilyevsky42 minutes ago
            backoff is only applied to individual pods&#x2F;containers not across pods. the point is at scale it&#x27;s easy to get into a situation where it&#x27;s not possible to recover without (usually manual) full service drain
    • figmert57 minutes ago
      My favourite: misconfigured Linkerd setup that causes CA certs to rotate every month :) Definitely worth restarting on that
    • peterabbitcook1 hour ago
      What are your feelings about using initContainers and wait-for-it to skirt the thundering-herd problem?
    • connicpu1 hour ago
      The better solution is to not have too many critical upstream services :)
    • cmckn2 hours ago
      &gt; what&#x27;s the problem with restarting?<p>Exponential backoff can delay recovery up to kubelet’s maxContainerRestartPeriod (default 5m).
    • javier21 hour ago
      cascading failures on upstream services. then you get 20 different services failing instead of the single one.
  • sidcool3 hours ago
    This does not state anything new, but explains it so much well than the kubernetes documentation.
    • dev_cprice3 hours ago
      Sam has a real way with words when it comes to educational content.<p>Though he did find a legit Kubernetes bug while writing the post, so technically there was at least one new thing :)
    • srichard163 hours ago
      Sometimes the k8s docs remind me of google&#x27;s documentation
      • leetrout3 hours ago
        many times i have said a company could be built to just make better google documentation.
  • stroebs1 hour ago
    I need to know how to animate things like this for internal documentation.