Service discovery
0-day streakReview

Your progress

Level 1

0 XP100 XP to level 2
0day streak
0best streak
0topics started
0cards reviewed
    Review cards

    Progress is stored only in this browser. No account is required.

    Layer 3 · Go deeper · 6 min

    Go deeper

    Size it, build it, then make the calls an interviewer will push you on.

    Back of the envelope

    Size it up

    Tap through each step of the arithmetic.

    A restaurant pod crashes. How many calls hit it before callers notice?

      What does ignoring zones cost one pair of services a day?

        Build-up · 6 steps

        Follow one call through a Kubernetes Service

        Kubernetes bundles third-party registration, a registry, DNS and server-side discovery into one object. Watch pods get listed, get called and leave, without a discovery library.

        Step 1 of 6

        One name, one virtual IP

        A Service selecting the restaurant pods gets a ClusterIP, a virtual IP no machine owns, and a DNS name pointing at it. Pods come and go; callers only ever see the name.

        4 interview moments

        You’re the candidate

        The interviewer pushes on the hard parts. Pick an approach and see how it holds up.

        1. Deep dive 1 of 4

          Interviewer

          “You added restaurant pods, but each order pod’s gRPC calls still land on a single pod. What do you change?”

          The order service calls a ClusterIP Service, so kube-proxy’s rules pick the pod.

          Your move. Pick an approach:

        2. Deep dive 2 of 4

          Interviewer

          “Each rolling deploy drops a handful of requests, even though pods exit cleanly on SIGTERM. What do you change?”

          Your move. Pick an approach:

        3. Deep dive 3 of 4

          Interviewer

          “You need a standalone service registry outside Kubernetes. A teammate proposes ZooKeeper, since it’s strongly consistent. Do you agree?”

          Your move. Pick an approach:

        4. Deep dive 4 of 4

          Interviewer

          “Callers keep hitting crashed pods for up to 60 s: a 30 s TTL plus a 30 s refresh. How do you shrink the damage?”

          Your move. Pick an approach: