Google Site Reliability Engineer (Mid-Level) Interview Preparation Guide
Google's SRE interview process for mid-level candidates combines technical depth with systems thinking and behavioral assessment. The process evaluates candidates across five core dimensions: coding proficiency, Linux internals and systems knowledge, troubleshooting and incident response capabilities, non-abstract large system design (NALSD), and cultural fit with Google's values. Mid-level candidates are expected to demonstrate strong independent problem-solving, the ability to own medium-sized projects, and emerging mentorship capabilities. The interview process includes an initial recruiter screen, two technical phone rounds, and four to five onsite interview rounds conducted over a single day.
Interview Rounds
Recruiter Screening
What to Expect
The initial conversation with a Google recruiter aims to understand your background, motivation, and baseline fit for the SRE role. This is a non-technical round focused on validating your interest in the SRE discipline, understanding your career trajectory, and assessing whether your experience aligns with the mid-level expectations. The recruiter will also explain the interview process, timeline, and next steps. This round is conversational but should demonstrate your passion for site reliability engineering and your understanding of what the role entails.
Tips & Advice
Be genuine and specific about why you're interested in SRE at Google—avoid generic answers. Show that you understand the difference between SRE and traditional DevOps or system administration. Have 2-3 specific projects or situations ready that demonstrate your interest in reliability and automation. Ask thoughtful questions about the team, their challenges, and how SRE operates at Google. This round is also your chance to evaluate if Google's SRE culture aligns with your career goals.
Focus Topics
Career Goals and Team Fit
Articulate your career ambitions over the next 2-3 years and how a role at Google aligns with them. Discuss what kind of projects or team environment would enable your growth.
Practice Interview
Study Questions
Understanding Google's SRE Mission
Demonstrate knowledge of Google's approach to SRE, including concepts like error budgets, SLOs, toil reduction, and building systems for scale. Show understanding that SRE at Google involves both software engineering and operational responsibilities.
Practice Interview
Study Questions
Your SRE Journey and Motivation
Clearly articulate your professional background, how you transitioned into or developed expertise in reliability engineering, and what specifically excites you about the SRE discipline. Be prepared to discuss concrete examples of reliability projects or incidents you've handled.
Practice Interview
Study Questions
Technical Phone Screen 1: Coding and Problem-Solving
What to Expect
The first technical phone screen focuses on your coding proficiency and algorithmic thinking. You'll be given a LeetCode medium to hard difficulty problem to solve in 45-60 minutes using a collaborative coding environment (typically Google Docs or CoderPad). The interviewer will assess not just your final solution but your problem-solving approach, code quality, ability to handle edge cases, and communication throughout the process. For mid-level candidates, the expectation is to solve the problem correctly with clean, well-structured code while explaining your reasoning.
Tips & Advice
Start by asking clarifying questions about the problem—don't assume you understand it completely. Verbalize your approach before coding. Walk through examples and edge cases. For SRE-relevant problems, you may encounter graph traversal (BFS/DFS for connectivity issues), trees, dynamic programming, or problems involving data structure design. Write clean, readable code with appropriate variable names. Test your solution with the examples provided and at least one edge case. If you get stuck, communicate with the interviewer and work through it together. Time management is critical—if you realize your first approach is too complex, pivot to a simpler solution that works rather than pursuing an overcomplicated one.
Focus Topics
Problem-Solving Communication
Ability to clarify ambiguous problems through questions, explain your approach clearly, discuss trade-offs between solutions, and walk through examples before coding. Communicate what you're coding and why.
Practice Interview
Study Questions
Code Quality and Edge Cases
Write bug-free, readable code with proper error handling. Consider boundary conditions, off-by-one errors, null values, empty inputs, and large inputs. Your code should be production-quality, not just 'works for the happy path'.
Practice Interview
Study Questions
Data Structures Mastery
Deep understanding of arrays, linked lists, trees, graphs, hash tables, heaps, and queues. For SRE context, understand how these data structures are used in monitoring systems, caching layers, and distributed algorithms.
Practice Interview
Study Questions
Algorithm Implementation and Optimization
Proficiency in sorting algorithms, searching algorithms, graph traversal (BFS, DFS), dynamic programming, and backtracking. Understand time and space complexity analysis (Big O notation). Be able to optimize solutions iteratively.
Practice Interview
Study Questions
Technical Phone Screen 2: Systems, Troubleshooting, and Incident Response
What to Expect
The second phone screen evaluates your systems knowledge, troubleshooting capabilities, and incident response thinking. This round typically includes a systems design problem, a troubleshooting scenario (e.g., 'a service is experiencing high latency, walk me through how you'd diagnose it'), or a deep dive into Linux internals and networking. The interviewer will present an ambiguous, real-world-like problem and expect you to ask clarifying questions, systematically identify the root cause, and propose solutions. For mid-level candidates, this round assesses your ability to think about systems holistically and apply operational knowledge.
Tips & Advice
Approach troubleshooting systematically: start with detection (how would you know there's a problem?), then diagnosis (what tools/metrics would you check?), then remediation (what are your options?). For a failing service, walk through the layers: application logs, system metrics (CPU, memory, disk), network connectivity, database performance, dependencies. Ask about the environment, scale, and historical context—this helps narrow possibilities. Propose multiple solutions and discuss their trade-offs. For mid-level candidates, demonstrate that you think about long-term fixes and monitoring, not just immediate patches. Reference specific tools (strace, tcpdump, top, curl, dig, etc.) and explain what they'd tell you. If you don't know something, say so and explain how you'd investigate.
Focus Topics
Performance Analysis and Optimization
Ability to identify performance bottlenecks using profiling tools (perf, flamegraphs, APM tools), understand CPU vs. I/O vs. memory constraints, and suggest optimizations. Knowledge of caching strategies, database query optimization, and system-level tuning.
Practice Interview
Study Questions
Monitoring, Alerting, and Observability Design
Understanding of how to instrument systems for observability. Knowledge of metrics (what to measure), logging (structured vs. unstructured), and distributed tracing. Concepts of SLOs, error budgets, and alert design. Understanding of alert fatigue, false positives, and meaningful thresholds.
Practice Interview
Study Questions
Linux Internals and System Diagnostics
Understanding of Linux kernel concepts (processes, threads, memory management, file descriptors), system calls, process lifecycle, and inter-process communication. Proficiency with diagnostic tools: strace, ltrace, top, ps, vmstat, iostat, ss, netstat, lsof, and system logs (/var/log). Knowledge of how to read and interpret system metrics.
Practice Interview
Study Questions
Incident Response and Root Cause Analysis
Systematic approach to diagnosing production issues: gathering context, identifying symptoms vs. root causes, isolating the problem, implementing fixes, and documenting lessons learned. Understanding of mitigation strategies (quick fixes vs. long-term solutions), incident severity assessment, and escalation paths.
Practice Interview
Study Questions
Networking Fundamentals and Troubleshooting
Understanding of TCP/IP stack, DNS resolution, port connectivity, routing, network namespaces, and packet analysis. Tools: ping, traceroute, dig, nslookup, curl, tcpdump, netcat. Knowledge of common networking issues: DNS failures, connection timeouts, port conflicts, packet loss.
Practice Interview
Study Questions
Onsite Round 1: Coding and Algorithm Deep Dive
What to Expect
Similar to the phone screen but in an onsite setting with potentially higher complexity or multiple related problems. You'll have 60-90 minutes to solve one to two coding problems at LeetCode medium-to-hard difficulty. The focus is on your algorithmic thinking, code quality, communication during problem-solving, and ability to optimize solutions. For mid-level candidates, interviewers also assess your ability to recognize patterns and apply knowledge of data structures efficiently. This round validates that your phone screen performance was genuine and that you can handle technical challenges in person.
Tips & Advice
In an onsite setting, the pressure may feel different—take a moment to ground yourself. Use the whiteboard or shared document effectively; write pseudocode first if needed. For SRE-related problems, you may encounter scenarios involving trees (representing system hierarchies), graphs (representing dependencies or network topology), or stream processing problems (relevant to monitoring/logging). If solving multiple problems, ensure you manage time and ask the interviewer which to prioritize if you can't complete both. After solving, ask if the interviewer wants you to optimize further or discuss trade-offs. For mid-level candidates, showing awareness of when a solution is 'good enough' vs. when optimization is necessary demonstrates maturity.
Focus Topics
Interview Communication and Collaboration
Articulating your thought process clearly, asking for hints if stuck, discussing multiple solution approaches, and iterating based on interviewer feedback. Balancing talking through your approach without over-explaining.
Practice Interview
Study Questions
Code Implementation Under Pressure
Ability to write clean, correct code despite time constraints and nervousness. Techniques: pseudocode first, iterative refinement, testing as you go. Knowing common pitfalls (off-by-one errors, null checks, boundary conditions) and avoiding them.
Practice Interview
Study Questions
Dynamic Programming and Optimization
Understanding of breaking problems into overlapping subproblems, memoization, and iterative DP solutions. Ability to identify when a problem has optimal substructure and apply DP techniques. Understanding of trade-offs between time and space complexity.
Practice Interview
Study Questions
Graph Traversal and Algorithms (BFS/DFS)
Deep understanding of breadth-first search and depth-first search algorithms, their applications (shortest path, connectivity, topology sort), and implementation details. Understanding of when to use each approach and their complexity implications.
Practice Interview
Study Questions
Onsite Round 2: Non-Abstract Large System Design (NALSD)
What to Expect
This round focuses on your ability to design complex, large-scale systems for reliability and scalability. You'll be given an ambiguous system design problem (e.g., 'Design a thumbnail service', 'Design Google AdWords', 'Design a system for copying files to remote servers') and have 45-60 minutes to propose a solution. For mid-level SRE candidates, the emphasis is on reliability, failure modes, monitoring, and operational concerns—not just raw scalability. You're expected to ask clarifying questions, consider trade-offs between different architectural approaches, discuss how you'd handle failures, and think about SLOs and error budgets. The interviewer wants to see systems thinking: understanding dependencies, cascading failures, observability needs, and how operational complexity impacts reliability.
Tips & Advice
Start with clarifying questions: What's the scale? (QPS, data volume, geographic distribution). Who are the users? What are the critical paths? What happens if components fail? These questions demonstrate that you approach design systematically. For an SRE interview, go beyond sketching architecture; discuss operational aspects: How would you deploy this? How would you monitor it? What alerts would you set? How would you handle degradation gracefully? Discuss trade-offs explicitly: consistency vs. availability, complexity vs. reliability, cost vs. performance. For mid-level candidates, reference specific Google technologies if appropriate (Kubernetes for orchestration, Spanner for global consistency, Bigtable for large-scale storage, etc.) but don't force them in. The goal is to show you understand the problem deeply and can think about systems holistically. If the interviewer pushes back on your design, treat it as collaborative refinement, not criticism. Be willing to admit when you don't know something and explain how you'd investigate.
Focus Topics
Technology Choice and Trade-offs
Understanding different storage systems (SQL databases, NoSQL, key-value stores), messaging systems, caching layers, and compute platforms. Knowing the characteristics of each (ACID vs. BASE, consistency models, latency profiles, operational complexity) and when to use each. Making explicit trade-off decisions: consistency vs. availability, simplicity vs. performance.
Practice Interview
Study Questions
Failure Mode Analysis and Mitigation
Systematically identifying potential failure modes in your design (network partitions, overload, data corruption, cascading failures) and proposing mitigations. Understanding of graceful degradation: when things fail, what's the minimum service level you can maintain? Trade-offs in disaster recovery (RTO and RPO).
Practice Interview
Study Questions
Observability and Operational Concerns in System Design
Designing systems to be observable: instrumenting components with metrics, logging errors and important events, and enabling distributed tracing. Thinking about what you need to know to operate a system in production. SLOs, error budgets, and monitoring strategies. How to design for operational simplicity (reducing toil, avoiding manual interventions).
Practice Interview
Study Questions
Distributed Systems Design for Reliability
Understanding how to architect systems that remain operational despite failures. Concepts: redundancy, failover mechanisms, graceful degradation, circuit breakers, and timeout strategies. Design for partial failures rather than assuming components either work or don't. Understanding of consistency models, eventual consistency, and trade-offs.
Practice Interview
Study Questions
Scalability and Performance Optimization
Understanding of horizontal vs. vertical scaling, caching strategies, database sharding, load balancing, and CDN considerations. Ability to estimate capacity requirements (QPS, storage, bandwidth) and identify bottlenecks. Knowledge of when systems need autoscaling and how to implement it safely.
Practice Interview
Study Questions
Onsite Round 3: Linux, Systems, and Troubleshooting Deep Dive
What to Expect
This round goes deeper into systems knowledge, Linux internals, and real-world troubleshooting scenarios. You may face a scenario-based problem (e.g., 'A containerized service is suddenly consuming 10x memory—walk me through diagnosis'), deep questions about kernel concepts (memory management, scheduling, file systems), or a mix of conceptual questions and hands-on troubleshooting. For mid-level candidates, the interviewer assesses your understanding of how systems actually work, your diagnostic capabilities, and your ability to explain complex concepts clearly. This round validates that your systems knowledge is genuine and not just surface-level.
Tips & Advice
Be prepared for concrete troubleshooting scenarios and show your diagnostic thought process. Walk through how you'd investigate: 'I'd check application logs first, then system metrics (CPU, memory, disk I/O), then look at dependencies.' For Linux-specific questions, explain concepts in your own words rather than reciting definitions. If asked about memory management, explain what page faults are and why they matter for performance. If discussing CPU scheduling, explain why high context switch rates might indicate a problem. When facing a troubleshooting scenario, be systematic: gather context (environment, recent changes, scale), identify symptoms vs. root causes, and propose fixes. For mid-level candidates, go beyond 'restarting the service' solutions; think about long-term fixes and prevention. Reference your experience with real systems. Be honest about knowledge limits: 'I'm less familiar with that part of the kernel, but I'd check the kernel documentation and run experiments to understand it.'
Focus Topics
Networking Stack and Packet Analysis
Understanding of TCP/IP internals: connection establishment, congestion control, retransmission. Knowledge of network stack tuning (buffer sizes, TCP window sizes). Practical packet analysis with tcpdump. Understanding of how network issues manifest (timeouts, retransmissions, packet loss).
Practice Interview
Study Questions
Container and Orchestration Troubleshooting
Understanding of how containers affect system behavior: resource limits, cgroups, namespaces. Knowledge of Kubernetes concepts (pods, services, deployments) and how to troubleshoot container issues: OOM kills, resource exhaustion, networking within Kubernetes. Understanding of container orchestration trade-offs.
Practice Interview
Study Questions
Production Incident Diagnosis and Resolution
Systematic approach to real-world incidents: gathering context (what changed recently?), identifying the affected component, isolating the problem, and implementing fixes. Understanding of quick mitigations vs. long-term solutions. Documentation and post-incident learning. Communication during incidents.
Practice Interview
Study Questions
I/O Performance and Storage Concepts
Understanding of disk I/O characteristics (IOPS, throughput, latency), file system types and their performance implications, disk scheduling algorithms. Knowledge of how to measure I/O performance (iostat, fio) and identify I/O bottlenecks. Understanding of SSD vs. HDD trade-offs and caching layers.
Practice Interview
Study Questions
Kernel Concepts: Processes, Memory, and Scheduling
Deep understanding of process lifecycle, memory management (virtual memory, page tables, page faults), CPU scheduling algorithms, and context switching. Understanding of how overcommitment affects system behavior. Knowledge of relevant tools: ps, top, htop, vmstat, free, and how to interpret their output.
Practice Interview
Study Questions
Onsite Round 4: Behavioral and Googleyness (Leadership and Culture Fit)
What to Expect
This round assesses your alignment with Google's values and culture, your ability to work collaboratively, your leadership potential (even for mid-level roles), and how you handle ambiguity and challenges. The interviewer will ask behavioral questions about your experience, how you've handled conflicts, your approach to learning, and specific examples of impact. For mid-level SRE candidates, Google evaluates your ability to take ownership of projects, mentor others, influence team decisions, and drive reliability improvements. The round also assesses intellectual curiosity, humility about what you don't know, and how you approach learning and growth.
Tips & Advice
Prepare specific stories from your career that illustrate Google's core values: autonomy and ownership (describe a project you owned end-to-end), collaboration (conflict resolution, cross-team work), and impact (quantify your reliability improvements when possible). Use the STAR method (Situation, Task, Action, Result) but make stories concise and authentic. For mid-level candidates, emphasize growing impact: 'I started as an individual contributor, then led automation that freed up the team from toil, and helped onboard junior SREs.' Be honest about failures and what you learned: Google values intellectual humility. When asked 'Why Google?', be specific about SRE culture, the scale, or specific technical challenges. Practice answers to common questions: 'Tell me about your most interesting project,' 'Describe a time you had to resolve a conflict,' 'Tell me about a time you had to learn something new quickly.' Listen carefully to questions and actually answer them rather than delivering generic answers. If asked about a time you failed or struggled, frame it in terms of learning and growth, not making excuses.
Focus Topics
Handling Ambiguity and Failure
Stories about situations where the problem was unclear or requirements evolved. How you clarified ambiguity, made good decisions with incomplete information, and adapted when your assumptions were wrong. Honest examples of mistakes, what you learned, and how you prevented recurrence.
Practice Interview
Study Questions
Learning Ability and Growth Mindset
Demonstrating curiosity, willingness to learn new technologies or domains, and adaptability to ambiguity. Stories about tackling unfamiliar problems, seeking feedback, and improving based on it. Evidence of continuous learning beyond your comfort zone.
Practice Interview
Study Questions
Reliability Culture and Mentorship
Evidence of promoting SRE thinking: advocating for reliability improvements, helping colleagues understand SRE principles, mentoring junior team members, or educating product teams about SLOs. Stories about influencing team decisions toward more reliable practices.
Practice Interview
Study Questions
Collaboration and Cross-functional Teamwork
Examples of working effectively with people outside your team (product managers, backend engineers, infrastructure teams). Demonstrating how you handle different perspectives, resolve disagreements constructively, and find common ground. Stories about making others' work easier or removing blockers.
Practice Interview
Study Questions
Ownership and Project Impact
Demonstrating ability to take full ownership of projects or initiatives, drive them to completion, and measure impact. Stories about identifying problems, proposing solutions, securing buy-in, implementing changes, and quantifying improvements. For SRE context: reducing toil, improving reliability metrics, or implementing monitoring systems that prevented incidents.
Practice Interview
Study Questions
Frequently Asked Site Reliability Engineer (SRE) Interview Questions
List common cloud and network-backed storage options used with Kubernetes (examples: AWS EBS, AWS EFS, GCE PD, Azure Disk, NFS) and briefly describe trade-offs in terms of performance, durability, multi-node attach, and typical use-cases.
Sample Answer
Cloud and network-backed storage for Kubernetes splits into two families: block storage (AWS EBS, GCE PD, Azure Disk), which is fast and durable but normally attachable to only one node at a time, and network filesystems (AWS EFS, Azure Files, self-managed NFS), which are shareable across many nodes at once but pay a latency and throughput cost for that flexibility. Picking between them is really picking whether the workload needs raw single-writer performance or multi-node shared access.
Comparison
| Option | Performance | Durability | Multi-node attach | Typical use case |
|---|---|---|---|---|
| AWS EBS (Elastic Block Store) | High IOPS (input/output operations per second) and throughput on provisioned tiers; low latency | Replicated within the Availability Zone by AWS | Single-writer (ReadWriteOnce) for ordinary use; a Multi-Attach mode exists for specific volume types but requires a cluster-aware filesystem and is the exception, not the default | Databases, single-node stateful workloads |
| AWS EFS (Elastic File System) | Network filesystem; throughput scales with configured mode but per-operation latency is higher and more variable than block storage | Replicated across multiple Availability Zones by AWS | ReadWriteMany: many Pods across many nodes can mount concurrently | Shared config/assets, CI caches, content shared across replicas |
| GCE PD (Persistent Disk) | Strong block performance; low latency within a zone | Zonal by default; a regional PD variant replicates synchronously across two zones for higher availability | Single-writer for normal use; a multi-writer mode exists on specific disk types but is restricted and still expects the application to coordinate writes itself, since it is not a cluster filesystem | Databases, single-node stateful apps |
| Azure Disk | High IOPS/throughput on Premium/Ultra tiers | Replicated within the region/zone by Azure | Single-writer (ReadWriteOnce) | Block storage for VMs/Pods needing high, predictable performance |
| Azure Files | SMB/NFS network filesystem semantics | Managed, replicated by Azure | ReadWriteMany | Shared config, home directories, app assets |
| NFS (self-managed) | Depends entirely on the server and network path; can become a shared bottleneck | Depends on how the operator makes the NFS server itself highly available; no built-in durability beyond what you build | ReadWriteMany | Simple shared storage, legacy applications expecting a shared filesystem |
How to choose
- Single-writer, latency-sensitive, durable (a relational database's primary, a message queue's log): block storage (EBS, GCE PD, Azure Disk). Access mode ReadWriteOnce, sized and provisioned for the IOPS the workload actually needs.
- Shared, multi-reader-or-writer, latency-tolerant (shared configuration, static assets, a CI build cache used by many concurrent jobs): a managed network filesystem (EFS, Azure Files) if available on your cloud, or self-managed NFS if not, understanding that NFS's durability and availability are now your responsibility to engineer.
- Regional or multi-zone resilience for a block-storage workload: look at the provider's own cross-zone replication option (GCE's regional Persistent Disk is the clearest example) rather than assuming ordinary zonal block storage survives a zone failure; ordinary zonal EBS/PD/Azure Disk does not.
Worked example
A team needs (a) a primary Postgres (Postgres) volume and (b) a shared directory of report templates read by 20 replica Pods across multiple nodes.
- (a) is single-writer and latency-sensitive: provision an EBS/GCE PD/Azure Disk volume through a StorageClass with
ReadWriteOnce, sized for the database's IOPS profile. - (b) needs concurrent multi-node reads: provision an EFS/Azure Files/NFS volume through a StorageClass supporting
ReadWriteMany, since a block-storage volume cannot satisfy that access pattern at all, regardless of performance tier.
Trade-offs and pitfalls
- Don't reach for a network filesystem by default "to be safe" for multi-node access; if the workload is genuinely single-writer, block storage's lower latency is the better fit and the shared-filesystem's variability is pure downside.
- Zonal block storage (the common case for EBS/GCE PD/Azure Disk) does not survive the loss of its Availability Zone; if that's a real requirement, either use the provider's cross-zone replicated variant where one exists, or handle replication at the application layer (e.g., a database's own streaming replication to a replica in another zone) rather than assuming the storage layer covers it.
- A "multi-writer" flag on a block-storage product is not the same guarantee as a real shared filesystem: it typically still requires a cluster-aware filesystem and application-level write coordination, so verify exactly what's supported for your disk type before relying on it, rather than assuming ReadWriteMany-equivalent behavior.
You are asked to lead the postmortem after a significant production incident. Describe how you would structure the meeting: who attends, what evidence and timeline you prepare beforehand, how you keep the discussion evidence-first rather than defensive, and how you leave the meeting with owned, time-boxed action items.
Sample Answer
Direct answer
Running a blameless postmortem meeting well is mostly about preparation and framing, not clever facilitation tricks in the room. Before the meeting: assemble a factual, timestamped timeline from logs, dashboards, and deploy history, invite the people who were actually involved plus anyone who owns a system in the causal chain, and share a draft timeline in advance so the meeting starts from shared facts instead of competing memories. In the meeting: state the ground rules explicitly (we are here to understand the system, not to find who to blame), walk the timeline together, surface root cause and contributing factors as a group, and end with specific, owned, dated action items written down before people leave.
Structured elaboration
- Before: Pull raw evidence (metrics, logs, traces, deploy and change history) into a draft timeline. Doing this before the meeting, rather than reconstructing it live, keeps the discussion from turning into a memory-recall exercise, which is exactly where blame tends to creep in.
- Framing at the start: Explicitly name the ground rule. A single leading question like 'someone must have known this was a problem, why didn't anyone raise it?' is enough to make people defensive within seconds and shut down honest disclosure for the rest of the meeting, so the facilitator has to actively watch for and redirect that kind of framing, not just hope it doesn't come up.
- During: Walk the timeline chronologically, ask 'what made this possible' rather than 'who did this,' and treat 'human error' as the start of an investigation rather than its conclusion, since a person's reasonable action being unsafe is itself evidence of a system gap.
- Assigning action items: Every action item gets a single named owner and a date before the meeting ends. 'The team will look into X' produces nothing; 'Priya will add schema validation to the deploy pipeline by the 15th' produces something trackable.
- After: Circulate the finished writeup, and treat the meeting output as a living document only until the action items are confirmed done, not indefinitely.
This same structure holds even when the failure being reviewed is not a software outage. A postmortem for a failed partnership launch or a research study that led to a wrong product decision follows the identical discipline: timeline, impact, root cause versus contributing factors, and owned action items, adapted to a business rather than a technical vocabulary.
Worked example
A production incident: a deploy caused a spike in checkout failures. A poorly-run version of this meeting opens with 'who approved this deploy?' and spends 20 minutes on defensive explanations. A well-run version opens with a shared timeline already on screen, the facilitator asks 'what in our deploy process let a change with this blast radius reach 100% of traffic without a canary stage,' the group identifies that canary deployment was skipped because the on-call playbook doesn't clearly require it for config-only changes, and the meeting ends with two action items: update the playbook to require canary for all changes touching this service, owner and date named, and add an automated gate that blocks a full rollout if canary metrics haven't been checked, owner and date named.
Trade-offs and pitfalls
The most common failure mode is drifting from 'what happened' into 'who is responsible' the moment the timeline reaches a specific person's action. The facilitator's job is to notice that drift in real time and redirect toward the system gap that let the action cause harm. A second failure is ending the meeting with vague, unowned action items that read like good intentions rather than commitments; if nobody can point to a name and a date, the item will not get done.
Explain why p50 alone is insufficient for performance monitoring of user-facing services. Provide an example showing how p50 and p99 could tell different stories and one practical consequence of relying only on p50.
Sample Answer
p50 (median) shows the latency experienced by the “typical” request, but it ignores the tail — the small fraction of requests that are much slower and often drive user dissatisfaction and SLO breaches. For user-facing services the tail matters because a few slow requests can ruin perceived performance (page jank, timeouts, retries).
Example:
- p50 = 100 ms (half of requests <=100 ms)
- p90 = 300 ms
- p99 = 2,000 ms
These numbers tell two stories: p50 suggests excellent performance, but p99 reveals that 1% of users wait 2 seconds — long enough to trigger timeouts or abandonment.
Practical consequence of relying only on p50:
- You may miss degrading tail behavior and fail to alert until customer complaints or SLO breaches occur. That leads to surprise incidents, missed SLAs, and higher user churn.
Best practice: track multiple percentiles (p50, p90, p95, p99), distributions/histograms, and define SLIs/SLOs focused on relevant tails.
Tell me about a time you proactively removed a blocker, technical, process, or people, that was standing between your delivery and shipping. How did you spot it, what concrete steps did you take (technical fixes, workarounds, tooling, or just coordinating with the right people), whether and when you looped in others or escalated, and what measurably changed in your delivery timeline or team's velocity as a result.
Sample Answer
Direct answer
The strongest version of this story shows a blocker noticed before it became someone else's emergency, an action matched to how much authority you actually had over what you changed (fixing it directly if it was fully yours, coordinating if it touched shared infrastructure, escalating only if it was genuinely outside your reach), and a real, specific before-and-after change in the delivery timeline, not a general sense that things felt smoother.
Structured elaboration
- Spotting it: point to a concrete detection signal, not a vague feeling, for example a recurring delay pattern that showed up in the same way across the last several delivery cycles, or a piece of infrastructure that everyone quietly routes around because nobody actually owns fixing it.
- Matching the action to your authority: a fix fully within your own control (your own code, your own team's process) can be built and shipped directly. Something that touches shared infrastructure or another team's system calls for coordinating with the right people first, rather than unilaterally changing something you do not own.
- When to loop others in: loop in the owner of anything outside your own immediate scope before changing it, not after, and loop in your manager or affected stakeholders whenever the fix will visibly shift timeline expectations, even a positive shift, so nobody is caught by surprise either way.
- Measuring the result: close with an honest, specific before-and-after comparison of the exact thing that changed, a step in a process, a recurring wait time, a manual task that used to eat calendar time, described plainly rather than with inflated precision.
Worked example
Across the last four release cycles, a manual, ticket-based approval step to provision a test environment consistently cost the team roughly half a day of waiting each time, even though the criteria for approval had become entirely mechanical, the same three checks every time, with no real judgment call left in it. The fix: a small self-service script that ran those same three checks automatically and auto-approved when they passed, falling back to the manual ticket only when a check actually failed. Because the change touched a provisioning system owned by another team, its lead was looped in before anything shipped, rather than deploying a workaround directly into a system this person did not own, and sign-off came quickly since the change only automated a decision that was already mechanical, not a judgment call being taken away from anyone. Result: the environment-provisioning wait dropped from roughly half a day to about 15 minutes for the common case, recovering close to half a day of calendar time per release cycle, and across the next four releases where the team used it, this removed what had been the single largest scheduled delay in the release checklist.
Trade-offs and pitfalls
Unilaterally changing shared infrastructure without looping in its owner, even with good intentions, erodes trust and risks breaking something not fully understood. Choosing a blocker that is satisfying to fix but not actually on the delivery-critical path does not move the timeline at all, no matter how good the fix feels. And closing with a vague claim that things felt smoother afterward, instead of naming the one specific thing that got measurably faster, is the difference between a story that demonstrates ownership and one that only asserts it.
A boundary check validates that a value (an index, an offset, a size) falls within the range the code actually handles correctly, and it routinely catches real production bugs before they cause damage. Pick three DIFFERENT kinds of boundary bugs you've seen or can construct realistically, and for each: describe the bug it would cause if unchecked, the specific defensive check you'd add, and a unit test that would catch a regression if the check were later removed.
Sample Answer
Direct answer
A boundary check catches a specific class of bug (accessing an index, offset, or value outside the range the code actually handles correctly) at the moment it happens, instead of letting it silently produce wrong output or crash somewhere unrelated later; three concrete examples: array/list indexing, pagination offsets, and numeric limits.
Structured elaboration and worked examples
- Array indexing: the bug is an off-by-one or attacker-controlled index reading past the end of a buffer or list. The defensive check: validate
0 <= index < len(array)before accessing, raising a clearIndexError/custom exception instead of either crashing with a cryptic native error or, in an unsafe language, reading adjacent memory. A unit test:assert_raises(IndexError, get_item, [1,2,3], 5). - Pagination offsets: the bug is a negative or absurdly large
offset/limitfrom a client, which can either error confusingly deep in a SQL driver or, worse, silently return zero rows and look like 'no data' rather than 'bad request'. The defensive check: clamp or rejectoffset < 0and caplimitto a sane maximum (say 1000) before it reaches the query layer. A unit test:assert paginate(items, offset=-5, limit=10) raises ValueError. - Numeric limits: the bug is an integer overflow or an out-of-domain value (a negative quantity in an order, a percentage over 100) silently producing a nonsensical result instead of an error. The defensive check: validate the value's range explicitly before using it in a calculation. A unit test:
assert_raises(ValueError, apply_discount, price=100, percent=150).
Trade-offs and pitfalls
Each of these checks is cheap individually, but the value comes from applying them CONSISTENTLY at every place the boundary is actually crossed (every array access from external input, not just the ones you happen to remember); a single unguarded pagination endpoint added six months later by someone who didn't see this pattern reintroduces the exact bug class. Treat these as patterns to lint for or wrap in a shared utility function, not as one-off checks to remember individually.
Do you see your skills and intelligence as fixed, or as things you can actively develop? Tell me what the difference between those two outlooks actually looks like in day to day behavior, particularly when work fails or when someone criticizes it.
Sample Answer
Direct answer
I see ability as something built through effort and specific feedback, not a trait I either have or don't. The practical difference between that and a fixed outlook shows up in the first few seconds after something goes wrong, because that's before there's time to perform the socially correct answer.
Structured elaboration
The contrast is clearest in three recurring situations:
- An experiment or change that doesn't work. A fixed reaction treats the negative result as a verdict on competence and looks for reasons the setup was unfair. A growth reaction treats it as one data point and asks what it rules out.
- A critical review. A fixed reaction defends the original decision, sometimes relitigating context nobody asked for. A growth reaction isolates the single most specific, actionable point raised and changes that one thing next time, even when the feedback stings.
- An unfamiliar tool or an unclear brief. A fixed mindset avoids volunteering, because failing at something new feels riskier to the self-image than staying in safe territory. A growth mindset treats "I don't know this yet" as a normal, temporary state.
What the fixed pattern costs a team: velocity drops because people route around unfamiliar work instead of through it, quality suffers because problems get relitigated instead of fixed, people stop raising issues early because raising one risks being blamed for it, and morale erodes because the same few people end up carrying anything ambiguous.
Worked example
In a design review, a reviewer was blunt about a flaw in an approach I'd already committed time to. My first instinct was defensive: I started explaining the constraints that led me there. I caught myself mid-sentence, asked one specific question instead ("is the concern the failure mode when input is empty, or the overall structure?"), and it turned out to be the narrower issue. I fixed that one thing and confirmed with the reviewer it addressed the concern, rather than reworking everything out of general anxiety.
Being honest about the flip side matters more than the tidy version of this story: I am still more fixed-mindset than I'd like about unscripted public communication, like presenting unfinished work live to a large group. I know it because I over-prepare for it and get visibly rattled if the plan changes mid-presentation, which is exactly the "competence is on trial" reaction I described above, just in a different context.
Trade-offs and pitfalls
A common wrong turn here is giving the scripted, socially correct version of this answer with no concrete instance behind it. What makes it credible is naming an actual moment the reaction was tested, and being willing to name a domain where the fixed pattern still shows up, since nobody is growth-minded everywhere at once.
A packet capture of a failed connection attempt shows: the client sends SYN, the server responds SYN-ACK, the client retransmits SYN several times but never sends the final ACK, and the server's SYN-ACK is retransmitted once before the connection times out. List the plausible root causes for the client never completing the handshake (consider both network-level and host-level causes), and explain what evidence on the client versus the server would distinguish them.
Sample Answer
Direct answer
When a client keeps retransmitting its SYN and never sends the final ACK (while the server's SYN-ACK is only retransmitted once before the connection times out), the most likely causes are that the client's connect timeout hasn't fired yet, that something between the two hosts is dropping the ACK specifically (an asymmetric path or a stateful device confused about direction), or that the client-side application itself never actually attempted the ACK due to a bug. A different failure shape, the server sends SYN-ACK and the client immediately sends RST, points to a different family of causes entirely: the client rejecting the connection outright.
Structured elaboration
For the "client retransmits SYN, no final ACK" pattern, work through causes in order of likelihood:
- Asymmetric routing dropping only the return-to-forward-direction ACK path. If the SYN-ACK reaches the client (we know it does, since the client keeps retransmitting new SYNs rather than giving up, meaning it IS getting a response of some kind) but the client's ACK can't get back to the server along some other path, a stateful firewall or NAT device on that asymmetric path may be dropping the ACK because it doesn't recognize the connection's state in that direction.
- A middlebox is rewriting or dropping specific TCP options in the SYN-ACK that the client's stack doesn't handle gracefully, causing it to silently discard the SYN-ACK and retry instead of ACKing it.
- Client-side firewall or security policy is specifically blocking outbound ACKs to that destination while permitting the outbound SYNs, an unusual but real misconfiguration.
- MTU (Maximum Transmission Unit)-related silent packet loss on the SYN-ACK's return path if it happens to be an unusually large segment (rare for a SYN-ACK specifically, since it typically carries little payload, but worth ruling out if other symptoms point that way).
For the different shape (SYN-ACK followed by an IMMEDIATE client RST): this usually means the client-side application decided, upon establishing the connection, that it doesn't actually want it, for example an application-level timeout that already expired while the handshake was in flight, a client-side connection pool that raced two connection attempts and is aborting the loser, or a security tool on the client actively resetting connections that don't match an expected certificate or policy.
Worked example
To distinguish these hypotheses in practice, compare timestamps and evidence on BOTH ends: if the server's capture shows the SYN-ACK leaving on time but the client's capture never shows it arriving, the problem is in the path (asymmetric routing, a device eating it). If the client's capture shows the SYN-ACK arriving cleanly but no ACK is ever generated by the client's own stack, the bug is on the client host itself (application logic, local firewall) rather than the network path.
Trade-offs & pitfalls
A common mistake is assuming a stuck handshake is always a network problem; a client-side timeout race (the application gives up right as the handshake completes) produces an outwardly identical-looking symptom to a network drop and is only distinguishable by comparing what each side's own capture actually shows, not by reasoning about the network path alone.
Different teams you support have very different risk tolerances: some want to ship continuously, others want maximum stability. How would you negotiate a shared policy that both sides can accept?
Sample Answer
Direct answer
Don't force one team's cadence onto the other. Design a policy that separates what must be shared (the guardrails that protect everyone) from what can stay team-specific (how fast a given team is allowed to move within those guardrails), then negotiate the guardrails, not the cadence itself. That reframing turns "fast team vs. cautious team" into a joint design problem both sides can own.
Structured elaboration
- Split invariant from flexible. List what truly must be uniform across teams (a working rollback path, a minimum test bar, an incident-response process) versus what can legitimately vary (deploy frequency, staging gate count, review depth). Most conflicts collapse once you see that only a small slice actually needs to be shared.
- Reframe cadence as risk exposure. Ask each side what they're protecting (customer trust, an SLA, a compliance obligation) versus what they want (velocity). Convert both into measurable guardrails: blast radius limits (how much of the system or traffic a change could affect if it goes wrong), an automated rollback trigger (a rule that reverts the change automatically once a threshold is crossed, without waiting for a human to notice), a minimum observation window before a change is considered "safe."
- Build a tiered policy, not a single rule. Changes that touch a small blast radius and have a fast, automatic rollback can move on the fast-moving team's cadence. Changes that touch shared, hard-to-reverse surfaces get the slower team's gates, regardless of which team wrote the change. The tiering criteria, not the team identity, decides the process.
- Add an explicit exception path. Either side can request a deviation (ship something in a higher tier faster, or hold something in a lower tier longer) with a documented reason and a named approver, so departures from the policy are visible instead of quiet workarounds.
- Time-box a trial and revisit with real data. Don't debate the policy hypothetically forever. Run it for a fixed period, then bring incident counts and delivery-time data back to the table instead of re-litigating the original positions.
The same negotiation pattern applies beyond deploy-frequency disputes: whenever two functions have structurally different operating rhythms, the fix is a shared cadence at the boundary, not a winner. As a concrete cross-team cadence clash from the machine-learning world: a feature store (the shared system that stores and serves the data used to train and run machine-learning models) team can only refresh labels every two weeks, while the product team needs weekly model retraining (rerunning the training process on newer data so the model's predictions stay current). That isn't a risk-tolerance disagreement at all. It's a hard technical constraint on one side meeting a business cadence need on the other, and it gets negotiated the same way: agree what must move on the constrained cadence (the underlying label refresh) versus what can be decoupled (the product team retrains weekly on the two most recent completed label batches, accepting known staleness, rather than blocking on a refresh that can't happen faster).
Worked example
Team A ships to production many times a day behind feature flags. Team B owns a regulated, customer-facing billing surface and wants a weekly release train. Instead of debating "how often should we deploy," the negotiated policy ties process to blast radius: any change gated behind a flag to less than 1% of traffic can auto-promote if the error rate stays under 2x the pre-change baseline for a 30-minute observation window (a policy parameter both sides agreed to, not a claimed result). Changes that touch the billing ledger directly, regardless of author, require the slower manual review and a scheduled release window. Team A keeps most of its velocity because most of its changes are low blast radius; Team B keeps its protection because the surface it cares about is gated the same way no matter who wrote the change.
For the cadence-mismatch variant: the feature store team commits to publishing a refreshed label snapshot every two weeks, on a fixed schedule the product team can plan around. The product team's weekly retraining job consumes the most recent snapshot plus a lightweight, clearly-labeled interim signal for the intervening week, rather than either side pretending the refresh can happen weekly or the product team silently retraining on stale labels without acknowledging it.
Trade-offs & pitfalls
- Pitfall: writing a single global policy. It's either too loose for the regulated team or too strict for the fast-moving one, and both sides end up circumventing it.
- Pitfall: treating this as a one-time meeting. Without a scheduled revisit, the policy calcifies around the political balance of the original conversation instead of actual incident/velocity data.
- Pitfall: hiding exceptions. If deviations aren't logged and visible, the "shared" part of the policy erodes silently and trust breaks down the next time there's an incident.
- Senior differentiator: designing the guardrail so it's parameterized by risk (or, in the cadence case, by the actual constraint) rather than by team identity. That's what lets both sides keep their operating model instead of one side losing the negotiation.
| Dimension | Fast-moving team | Stability-first team | Shared guardrail |
|---|---|---|---|
| What they optimize for | Deploy frequency | Customer trust / uptime | Blast radius + rollback speed |
| What they'll trade away | Manual review overhead | Some deploy latency | Neither trades away the guardrail itself |
| Cadence-mismatch analog | Weekly retraining need | Two-week label refresh | Decoupled interim signal, fixed refresh schedule |
Write a Java function that detects whether a directed graph contains a cycle. Input: int n (nodes 0..n-1) and an adjacency List<List<Integer>> graph. Use DFS with a recursion stack (visited and inStack arrays). Return true if a cycle exists, false otherwise. Target complexity O(V + E). Explain how you would modify the code to also return one cycle path if found.
Sample Answer
Direct answer
Detecting a directed cycle with depth-first search (DFS) and a recursion stack means maintaining two boolean arrays: visited (has this node been explored at all, ever) and inStack (is this node on the CURRENT recursion path right now). An edge into a node that is visited but no longer inStack is harmless, that node was already fully explored via some other path; an edge into a node that IS inStack is a back edge into a live ancestor, a genuine cycle. This runs in O(V+E).
Structured elaboration
visited[u] and inStack[u] are both set the moment DFS enters u. inStack[u] is reset to false the moment DFS finishes exploring everything reachable from u (on backtrack), while visited[u] stays true forever once set. This is what lets the algorithm tell "already explored, but not currently an ancestor" (visited, not inStack, safe) apart from "currently an ancestor on my path" (both visited and inStack, a cycle if reached again).
Worked example
import java.util.*;
public class DirectedCycle {
public boolean hasCycle(int n, List<List<Integer>> graph) {
boolean[] visited = new boolean[n];
boolean[] inStack = new boolean[n];
for (int v = 0; v < n; v++) {
if (!visited[v]) {
if (dfs(v, graph, visited, inStack)) return true;
}
}
return false;
}
private boolean dfs(int u, List<List<Integer>> g, boolean[] visited, boolean[] inStack) {
visited[u] = true;
inStack[u] = true;
for (int v : g.get(u)) {
if (!visited[v]) {
if (dfs(v, g, visited, inStack)) return true;
} else if (inStack[v]) {
return true; // back edge into a live ancestor
}
}
inStack[u] = false; // backtrack: u is no longer on the active path
return false;
}
// Also returns one concrete cycle as a list of node ids, or an empty list if none exists.
public List<Integer> findCycle(int n, List<List<Integer>> graph) {
boolean[] visited = new boolean[n];
boolean[] inStack = new boolean[n];
int[] parent = new int[n];
Arrays.fill(parent, -1);
for (int v = 0; v < n; v++) {
if (!visited[v]) {
int[] cycleStart = new int[]{-1};
if (dfsFind(v, graph, visited, inStack, parent, cycleStart)) {
List<Integer> cycle = new ArrayList<>();
int cur = cycleStart[0];
int start = cur;
do {
cycle.add(cur);
cur = parent[cur];
} while (cur != start && cur != -1);
cycle.add(start);
Collections.reverse(cycle);
return cycle;
}
}
}
return Collections.emptyList();
}
private boolean dfsFind(int u, List<List<Integer>> g, boolean[] visited, boolean[] inStack, int[] parent, int[] cycleStart) {
visited[u] = true;
inStack[u] = true;
for (int v : g.get(u)) {
if (!visited[v]) {
parent[v] = u;
if (dfsFind(v, g, visited, inStack, parent, cycleStart)) return true;
} else if (inStack[v]) {
parent[v] = u;
cycleStart[0] = v;
return true;
}
}
inStack[u] = false;
return false;
}
public static void main(String[] args) {
DirectedCycle dc = new DirectedCycle();
List<List<Integer>> acyclic = new ArrayList<>();
acyclic.add(Arrays.asList(1, 2));
acyclic.add(Arrays.asList(2));
acyclic.add(Collections.emptyList());
System.out.println("Acyclic graph hasCycle: " + dc.hasCycle(3, acyclic));
List<List<Integer>> cyclic = new ArrayList<>();
cyclic.add(Arrays.asList(1));
cyclic.add(Arrays.asList(2));
cyclic.add(Arrays.asList(0));
System.out.println("Cyclic graph hasCycle: " + dc.hasCycle(3, cyclic));
System.out.println("Reconstructed cycle: " + dc.findCycle(3, cyclic));
List<List<Integer>> disconnected = new ArrayList<>();
disconnected.add(Arrays.asList(1));
disconnected.add(Collections.emptyList());
disconnected.add(Arrays.asList(3));
disconnected.add(Arrays.asList(2));
System.out.println("Disconnected graph (cycle in 2nd component) hasCycle: " + dc.hasCycle(4, disconnected));
List<List<Integer>> selfLoop = new ArrayList<>();
selfLoop.add(Arrays.asList(0));
System.out.println("Self-loop hasCycle: " + dc.hasCycle(1, selfLoop));
}
}
Output (actually compiled and run with javac/java):
Acyclic graph hasCycle: false
Cyclic graph hasCycle: true
Reconstructed cycle: [0, 1, 2, 0]
Disconnected graph (cycle in 2nd component) hasCycle: true
Self-loop hasCycle: true
The disconnected test graph (0 -> 1, no cycle in that component; 2 -> 3 -> 2, a genuine cycle in the second component) confirms the outer loop's for (int v = 0; v < n; v++) if (!visited[v]) correctly restarts DFS from every unvisited node, so a cycle anywhere in the graph is found even if it is not reachable from node 0.
A few points worth naming explicitly about how the two functions above work:
inStack[u] = trueon entry,inStack[u] = falseon backtrack: this reset is what makes the distinction between "ancestor, still active" and "already finished elsewhere" possible; forgetting the reset would make every previously-visited node look like a live ancestor forever, turning any two paths into the same node into a false cycle report.- The single-array
visitedcheck alone (withoutinStack) is exactly what a plain reachability check needs;inStackis the ONLY addition cycle detection requires on top of ordinary DFS. findCyclereuses the identical traversal shape, adding only aparentarray (set on first discovery) and acycleStartmarker (set the moment a back edge is found), then reconstructs the path by walkingparentfrom the back edge's source back up to the ancestor it points into.
Complexity
Time O(V+E): each vertex is visited once (the visited guard), and each edge is examined exactly once, when its source vertex is processed. Space O(V) for the recursion stack in the worst case (a graph that is one long chain), plus O(V) for the visited, inStack, and (for findCycle) parent arrays.
Edge cases
- Self-loop (a node with an edge to itself): caught immediately, since the node is still
inStack(it just entered) when its own edge is examined. - Disconnected graph with a cycle only in one component: handled correctly by the outer loop restarting DFS from every unvisited node, as demonstrated above.
- Empty graph (
n = 0): the outer loop never executes,hasCyclereturnsfalseimmediately. - A DAG with a shared descendant (multiple parents pointing to the same child, no actual cycle): correctly reported as no cycle, since by the time the second parent reaches the shared child, that child is
visitedbut no longerinStack(already backtracked out of by the first parent's exploration).
Trade-offs and pitfalls
- Common mistake: forgetting to reset
inStack[u] = falseon backtrack. Without it, every node ever visited stays permanently marked as "on the stack," and the very next edge into any previously-visited node, cycle or not, would be misreported as a back edge. - Common mistake: using only
visitedwithoutinStackand expecting it to work for directed cycle detection; a plain visited check cannot distinguish a live ancestor from an already-finished, unrelated branch, which is exactly the diamond-shaped-DAG false positive this pattern is known to produce. - Deep, chain-like graphs risk a stack overflow in the recursive Java implementation shown, the same risk an iterative, explicit-stack version avoids; worth naming as a follow-up concern for production code handling untrusted or very deep graphs, distinct from the correctness question this answer is scoped to.
- The
findCyclereconstruction variant, returning the actual cycle path rather than a bare boolean, is a natural and common follow-up once the boolean version is understood; it changes nothing about the core traversal logic, only adds theparent/cycleStartbookkeeping needed to recover the path after detection.
You're on-call and receive an alert: a Linux process with PID 4321 is consuming 100% CPU but top shows it's stuck in userspace. Explain step-by-step how you'd use strace to diagnose what the process is doing. Include exact commands to attach to a running process, capture syscalls to a file, and how to interpret common syscalls (read, write, futex, poll). Mention -f, -p, -o and -c options and how to minimize overhead in production.
Sample Answer
Situation: PID 4321 is at 100% CPU and top says it's in userspace. I want to know whether it's spinning in user code or repeatedly making syscalls (which points to different root causes). I would use strace carefully to avoid making the problem worse.
Step-by-step with exact commands
- Quick thread check (do this first):
- sudo top -H -p 4321
- shows per-thread CPU to see if one thread is hot.
- Attach strace to the running process and write output to a file, following threads:
- sudo strace -f -p 4321 -o /tmp/strace_4321.log
- -p 4321 : attach to process
- -f : follow forks/threads
- -o file : write trace to file (avoid filling console or TTY)
Let it run for a short controlled interval (e.g., 5–10s), then stop strace (CTRL-C on the strace process) so you capture a sample without huge overhead.
- Capture a syscall summary (low-noise):
- sudo strace -f -p 4321 -c -o /tmp/strace_4321_summary.log
- -c : print counts/time per syscall (good to see which syscalls dominate)
- Use this for quick aggregation instead of full trace when in production.
- Reduce overhead / filter syscalls:
- sudo strace -f -p 4321 -o /tmp/strace_filtered.log -e trace=network,desc,read,write -s 64
- -e trace=... : only trace selected categories or syscalls
- -s 64 : limit string sizes to avoid huge logs
- Run only briefly; prefer -c + -e for production sampling.
- If you need a timed capture:
- sudo timeout 5s strace -f -p 4321 -o /tmp/strace_4321.log
- automatically stops after 5 seconds.
How to interpret common syscalls in the trace
-
read(...) / write(...):
- Frequent short reads/writes (many small I/O syscalls) can mean busy polling I/O, line-buffered logging, or tight I/O loop.
- Blocking read that returns data rarely suggests normal I/O; a read that returns 0 or -EAGAIN may indicate EOF or nonblocking socket behavior.
- If CPU is high yet you see lots of read/write syscalls, the process could be processing each syscall heavily in userspace.
-
futex(...):
- futex is used for user-space locking; many FUTEX_WAIT/FUTEX_WAKE calls suggest threads are contending on a mutex or condition variable.
- High futex wake/wait rates with spinning (FUTEX_WAIT repeatedly) can indicate lock contention or a poor spin/timeout policy. If futex calls are rare/absent but CPU is high, the process is likely pure user-space busy loop.
-
poll()/ppoll()/epoll_wait():
- poll/epoll_wait that blocks (long timeout) indicates the thread is waiting on I/O — CPU should be low.
- Very frequent poll with zero timeout or with immediate returns implies busy polling (spin-loops), which explains CPU usage.
- poll returning events repeatedly with subsequent heavy processing suggests the event loop is CPU-bound.
Diagnosis pattern
- If strace shows almost no syscalls while CPU is 100%: confirm it's busy looping in user code (use perf or gdb to get stack traces).
- If strace shows lots of futex activity: inspect threading model, look for hotspot lock, and consider lock contention fixes.
- If strace shows frequent poll/read/write: investigate event loop or blocking I/O handling and batching.
- Use -c to quickly see which syscalls dominate (counts & total time).
Minimizing production impact
- Prefer short-duration traces and -c summary.
- Filter syscalls with -e to only what you need.
- Limit string capture with -s.
- Write to disk (-o), not console.
- Consider lower-overhead tools (perf, bpftrace, eBPF) for longer sampling.
- Always test commands on staging if possible.
If strace is inconclusive, get a user-space stack sample quickly:
- sudo gdb -p 4321 --batch -ex "thread apply all bt" > /tmp/backtraces.log
or use perf top/perf record for sampling.
This approach gives a focused, low-overhead way to see whether the process is syscall-bound (and which syscalls) or spinning in userspace so you can pick the right remediation.
Recommended Additional Resources
- LeetCode Premium: Practice medium to hard problems with a focus on graph algorithms and system design problems
- System Design Interview by Alex Xu: Comprehensive coverage of large-scale system design with examples relevant to SRE thinking
- Designing Data-Intensive Applications by Martin Kleppmann: Deep understanding of distributed systems, consistency, and fault tolerance
- The Site Reliability Engineering Book (Google SRE Book): Official Google resource on SRE principles, practices, and philosophy
- How Google Runs Production Systems (Google SRE Series): Includes incident response, monitoring, and operational best practices
- The Linux Programming Interface by Michael Kerrisk: Comprehensive reference for Linux system calls and kernel concepts
- TCP/IP Illustrated Volume 1 by Richard W. Stevens: Deep dive into networking fundamentals and protocols
- Kubernetes in Action: Essential for understanding container orchestration and modern infrastructure
- Google Cloud documentation and case studies: Understand Google's technology stack and design patterns
- Mock interviews on platforms like Pramp, Exponent, or ByteByteGo: Practice system design and behavioral questions with real feedback
- GitHub repository 'sre-interview-prep-guide': Community-contributed SRE interview resources and questions
- Glassdoor and Levels.fyi: Read detailed reviews from Google SRE interviewees about their specific experiences
- Google Cloud Skills Boost: Hands-on labs and courses on Google Cloud infrastructure and best practices
Search Results
Google Site Reliability Engineer (SRE) Interview ...
You can generally expect LeetCode medium to hard questions with emphasis on algorithmic thinking and problem-solving. Some candidates report ...
Google SRE Interview Prep
1. What's the difference between DevOps and SRE? · 2. Why do you wish to become a Google Site Reliability Engineer? · 3. What are the biggest ...
Site Reliability Engineer (SRE) Interview Questions 2025 ...
In this video I have divided S sur interview questions into three categories along with the clear practical answers that interviewers are actually looking for.
Site Reliability Engineer (SRE) Interview Preparation Guide
A collection of questions to practice with for SRE interviews · SRE Interview Questions · Sysadmin Test Questions · Kubernetes job interview questions · DevOps ...
Google Site Reliability Engineer Interview Questions
Review this list of Google site reliability engineer interview questions and answers verified by hiring managers and candidates.
This interview preparation guide was generated using AI-powered research from the sources listed above. While we strive for accuracy, we recommend verifying critical information from official company sources.
Want to create your own tailored preparation guide using our deep research?
Get Started for FreeInterview-Ready Courses
Visual-first, interactive, structured learning paths
Browse Site Reliability Engineer (SRE) jobs
AI-enriched listings across hundreds of company career pages
Explore Jobs