Design a Five-Minute Top-K Error Log Service

Last updated: September 5, 2026

Quick Overview

Design a service that retrieves the top K error logs from a massive volume of URL access logs while considering memory constraints and recent access patterns.

Oracle
System Design
Software Engineer
Oracle
September 5, 2026
Software Engineer
Onsite
System Design
Medium

0

0

6 solved


Design a service that retrieves the top K error logs from a massive volume of URL access logs while considering memory constraints and recent access patterns.

This question is typically asked during the onsite interview round for software engineering candidates at Oracle. The interviewer is evaluating the candidate's ability to design scalable systems, understand trade-offs in system architecture, and implement effective solutions under constraints. The focus is on both high-level design and the ability to dive into specific implementation details, including pseudocode.

What the Interviewer Expects
  • Clearly define the requirements and constraints of the system.
  • Provide a high-level design that outlines major components and data flow.
  • Discuss trade-offs involved in design decisions, especially regarding memory and processing.
  • Include pseudocode or a detailed algorithm for retrieving the top K logs.
  • Consider performance implications and scaling strategies.
Key Topics to Cover
System design
Trade-offs
Pseudocode implementation
Memory constraints
Data processing
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you handle data persistence for the logs?
  • What would you change if the data volume increased significantly?
  • Can you explain how you would implement the sliding time window for event processing?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

To design a Five-Minute Top-K Error Log Service, we need to achieve two main objectives: 1. Retrieve the global Top K URLs from a massive volume of access logs. 2. Identify the Top K URLs with the hig...

High-Level Design

The architecture consists of several components: 1. Log Ingestion: A service that collects access logs in real-time. 2. Data Storage: A distributed storage system (e.g., Cassandra) to store lo...


Submit Your Answer
Markdown supported

Related Questions