Kubernetes Service Mesh and HPA for Microservices
Short answer
A Use a container orchestration platform with a service mesh and horizontal pod autoscaler so Kubernetes DNS, mesh load balancing, and metric-driven replicas satisfy discovery, traffic distribution, and automated scaling.
Question
Key Takeaways
Microservices architectures achieve service discovery, load balancing, and automated scaling by combining a container orchestration platform with a service mesh and a horizontal pod autoscaler. Kubernetes supplies DNS-based service discovery, the mesh adds L7 traffic routing and resilience, and the HPA changes pod replicas from observed metrics. That native combination makes option A correct; VM DNS round-robin, monolithic vertical scaling, and serverless with manual instance management each break at least one stated requirement.
Expert Analysis
The decisive condition is that service discovery, load balancing, and automated scaling must all be delivered by one operating model, and a Kubernetes-style orchestration platform paired with a service mesh and a horizontal pod autoscaler meets that triad natively.
Native Kubernetes primitives close all three requirements at once
A Kubernetes cluster already supplies discovery through a stable Service abstraction and cluster DNS: each workload reaches a named service, and the kube-proxy rules or an ingress path distribute traffic without engineers editing records. A service mesh adds the L7 layer that a bare Service lacks, applying sidecar or ambient proxies for retries, timeouts, mutual TLS, traffic splitting, and observability across east-west calls. The horizontal pod autoscaler closes the third requirement by watching CPU, memory, or custom metrics from the metrics API and changing the Deployment's replica count through the scale subresource. Those pieces are complementary rather than duplicative: DNS and Service objects answer 'where is the endpoint,' the mesh decides 'which endpoint and how,' and HPA answers 'how many pods should exist.' Because every function is driven by declarative Kubernetes objects, the design remains reproducible, policy-controllable, and observable, which is exactly the cloud-native operating model the architecture demands. Readiness probes keep traffic away from starting pods while HPA scales, and PodDisruptionBudgets preserve availability during voluntary disruptions; neither is available from manual DNS or a hardware balancer. The combination therefore satisfies the requirement without adding an external discovery registry or hand-maintained load-balancer pool; that is precisely the combination option A names.
Replacing orchestration with manual DNS or a monolith forfeits automation
Option B keeps the engineer in the control loop: VMs need hand-maintained DNS records, round-robin records cannot detect an unhealthy backend, and there is no autoscaling object to react to a traffic spike, so all three stated capabilities become operations work rather than platform behavior. Option C breaks the architecture at a more fundamental level: a monolith with vertical scaling cannot be decomposed into independently deployable services, and a hardware load balancer distributes connections to a fixed set of large hosts instead of routing among microservice endpoints; adding CPU or memory to one host also has a ceiling and often requires downtime. Option D appears modern because serverless functions and an API gateway offer managed ingress, but 'manual instance management' removes the automated scaling the design explicitly requires, and the API gateway is not a service mesh or a workload orchestrator; concurrency limits, cold starts, and per-function configuration would have to be managed by hand. Each alternative trades away at least one named requirement, while none restores it with a native, declarative control loop.
Service mesh load balancing is not the same control plane as HPA replica scaling
The design conflates traffic distribution with capacity change. A service mesh such as Istio or Linkerd governs how a request reaches an existing endpoint: it programs proxies for discovery, retries, outlier detection, mTLS, and L7 routing, but it does not create or delete pods. The horizontal pod autoscaler is a Kubernetes control loop that reads metrics and edits the replica count of a Deployment or ReplicaSet; its output is more or fewer instances, not a routing decision. The API gateway in option D sits at yet another boundary—north-south ingress from clients—and neither replaces the mesh's east-west behavior nor supplies HPA's replica control. Even Kubernetes' built-in Service load balancing is distinct: it gives a stable virtual IP and DNS name, while the mesh adds per-request policy above it. This is why the correct combination names both a service mesh and an HPA rather than treating 'load balancing' and 'automated scaling' as one feature. If a proposed design can route traffic but cannot change replica count from metrics, it has satisfied only half of the requirement; if it can scale but has no service discovery path, it has satisfied the other half only by accident.
Treat a stated 'automated scaling' requirement as a disqualifier for manual instance management
When a requirement set lists discovery, load balancing, and automated scaling together, translate each noun into a concrete control loop before comparing products. Discovery maps to cluster DNS or a service registry; load balancing maps to a Service, ingress controller, or mesh proxy; automated scaling maps to an autoscaler that observes a metric and changes capacity without a human. If an option contains 'manual' anywhere in its scaling path, it fails the third test regardless of how strong its other components are—option B's manual DNS and option D's manual instance management both fail on that single word. If an option promises scaling only by adding resources to one host, it is vertical scaling, which cannot deliver elastic horizontal capacity for microservices. The correct pattern names the automation mechanism explicitly: an HPA for pod replicas, with cluster autoscaling beneath it when node capacity is exhausted, and a mesh for traffic policy. That rule also guards against attractive but incomplete answers: a serverless platform can autoscale, but only if the option does not pair it with manual instance management and does provide the required discovery and routing. Carry the mapping forward and the decision reduces to checking which option supplies all three control loops with native, declarative resources rather than operational toil.
Official Reference
- https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
- https://istio.io/latest/docs/concepts/traffic-management/
- https://kubernetes.io/docs/concepts/services-networking/service/
These links open the official vendor documentation in a new tab.
Exam Strategy
When a requirement lists discovery, load balancing, and automation, map each one to a separate mechanism before reading the options: DNS or a registry for discovery, a Service or mesh for traffic, and an autoscaler for capacity. Eliminate any option containing manual DNS, fixed round-robin pools, vertical-only scaling, or manual instance management, because those replace automation with operator effort. In serverless options, check whether scaling is actually managed rather than paired with manual controls. Then select the option that names all three control loops explicitly.
Related Analysis
Practice All CV0-004 Questions
Access 100 questions with complete answers and detailed explanations.
View Full CV0-004 Practice Test →