Practice
1. For real-time analytics requiring low-latency dashboards and complex ad-hoc queries, which architecture is best suited?
medium
Solution
Step 1: Evaluate streaming aggregation and query needs
Flink excels at complex streaming aggregations; OLAP stores support fast ad-hoc queries and low-latency dashboards.Step 2: Eliminate other options
Kafka Streams lacks complex query capabilities; batch ETL adds latency unsuitable for real-time; NoSQL key-value stores lack rich query support for dashboards.Final Answer:
Option D -> Option DQuick Check:
Flink + OLAP store balances streaming and query complexity [check]
Hint: Flink streams, OLAP queries for real-time + ad-hoc [check]
Common Mistakes:
2. For global video delivery, which architecture better handles sudden traffic spikes in a specific region with minimal latency increase?
medium
Solution
Step 1: Evaluate architectures for traffic spike handling
Centralized origin (Centralized origin server cluster with global load balancer) risks overload and latency spikes. Peer-to-peer (Peer-to-peer streaming where clients share video chunks directly) depends on client availability and is complex for global scale. Independent origins without caching (Multiple independent origin servers in each region without caching) lack scalability and increase origin load.Step 2: Assess hierarchical CDN benefits
Regional edge caches (Hierarchical CDN with regional edge caches and origin fallback) absorb traffic spikes locally, reducing origin load and latency, providing scalable and resilient delivery.Final Answer:
Option A -> Option AQuick Check:
Hierarchical CDN absorbs regional spikes with low latency [check]
Hint: Regional caches absorb spikes, origin fallback reduces load [check]
Common Mistakes:
3. For a system requiring per-user rate limits with minimal latency, which architecture is better and why?
medium
Solution
Step 1: Compare latency and scalability
Synchronous DB updates cause high latency and DB bottlenecks; client-side counters are untrustworthy; service-layer without persistence risks data loss.Step 2: Evaluate distributed in-memory counters
API Gateway counters provide low latency and scalability; async DB sync ensures eventual consistency and durability.Final Answer:
Option D -> Option DQuick Check:
Distributed in-memory counters balance latency and scalability [check]
Hint: Async DB sync + in-memory counters = low latency + scalability [check]
Common Mistakes:
4. For a microservices architecture with frequent service instance churn and strict latency requirements, which service discovery approach is best and why?
medium
Solution
Step 1: Analyze churn and latency constraints
Frequent churn requires fast updates; strict latency demands minimal network hops.Step 2: Evaluate discovery approaches
Client-side discovery with caching reduces latency and adapts quickly; server-side adds network hop; DNS TTL delays updates; static configs are stale.Final Answer:
Option B -> Option BQuick Check:
Client caches endpoints locally for low latency and churn handling [check]
Hint: Client caches endpoints for fast updates and low latency [check]
Common Mistakes:
5. At 10x scale of global traffic, which component in the BGP-based routing infrastructure is most likely to fail first, and why?
hard
Solution
Step 1: Identify bottleneck at scale
Edge routers handle packet forwarding at line rate; at 10x traffic, their CPU and forwarding ASICs are stressed first.Step 2: Evaluate other components
Route reflectors (A) scale better with hierarchical design; monitoring systems (C) can be scaled horizontally; client devices (D) are downstream and less critical for routing stability.Final Answer:
Option A -> Option AQuick Check:
Edge routers' CPU overload causes first failure at 10x traffic [check]
Hint: Edge routers hit CPU limits first at massive scale [check]
Common Mistakes:
