Practice
Solution
Step 1: Identify storage with native TTL support
Redis supports automatic expiration of keys with TTL, avoiding manual cleanup overhead.Step 2: Evaluate alternatives
Relational DB with batch jobs (A) adds latency and complexity; file systems (C) lack efficient expiration; NoSQL without TTL (D) requires expensive filtering.Final Answer:
Option D -> Option DQuick Check:
Redis TTL automates expiration, reducing operational complexity [check]
Solution
Step 1: Identify serialization and transport needs
Low-latency and strongly typed RPC require efficient binary serialization and HTTP/2 transport.Step 2: Evaluate technology fit
gRPC uses Protocol Buffers for compact binary serialization and HTTP/2 for multiplexed streams, meeting requirements. REST with JSON is flexible but slower and less type-safe. GraphQL is query-focused, not RPC. SOAP is verbose and outdated.Final Answer:
Option D -> Option DQuick Check:
gRPC + Protobuf -> low-latency, strongly typed RPC [check]
Solution
Step 1: Identify the component responsible for real-time error budget calculation
The metrics aggregation service continuously processes incoming metrics to compute SLO compliance and error budget burn rates, enabling timely alerts.Step 2: Eliminate other options based on their roles
Kafka stores raw data but does not compute error budgets in real time; tracing systems focus on request-level diagnostics, not aggregate error rates; dashboards visualize data but do not perform calculations.Final Answer:
Option B -> Option BQuick Check:
Metrics aggregation service -> real-time error budget tracking [check]
Solution
Step 1: Identify stateless server benefits
Stateless servers allow horizontal scaling without session affinity, reducing latency and complexity.Step 2: Evaluate session management
External session storage decouples session state from servers, enabling load balancer to distribute requests evenly.Final Answer:
Option B -> Option BQuick Check:
Stateless servers + external session store -> scalable, low-latency [check]
Solution
Step 1: Identify storage requirements
Embedding storage requires low-latency reads and frequent writes at scale with high availability.Step 2: Evaluate storage options
Relational DB (A) struggles with write throughput and scaling; Cassandra (B) offers tunable consistency but may add complexity; file system batch loading (D) introduces stale data and high latency. Document store (C) supports flexible schema and fast reads with embedded documents, balancing latency and update frequency.Final Answer:
Option A -> Option AQuick Check:
Document store balances flexible schema and read/write latency [check]
