0
0
Microservicessystem_design~20 mins

Three pillars (metrics, logs, traces) in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Three Pillars Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the role of metrics in microservices monitoring

Which of the following best describes the primary purpose of metrics in monitoring microservices?

AMetrics offer aggregated numerical data over time to track system performance and health.
BMetrics trace the path of a request through multiple services to identify latency bottlenecks.
CMetrics provide detailed records of individual events and errors for debugging purposes.
DMetrics store raw logs from all microservices for audit and compliance.
Attempts:
2 left
💡 Hint

Think about what numbers like CPU usage or request counts represent.

Architecture
intermediate
2:00remaining
Choosing the right pillar for debugging a failed request

You notice a user request failed in your microservices system. Which pillar should you consult first to find detailed information about the error and its context?

AMetrics, because they show aggregated error rates over time.
BTraces, because they provide numerical summaries of system health.
CLogs, because they contain detailed event records and error messages.
DMetrics and traces only, since logs are too large to be useful.
Attempts:
2 left
💡 Hint

Consider which pillar records detailed messages about what happened.

scaling
advanced
2:00remaining
Scaling trace collection in a high-traffic microservices environment

Your microservices system handles millions of requests per minute. You want to collect traces to understand request flows without overwhelming storage or processing. Which approach is best?

AOnly collect metrics and logs, ignoring traces to save resources.
BCollect traces for every request and store all data indefinitely.
CCollect traces only for requests that do not generate logs.
DSample a small percentage of requests for tracing and keep traces for a limited time.
Attempts:
2 left
💡 Hint

Think about balancing data volume and usefulness.

tradeoff
advanced
2:00remaining
Tradeoffs between logs and metrics for alerting

When setting up alerts for your microservices, what is a key tradeoff between using logs versus metrics?

ALogs provide fast, aggregated alerts but lack detail; metrics provide detailed alerts but are slow.
BMetrics enable fast, low-overhead alerts but may miss detailed context; logs provide rich detail but are costly to process in real-time.
CLogs and metrics both provide identical alerting capabilities with no tradeoffs.
DMetrics are only useful for debugging, while logs are only useful for performance monitoring.
Attempts:
2 left
💡 Hint

Consider speed and detail in alerting.

estimation
expert
3:00remaining
Estimating storage needs for logs, metrics, and traces

Your microservices system generates the following per minute: 10 million requests, 100 metrics per service per minute (50 services), and 1 log entry per request. Estimate the relative daily storage needed for logs, metrics, and traces assuming traces are collected for 1% of requests and each trace is 10 times the size of a log entry.

ALogs: 14 TB, Metrics: 720 MB, Traces: 1.4 TB
BLogs: 1.4 TB, Metrics: 720 GB, Traces: 14 TB
CLogs: 14 GB, Metrics: 720 MB, Traces: 140 GB
DLogs: 140 TB, Metrics: 7.2 GB, Traces: 14 TB
Attempts:
2 left
💡 Hint

Calculate logs as requests × log size × minutes per day; metrics as metrics × services × minutes per day; traces as 1% of requests × 10 × log size × minutes per day.