⚡ ~/naveed Interview Prep
⚡ Portfolio Home ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 998+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
Staff SRE / Principal Architect [L3] General DevOps General DevOps — Scenario-Based Interview Questions Staff SRE Scenario [L3]

Q: An application exposes an endpoint `/generate-report`. It takes 30 seconds to run a heavy database query and return a PDF. If three users click it simultaneously, the server CPU hits 100% and crashes. How do you redesign this architecture for scale?

The current architecture is Synchronous and deeply coupled, blocking the web server thread and exhausting resources.

#General DevOps #General DevOps — Scenario-Based Interview Questions #L3 #DevOps #SRE #Architecture
🎙️ Candidate Opening & Architectural Context
""In our engineering organization, DevOps culture meant aligning developer speed with site reliability. The interviewer is testing: Asynchronous processing, message queues, worker patterns.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement

🛠️ Production Runbook & Step-by-Step Resolution

1️⃣

Initial Diagnostics & Root Cause Analysis

The current architecture is Synchronous and deeply coupled, blocking the web server thread and exhausting resources.

  • When the user hits /generate-report, the web server immediately pushes a message (JSON payload with the user ID and report parameters) onto a Message Queue (e.g., AWS SQS, RabbitMQ, Kafka).
  • The web server instantly returns an HTTP 202 Accepted response with a tracking ID to the user, freeing its thread.
  • An independent fleet of "Worker" instances pulls messages from the SQS queue at their own pace. If a worker can only handle 1 report at a time, it pulls 1 message. The queue absorbs the spike (buffering).
2️⃣

Remediation & Permanent Safeguards

It must be redesigned to an Asynchronous / Event-Driven Pattern:

  • When the worker finishes generating the PDF, it uploads it to S3, and updates a database flag or triggers a WebSocket to notify the user's frontend that the report is ready to download.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: When the user hits /generate-report, the web server immediately pushes a message (JSON payload with the user ID and report paramet."
⚡ 60-Second Elevator Pitch Talking Points
  • When the user hits /generate-report, the web server immediately pushes a message (JSON payload wi...
  • The web server instantly returns an HTTP 202 Accepted response with a tracking ID to the user, fr...
  • An independent fleet of "Worker" instances pulls messages from the SQS queue at their own pace. I...
Advertisement
Want more General DevOps scenarios?
Explore our complete collection of scenario-based General DevOps interview runbooks.
Browse All General DevOps Questions →

📚 Related Production Scenarios in General DevOps