Practice
Solution
Step 1: Identify client-side discovery benefits
Client-side discovery allows services to query a registry and cache endpoints locally, avoiding central bottlenecks and enabling dynamic load balancing.Step 2: Eliminate other options
A centralized service registry with server-side load balancing centralizes load balancing, risking bottlenecks; DNS-based service discovery without client-side caching lacks caching, causing latency; Static configuration files listing all service endpoints is static and not dynamic.Final Answer:
Option D -> Option DQuick Check:
Client caches endpoints and load balances locally [check]
Solution
Step 1: Analyze scaling impact on components
Downstream service (A) is protected by circuit breaker; load balancer (C) scales horizontally; client cache (D) is local and less critical.Step 2: Identify circuit breaker state store bottleneck
Centralized state store for circuit breaker metrics faces contention and latency at 10x concurrency, causing delays and incorrect breaker states.Final Answer:
Option B -> Option BQuick Check:
Centralized circuit breaker state store bottlenecks first at scale [check]
Solution
Step 1: Identify bottlenecks at 10x scale
Network switches (A) scale with hardware upgrades; ZooKeeper (C) handles coordination but is lightweight compared to brokers; consumers (D) can be scaled horizontally.Step 2: Kafka broker partition leader overload
Partition leaders handle all writes and replication for their partitions; at 10x scale, leaders become hotspots causing CPU, disk, and network saturation, leading to failures.Final Answer:
Option A -> Option AQuick Check:
Partition leaders overloaded -> broker failure first at scale [check]
Solution
Step 1: Identify Redis command processing model
Redis processes commands single-threaded, limiting throughput regardless of hardware.Step 2: Analyze scaling impact
At 10x scale, Redis becomes the bottleneck as it cannot process atomic increments fast enough.Step 3: Evaluate other components
API servers can be scaled horizontally; network and clients are less likely to fail first.Final Answer:
Option C -> Option CQuick Check:
Redis single-threaded processing limits throughput at high scale [check]
Solution
Step 1: Analyze timestamp and network constraints
Timestamp synchronization (A) is challenging but tolerable with NTP; network coordination (D) is minimal as IDs are generated locally.Step 2: Evaluate sequence number limits
Sequence number (B) limits per millisecond can cause blocking but can be mitigated by load balancing or sharding.Step 3: Identify machine ID allocation bottleneck
Machine ID bits are fixed (e.g., 10 bits), limiting the number of unique machines. At 10x scale, running out of unique machine IDs causes collisions or requires complex reallocation.Final Answer:
Option D -> Option DQuick Check:
Fixed machine ID bits limit scale -> collisions or reconfiguration needed [check]
