SRE Interview Preparation

Ace your technical interviews with flashcards and detailed STAR-format incident talk-tracks.

Cloud Cost Optimization

70 cards
Cloud Cost Optimizationjunior

If a log category is "excluded" from a storage bucket via a routing rule, does that mean the data is deleted?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

No — exclusion controls routing, not generation or deletion. If another destination (like a compliance/audit bucket) captures all logs unconditionally, the “excluded” data still exists there. To actually stop generating a specific log category entirely, that has to be addressed at the application/source level, not through a routing exclusion rule.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What are the three EKS security scanning tools covered and what does each focus on?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Kube-hunter (penetration testing — simulates an attacker inside a pod), Kubescape (misconfiguration and compliance scanning — most comprehensive, with per-finding remediation links), and Kube-bench (CIS Benchmark auditing — pass/fail per CIS control, used by auditors).

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What does it mean for a metric to be "unused" in a cost-optimization context, and how would you check for this?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

A metric is considered unused if it’s being generated and stored (incurring cost) but never actually queried or displayed by any dashboard. This is checked via the monitoring platform’s “last read” timestamp for each metric, cross-referenced against its sample volume (how much data it’s generating) — a metric with a large sample volume but no reads over an extended window (weeks to months) is a strong candidate for removal.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is a cluster autoscaler, and why does a Kubernetes cluster need one?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

A cluster autoscaler automatically adjusts the number of nodes in a Kubernetes cluster based on current scheduling demand — adding nodes when pods can’t be scheduled due to insufficient resources, and removing nodes when they’re underutilized. Without one, teams either over-provision (wasting money on idle capacity) or under-provision (causing pods to remain unscheduled and applications to fail to scale).

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is a GCP SKU, and why would you filter billing data by it?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

SKU (Stock Keeping Unit) is GCP’s granular identifier for individual billable line items (e.g., a specific type of log storage, a specific VM configuration). Filtering billing data by SKU lets you see exactly which specific resource or service is driving cost, rather than looking at an aggregated total that hides where the money is actually going.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is a Graviton instance and why would you use it?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Graviton instances (suffix g, e.g., m6g.large) run on AWS-designed ARM processors. They are 30–40% cheaper than equivalent Intel instances. They require ARM-compatible application dependencies, which you verify using the AWS Porting Advisor for Graviton. For 99% of modern workloads (containerized apps, modern runtimes), they are drop-in replacements.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is an EC2 Launch Template and why does it matter for ASG migrations?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

A Launch Template is a reusable EC2 configuration blueprint (instance type, AMI, security groups, IAM role, etc.) used by Auto Scaling Groups to launch new instances. Migrating an ASG to a new instance type requires creating a new LT version with the desired type, then triggering an Instance Refresh — the ASG uses the new version for all new instances it launches during the refresh.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is an S3 (or GCS) lifecycle policy, and what problem does it solve?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

A lifecycle policy is a rule set that automatically transitions objects to cheaper storage classes or deletes them after a defined period. It solves the problem of storage costs growing indefinitely as data (like CI/CD artifacts or old backups) accumulates without anyone manually cleaning it up.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is AWS Cost Explorer and why is it the first tool you enable for cost optimization?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Cost Explorer is AWS’s native spend visualization tool. It lets you filter by service, resource, tag, account, region, and time granularity. You enable it first because you need historical cost data before you can make any optimization decision — it’s the source of truth for current and trend spend, and the tool you use to validate that your changes actually reduced the bill.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is AWS Trusted Advisor, and what categories of recommendations does it provide?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Trusted Advisor is an AWS tool that scans your account and provides recommendations across five categories: cost optimization, security, performance, service limits (quota monitoring), and operational excellence (AWS best-practices compliance). Its full feature set requires a paid AWS Support plan.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is gcloud auth login used for?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

It authenticates your local gcloud CLI session against a Google account, via a browser-based login flow, so subsequent CLI commands run with that account’s permissions against GCP resources.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is the difference between kubectl drain and kubectl cordon?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

cordon marks a node as SchedulingDisabled — no new pods will be scheduled on it, but existing pods keep running. drain does both: it evicts all running pods (except DaemonSets) and marks the node as unschedulable. For EKS node group migration, you drain first (move pods off), then cordon (confirm no new pods will land). To rollback: uncordon re-enables scheduling on the old nodes.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What is the difference between Reserved Instances and Savings Plans?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Reserved Instances commit you to a specific instance family, size, and region for 1–3 years; Savings Plans commit you to a $/hr compute spend and can apply across any instance family, size, OS, and region. Savings Plans are more flexible. Both offer the same discount levels at best (3yr all-upfront), but Savings Plans are generally preferred for mixed or evolving workloads. Neither applies to Spot instances.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What's a quick, low-risk way to reduce Prometheus-related cost without removing any metrics?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Increase the scrape interval — the frequency at which Prometheus queries targets for fresh data. A longer interval (e.g., 60 seconds instead of 15 seconds) directly reduces the volume of data ingested and stored, at the cost of slightly less granular/real-time data — usually an acceptable trade-off for non-production environments where near-real-time monitoring isn’t critical.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What's the difference between GCP's _Default and _Required log buckets?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

The _Default bucket holds general production/application/infrastructure logs and has a configurable retention period. The _Required bucket holds everything in _Default plus additional audit/compliance-relevant data (like third-party tool interactions), and has a fixed, typically non-reducible retention period (400 days in this case) because it’s tied to compliance requirements.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What's the difference between GitHub authentication over HTTPS with a password versus SSH keys?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

GitHub deprecated password-based authentication for Git operations over HTTPS. The modern approach is to generate an SSH key pair, register the public key with your GitHub account (under account settings, not per-repository), and use the SSH remote URL to authenticate Git operations with your private key. Personal Access Tokens (PATs) are the equivalent alternative for HTTPS-based workflows.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What's the difference between Intel, AMD, and ARM/Graviton instance families on AWS, from a cost perspective?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

They represent three cost tiers for the same class of compute — Intel is typically the most expensive, AMD (same x86 family, different manufacturer) is a mid-tier, cost-saving option with broad compatibility, and ARM/Graviton (AWS’s own custom ARM-based processors) is typically the cheapest but requires verifying that the application and its dependencies are actually compatible with the ARM architecture before migrating.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What's the difference between reducing log retention and excluding log categories, as two separate cost-optimization techniques?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Reducing retention shortens how long logs are kept once written — it reduces the time dimension of total stored volume. Excluding log categories (like debug or info-level logs) stops those specific categories from being written to a given storage destination in the first place — it reduces the daily volume dimension. They’re independent and stack together: shortening retention alone reduces total stored data proportionally to the retention change, while also excluding low-value categories further reduces the daily volume being retained, compounding the total savings.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

What tags should every AWS resource have, and why?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

At minimum: Name (identification), Owner (accountability), ENV (environment — prod/dev/staging), and LOB (line of business for team-level cost attribution). Without tags, you cannot split costs by environment, automate shutdowns by tag, attribute spend to teams, or produce meaningful cost reports.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

Why is resource tagging described as foundational to cost optimization work?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Tags (like Name, Owner, Environment, Line of Business) allow costs to be attributed to the right team/project, enable auditing of who owns what, and make automation possible — for example, a scheduled script can filter and act only on resources tagged with a specific environment (like shutting down everything tagged Env=dev outside business hours).

Core Syscall Knowledge
Cloud Cost Optimizationjunior

Why might a compliance/audit log bucket be configured to retain data for 400 days even when the regulatory minimum is only 365 days?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Because the storage bucket in question may be non-billable, there’s no cost incentive to trim it closer to the regulatory minimum — retaining a small buffer above the minimum (400 vs. 365 days) provides extra safety margin against edge cases (e.g., timezone/rounding issues near the boundary) without any downside, since it isn’t costing anything extra to do so.

Core Syscall Knowledge
Cloud Cost Optimizationjunior

Why might an organization end up running two overlapping observability stacks (e.g., Prometheus/Grafana and a cloud-native monitoring tool) at the same time?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Often due to team preference or historical accumulation — different team members may be more comfortable with different tools, or a cloud-native tool may have been adopted later without fully retiring the original self-hosted stack. This results in genuine duplication of both cost and effort, since largely the same underlying metrics are being collected and stored by two separate systems.

Core Syscall Knowledge
Cloud Cost Optimizationmid

A client asks for a "rollback plan" before you delete/filter historical log data. What do you need to clarify with them before proceeding?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Clarify that filtering or deleting log data going forward is generally irreversible for data that’s already been removed — a “rollback script” can only change future behavior (e.g., re-enabling a previously excluded log category so new data starts flowing again), not retroactively recover data that no longer exists. Setting this expectation up front avoids a client believing they have a full safety net for a change that, by nature, doesn’t have one for historical data.

Core Syscall Knowledge
Cloud Cost Optimizationmid

A client asks you to confirm that reducing a log bucket's retention period from 30 to 7 days won't affect their compliance posture. How would you verify and communicate this?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

First confirm whether the bucket in question is the organization’s primary compliance/audit log store, or a general operational logging bucket — if the organization maintains a separate, dedicated audit bucket that already retains all the same log categories for the compliance-required duration (in this case, 400 days, exceeding typical minimums), then reducing the operational bucket’s retention has no compliance impact, since the compliance-relevant data is fully preserved elsewhere. Communicate this clearly and explicitly to the client, including exactly where the audit-relevant data continues to live and for how long, rather than assuming they’ll infer this themselves.

Core Syscall Knowledge
Cloud Cost Optimizationmid

A client has a $98K/month AWS bill. Walk me through how you'd approach reducing it.

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

(1) Export full inventory using AWS SDK scripts. (2) Enable Cost Explorer, Compute Optimizer, Trusted Advisor, Cost Anomaly Detection. (3) Audit and enforce tagging. (4) Work layer by layer — Compute first (usually the biggest driver): categorize EC2 by arch/sizing/scheduling opportunity; analyze EKS with Karpenter/CastAI; right-size Lambda. (5) Network: NAT Gateway → VPC endpoints; release unused EIPs. (6) Storage: GP2→GP3; delete idle EBS; S3 lifecycle. (7) Monitoring: CloudWatch retention + export to Glacier. (8) Other: ECR→Harbor; RDS right-size; Savings Plans after 90-day baseline. Validate every change in Cost Explorer.

Core Syscall Knowledge
Cloud Cost Optimizationmid

A client wants to know why their cloud bill increased significantly compared to last month. How would you approach answering this credibly?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Rather than offering a general explanation, use a concrete, evidence-based approach: compare a timestamped resource inventory from before the increase against the current state, identifying exactly which resources were added, removed, or changed in the interim. This lets you give the client a precise, itemized explanation (e.g., “4 additional compute instances, 2 additional node groups, and 1 additional database instance were provisioned since [date]”) rather than a vague or speculative answer — building trust and demonstrating that the cost is well-understood and attributable to specific, identifiable changes.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Explain the difference between excluding a metric via a monitoring console's UI versus blocking it at scrape time, and why the distinction matters for cost.

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Console-level exclusion (e.g., a GCP Metrics Management “exclude metric” rule) prevents a metric from being billed/stored going forward, but the metric may still be actively scraped/collected by the underlying agent — meaning the exclusion is essentially a downstream filter. Scrape-time blocking (e.g., a drop action in a Prometheus/PodMonitoring relabeling configuration) prevents the metric from ever being collected in the first place. The distinction matters because scrape-time blocking is more fundamentally cost-effective and durable — it stops the cost at its actual source rather than relying on an exclusion rule to catch it after collection, and it also reduces unnecessary load on the collection/scraping pipeline itself.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Explain the difference in migration complexity between a standalone EC2 instance, an instance in an Auto Scaling Group, and an EKS node group instance — and why does the difficulty ordering change depending on migration direction?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

These represent three different management models, each requiring different migration mechanics. For Intel→AMD, standalone instances are easiest (simple stop/change-type/start), ASG instances add complexity because you need to update launch templates/configurations that the ASG uses to provision new instances, and EKS node groups are hardest in that direction because you’re coordinating node replacement across a live Kubernetes cluster. For AMD→ARM, this ordering reverses — EKS node groups become easiest (Kubernetes’ native ability to drain and replace nodes with a new node group makes ARM adoption relatively clean), while standalone instances become hardest (no orchestration layer to help manage the cutover safely). This reversal isn’t intuitive and is a genuinely useful piece of hard-won operational knowledge.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Explain the PRC framework for right-sizing decisions.

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Performance, Reliability, and Cost. All three must be balanced. Right-sizing optimizes Cost but must not degrade Performance (latency, throughput) or Reliability (ability to handle traffic spikes). The 20–33% buffer rule ensures the instance has headroom above the P99 peak for traffic spikes. Never size to the average — size to P99 + buffer.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Explain the trade-off between using a managed cloud service versus self-hosting the equivalent open-source tool (e.g., a managed message queue vs. self-hosted Kafka).

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Managed services reduce operational overhead (patching, scaling, backups handled by the provider) but typically cost more and can create migration friction (application code often depends on managed-service-specific APIs/behaviors). Self-hosting can reduce direct service costs but shifts operational burden (uptime, scaling, security patching) onto the team, and — as raised in this transcript — often requires actual application code changes to interact with a different technology, unlike most pure infrastructure-layer optimizations.

Core Syscall Knowledge
Cloud Cost Optimizationmid

How do you migrate 170 EC2 instances from Intel to AMD with zero unplanned downtime?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

(1) Categorize instances into standalone/ASG/EKS node group — each has a different migration procedure. (2) Verify application compatibility (AWS Porting Advisor + developer sign-off). (3) For each instance: take AMI backup → wait for Available → agree maintenance window with stakeholder → stop instance → change instance type to a equivalent → start → monitor 48–72 hrs. (4) For ASG: update Launch Template with AMD AMI/instance type → trigger rolling replacement. (5) For EKS: cordon + drain old nodes → update node group → new nodes come up on AMD. (6) Verify via Cost Explorer. (7) Delete AMI backups. (8) Update Terraform.

Core Syscall Knowledge
Cloud Cost Optimizationmid

How would you determine which compliance frameworks (e.g., SOC 2, ISO, HIPAA, PCI-DSS) apply to your organization's infrastructure, if you're a DevOps engineer without direct visibility into that decision?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

This isn’t something you’d discover by scanning infrastructure — it’s a governance question. Start by asking your engineering manager, security lead, or platform lead directly, since compliance ownership typically sits with security, platform, or dedicated GRC (Governance, Risk, and Compliance) teams. Look for existing organizational documentation — SOC 2 reports, ISO compliance statements, or similar formal artifacts — which will specify the actual requirements (like minimum retention periods or required controls). Once you know which framework(s) apply, you map your specific infrastructure decisions against that framework’s documented requirements rather than assuming a generic best practice applies.

Core Syscall Knowledge
Cloud Cost Optimizationmid

How would you structure a cost optimization engagement for a client with no existing infrastructure documentation?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Start with a full inventory-building phase — extract every resource’s metadata (type, size, utilization) across all accounts/environments before making any changes. Then categorize resources by layer (typically network → compute → data) and validate every proposed change in a non-production environment first, measuring actual cost impact before rolling changes to production. This mitigates the risk of breaking something whose purpose isn’t understood.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Walk through an ASG Intel→AMD migration with zero downtime.

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Create a new Launch Template version with t3a.medium instead of t3.medium. Update the ASG to reference the new LT version. Trigger Instance Refresh with MinHealthyPercentage=80 and InstanceWarmup=300 seconds, using the “Launch before terminate” replacement behavior. The ASG launches new AMD instances, waits for health checks to pass, then terminates old Intel instances. Rollback: update ASG to previous LT version and start another Instance Refresh.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Walk through how you'd approach a situation where a documented cloud CLI command fails, and you're not sure why.

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Start by verifying the command syntax carefully against current official documentation, since typos or outdated syntax are the most common cause. If the syntax appears correct and the command still fails, consider whether the feature might be gated behind a different release track or permission level than what you’re currently using — for GCP specifically, this could mean trying the beta or alpha CLI tracks. If none of that resolves it, search for recent community discussion (blog posts, forums) since official documentation can lag behind actual platform changes — cloud providers do sometimes deprecate or relocate functionality (e.g., moving a configuration option from CLI-accessible to Console-UI-only) without it being immediately obvious from the primary docs.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Walk through the safe, step-by-step process for migrating a standalone EC2 instance from Intel to AMD in a production environment.

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

First identify the equivalent instance type in the AMD family (e.g., T3.mediumT3a.medium). Create and tag an AMI backup, and wait for it to reach “active” status before proceeding — this step should never be skipped in production. Stop the instance, then use “Change Instance Type” to switch to the AMD-family equivalent. Start the instance and monitor application behavior for 48–72 hours (or longer depending on business criticality) to catch any regressions. Validate the actual cost impact in Cost Explorer by filtering on the specific instance ID and comparing pre/post cost. Finally, delete the AMI backup after the monitoring window closes (typically 1–2 weeks later) to avoid unnecessary backup storage cost.

Core Syscall Knowledge
Cloud Cost Optimizationmid

What are the mandatory Kubernetes safeguards before running Spot instances in production?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

HPA (scales pod count when Spot is interrupted and remaining capacity is under-pressure), PDB (prevents drain from removing all replicas simultaneously), ≥2 replicas per workload (ensures one survives any single node interruption), instance-type diversification (3–5 compatible types in the Spot pool to avoid simultaneous reclamation), graceful shutdown (SIGTERM handling to complete in-flight requests within the 2-minute reclamation window), and a 70/30 Spot/On-Demand ASG mix (On-Demand as stable fallback).

Core Syscall Knowledge
Cloud Cost Optimizationmid

What is MaxSessions / right-sizing, and how do you determine the correct instance size?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Right-sizing means matching instance CPU, RAM, and storage to actual utilization. The process: collect CloudWatch metrics over a baseline period (90–365 days); use Compute Optimizer’s recommendations; apply a safety buffer (never size below peak + 20% headroom). Trigger for re-baseline: new feature release, traffic pattern change, or when anomaly detection alerts on sustained CPU spike. Baselining is continuous, not a one-time exercise.

Core Syscall Knowledge
Cloud Cost Optimizationmid

What's the difference between a bastion host and a full PAM (Privileged Access Management) solution like CyberArk, and when would you use each?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

A bastion host is a single, hardened entry point that all SSH traffic must pass through, reducing the attack surface versus exposing every instance directly to the internet. A PAM tool like CyberArk goes further by issuing short-lived, audited, just-in-time credentials/sessions (e.g., valid for only 10–30 minutes) rather than standing SSH access, even through the bastion. Regulated industries (banking, fintech under PCI-DSS) often require PAM-level controls; a bastion alone is a reasonable baseline for less regulated environments, though it introduces friction for teams with fast-changing, ephemeral infrastructure.

Core Syscall Knowledge
Cloud Cost Optimizationmid

What's the practical difference between a Savings Plan and a Reserved Instance, and when would you choose one over the other?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

A Reserved Instance commits you to a specific instance type/family in exchange for a discount — best when your usage on that exact instance type is highly predictable and stable. A Savings Plan commits you to a certain dollar-per-hour spend level instead, and that commitment flexibly applies across any instance type that fits within it — better when your workload mix might shift (e.g., you might right-size or migrate architectures later) and you don’t want to be locked into one specific instance family.

Core Syscall Knowledge
Cloud Cost Optimizationmid

When is it appropriate to stop EC2 instances to save cost, and when is it not?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Stop/schedule shutdowns only for non-production instances (dev, staging, testing). Use tag-based automation: ENV=dev → stop at 10 PM IST, start at 6 AM IST. Production instances should never be automatically stopped — use autoscaling to handle load variations instead. Non-prod scheduling typically saves 30–65% of non-prod compute cost (14–16 hours off per day).

Core Syscall Knowledge
Cloud Cost Optimizationmid

Why does EKS node group migration require ~2–3 minutes of downtime, while ASG migration has zero downtime?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

ASG migrations use Instance Refresh (launch-before-terminate): new instances are fully healthy and serving traffic before old instances are removed. In EKS, you must drain pods off Intel nodes (evicting them) so they can reschedule onto AMD nodes. During the re-scheduling window — from drain until pods are Running on the new nodes — the pod count is reduced. With HPA and PDB configured, this window is ~2–3 minutes. Without them, downtime could be longer.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Why does the recommended migration path go Intel → AMD → ARM instead of directly Intel → ARM?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Because ARM is architecturally distinct from x86 (unlike AMD, which shares the x86 family with Intel), a direct Intel-to-ARM migration carries more risk of an undetected compatibility issue causing an outage — a larger “blast radius.” Staging the migration through AMD first (a lower-risk, high-compatibility step) isolates any remaining ARM-specific risk into a smaller, more controlled second step, making it easier to identify and roll back if something goes wrong.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Why is GCP's Active Assist described as a meaningful differentiator versus AWS Trusted Advisor?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Active Assist’s core recommendation set (cost, security, reliability, performance) is free on GCP, whereas AWS Trusted Advisor’s full recommendation coverage requires a paid AWS Support plan. This makes Active Assist a genuinely free first-pass audit tool, which matters for cost-conscious engagements or smaller organizations that haven’t invested in premium cloud support tiers.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Why might a security scanning tool like ScoutSuite be described as evaluating an environment "from an attacker's perspective" rather than being purely compliance-driven, and when would you choose it over a compliance-framework-oriented tool like Prowler?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

ScoutSuite’s findings are organized around what a realistic attacker would actually attempt and exploit (e.g., default open ports, overly permissive default configurations) rather than being structured primarily around satisfying a specific named compliance standard’s checklist. This makes it well-suited for a general security hygiene review or an initial security posture assessment. You’d choose a compliance-framework-oriented tool like Prowler instead when the actual deliverable needs to demonstrate adherence to a specific named standard (HIPAA, ISO, PCI-DSS, etc.) — for example, when a client or regulator specifically requires evidence of compliance against a named framework, not just a general security assessment.

Core Syscall Knowledge
Cloud Cost Optimizationmid

Why would an organization choose ARM-based (Graviton) instances over x86 (Intel/AMD), and what's the catch?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Graviton instances typically offer better price-performance and lower power consumption for many workloads. The catch is compatibility: applications and their dependencies need to be validated (and sometimes recompiled or have specific ARM-compatible libraries installed) to run correctly on ARM architecture — so it’s not always a zero-code-change migration, even though it’s framed as “infrastructure-only.”

Core Syscall Knowledge
Cloud Cost Optimizationmid

You're told a GCP account's logging costs are unexpectedly high. Walk through how you'd investigate and address it.

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Start by filtering billing data by SKU to confirm logging is actually the driver and quantify it precisely. Next, list the log buckets (gcloud logging buckets list) to see current retention settings — check which buckets are freely configurable (like _Default) versus compliance-mandated (like _Required). Confirm actual business retention needs directly with stakeholders (don’t assume the current setting reflects a real requirement). Categorize the log volume by type (application, infra, debug, info, stdout) to identify categories that can be safely excluded. Propose a combined plan: reduce retention on the configurable bucket, and filter out non-essential log categories at the source (or via exclusion filters if application-level changes aren’t feasible).

Core Syscall Knowledge
Cloud Cost Optimizationsenior

A client insists on continuing to run both a self-hosted Prometheus/Grafana stack and a cloud-native monitoring tool in parallel, citing team preference. How would you approach cost optimization given this constraint, rather than pushing for consolidation?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Accept the constraint as a genuine business/organizational reality rather than treating it as a problem to immediately solve by forcing consolidation, which would require broader buy-in and carries its own disruption risk. Within that constraint, focus on eliminating clear, low-risk waste first — unused metrics, overly frequent scrape intervals for non-critical environments, and metrics being collected for features the client isn’t actually using (e.g., unused service mesh components). As a distinct follow-up phase, obtain visibility into both systems’ actual dashboards (not just their underlying metrics) to identify genuinely duplicate dashboards — content that exists in both Grafana and the cloud-native tool — since removing confirmed duplicates reduces cost without removing anything any team member is actually relying on, sidestepping the more contentious question of full stack consolidation while still capturing meaningful savings.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

A client refuses to let you make application-level logging changes, but wants logging costs reduced. What are your levers, and what are the trade-offs of each?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

With application-level changes off the table, your levers are entirely at the infrastructure/platform layer: (1) reduce log retention period on any non-compliance-mandated buckets — straightforward, proportional cost reduction, no risk to application behavior; (2) apply log exclusion filters at the ingestion layer (e.g., excluding specific namespaces like kube-system, or excluding debug/info/stdout severity levels) — effective but requires careful auditing first to ensure you’re not excluding something operationally or contractually necessary; (3) evaluate whether some “logs” are actually better served by a cheaper storage tier or export destination rather than staying in the primary logging service’s most expensive storage class (not explicitly covered in this transcript, but a standard complementary lever). The main trade-off across all of these: you’re optimizing cost without touching the source of the problem (excessive log emission), so the underlying inefficiency persists in the application even after the infra-layer fix — this is a durable workaround, not a root-cause fix, and should be documented as such for the client.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

A client wants a 50/50 multi-cloud split "for cost savings." How would you push back or reframe this conversation?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Clarify the actual goal first. Multi-cloud rarely reduces cost in practice — it usually increases operational complexity (duplicated tooling, cross-cloud networking, data consistency challenges) and often costs more overall due to lost volume discounts on either single cloud. The stronger, more defensible justification for multi-cloud is high availability — e.g., running redundant workload replicas across two providers so a full outage of one doesn’t take down the whole service — which is the framing this client actually used. If cost is the real driver, single-cloud rightsizing, reserved capacity, and architecture optimization usually deliver far more savings with far less complexity.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

A colleague proposes buying AWS's recommended Savings Plan directly from the console's default suggestion. What risks would you flag, and what would you do instead?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

The console’s default recommendation doesn’t necessarily reflect your organization’s actual usage patterns, future architecture plans (e.g., an upcoming Intel→AMD→ARM migration that will change your effective hourly cost profile), or risk tolerance for over-committing. Blindly accepting it can lead to either under-covering your usage (missing available savings) or over-committing to a spend level you won’t actually reach, locking in unused capacity cost for the term length. Instead, use a dedicated Savings Plan calculation methodology — model your actual historical and projected usage, account for planned infrastructure changes, and choose payment/term parameters (upfront amount, 1-year vs. 3-year) deliberately based on that analysis rather than the default suggestion.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

A Kubescape scan finds 8 of 14 control checks failing for a pod. The most critical finding is "running as root." What's the complete fix, and why does it matter?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Add securityContext: { runAsNonRoot: true, runAsUser: <non-zero-UID> } to the pod spec, and allowPrivilegeEscalation: false to the container spec. Running as root inside a container means that if an attacker achieves container escape (exploiting a kernel vulnerability), they have root on the host node — potentially compromising all other pods on that node. Non-root container compromise still risks lateral movement but is contained at the application level, not the host level.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

A team wants to move their stateful MySQL pod to a Spot instance to save costs. What would you tell them?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Strongly advise against it. Stateful workloads like databases store critical data locally. When AWS reclaims a Spot instance with 2-minute notice, MySQL’s data directory is on the terminated instance. Even with EBS volumes (which persist after instance termination), the 2-minute window may not be enough for a clean MySQL shutdown, risking database corruption. The correct pattern: keep MySQL on On-Demand. If cost is a concern, purchase an RDS Reserved Instance (which is effectively a committed savings plan for managed databases). Only stateless workloads belong on Spot.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

Compare CastAI, Karpenter, and a standard Kubernetes cluster-autoscaler. When would you recommend each?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

All three solve node-level autoscaling, but differ in sophistication and cost. Standard cluster-autoscaler is the free, baseline Kubernetes-native option — reactive, rules-based. Karpenter (AWS-native) improves on this with faster, more flexible node provisioning, still free, still avoids vendor lock-in — a strong default recommendation for AWS-based clusters with no budget for third-party tooling. CastAI adds predictive, ML-driven cost optimization, a broader feature set (rebalancing, non-Kubernetes managed-service optimization via its “Optimizer,” application monitoring), and can be granted authority to auto-apply changes — appropriate when the organization values a broader, cross-cloud FinOps platform and is willing to pay for it and accept a degree of vendor dependency. The right choice depends on budget, existing tooling investment, cloud provider, and organizational appetite for third-party access to production clusters.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

Design a sequencing strategy for a multi-phase cloud cost optimization engagement, using the principle demonstrated in this session (start with the lowest-risk changes).

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Categorize every candidate optimization by two dimensions: expected savings magnitude, and disruption/rollback risk. Prioritize changes that are simultaneously high-value and low-risk first — configuration-only changes with no production dependency (like logging retention and exclusion rules, as in this session) are ideal starting points because they build measurable, demonstrable wins with essentially zero risk of client-facing impact, and are trivially reversible if something goes wrong. This creates trust and momentum before moving to progressively higher-risk changes (e.g., compute rightsizing, architecture migrations, database changes) that may require staged rollouts, monitoring windows, or negotiated maintenance windows. Explicitly documenting the rollback plan for each change (as was done here — delete the sink, revert the retention command) as part of the initial proposal, not as an afterthought, is part of what makes this sequencing defensible to a risk-conscious client.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

Design a systematic inventory-building process for a GCP account with no existing documentation, using the gcloud CLI. What categories would you capture, and why does the organizational structure matter?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Organize by resource domain — compute (VM metadata: type, zone, status, IPs, disks), GKE (clusters, node pools, node labels/taints — critical because node pool configuration directly drives compute cost and scheduling behavior), databases (Cloud SQL and Redis/Memorystore, including tier, region, availability configuration), networking (external IPs and load balancer rules — often a source of orphaned/wasted spend), storage (GCS bucket configuration), and ops (logging and monitoring configuration). Structuring the inventory this way lets you reason about cost and risk by domain rather than as one undifferentiated resource list, and it maps cleanly onto how cloud billing itself is typically broken down (compute, storage, networking, managed services), making the subsequent cost-optimization analysis far more tractable. Consolidating everything into a single unified spreadsheet (e.g., via a pandas/openpyxl script) at the end makes cross-domain analysis and reporting much easier than working across a dozen separate CSVs.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

Design a systematic process for auditing and reducing an organization's Cloud Monitoring/observability costs, using the approach demonstrated in this session as a starting point.

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Start by inventorying every currently-stored metric along with its sample volume and last-read timestamp, using an appropriately extended lookback window (not just the default short window, since infrequently-but-genuinely-used metrics could otherwise be misclassified as unused). Categorize high-volume, zero-read metrics into logical groups (by prefix, resource type, or subsystem) rather than evaluating thousands of individual metrics one at a time. For each category, confirm with relevant stakeholders (application teams, the client) whether the underlying feature/tool (e.g., Istio) is genuinely unused before excluding its metrics, to avoid accidentally removing something that has value not currently reflected in dashboard usage. Apply exclusions at the most durable level available — scrape-time/ingestion blocking where possible, rather than only console-level post-collection exclusion — and build tooling (e.g., a regex-based bulk exclusion script) to make this a repeatable, low-effort process rather than a one-time manual cleanup, since new low-value metrics will continue to accumulate over time as the environment evolves. Separately, tune collection frequency (scrape intervals) per environment tier, applying looser intervals to non-production where real-time granularity isn’t business-critical.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

Explain the tradeoffs between Compute Savings Plans, EC2 Savings Plans, and Reserved Instances.

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Compute Savings Plans offer the most flexibility — apply to any EC2 family/region/OS, Lambda, and Fargate, but the discount is slightly lower. EC2 Savings Plans are more restrictive (specific family + region) but offer deeper discounts. Reserved Instances are most restrictive (specific instance type) and the deepest discount, but can be sold on the Marketplace if unused. General rule: use Compute Savings Plans for dynamic environments; EC2 Savings Plans or RIs for stable, long-running workloads where the instance family is unlikely to change.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

How do you implement FinOps for a multi-account AWS organization with 20 accounts?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Use AWS Organizations + Control Tower. Each account has its own budget and alerts (AWS Budgets). Cost is aggregated in a centralized billing/FinOps account using Cost Explorer’s multi-account view. Tag policies (Service Control Policies) enforce mandatory tags across all accounts. Quotas are set per-account using Service Quotas. FinOps team monitors and reports; application teams own spend decisions. Chargeback/showback happens via tag-based cost allocation reports exported to S3 and loaded into a BI tool.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

How does Karpenter differ from a standard EKS managed node group with Cluster Autoscaler?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Standard Cluster Autoscaler scales the number of nodes within a fixed node group (fixed instance type). Karpenter provisions the right instance type and size for the specific pods waiting to be scheduled — it reads pod resource requests and picks the cheapest instance that fits, including Spot if appropriate. This eliminates over-provisioning at the node level. Combined with CastAI, which also handles multi-cloud and DB optimization, you get significantly better cost visibility and control than native autoscaling alone.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

How should FinOps governance be structured across a multi-account AWS Organization to prevent runaway costs, without making the FinOps team a bottleneck for every provisioning decision?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Structure it so budget/capacity/forecast conversations happen at the point an application team requests new resources — before provisioning, not after — with budget alerts and monitoring configured as part of that same provisioning step, not retrofitted later. The FinOps team’s role should be centered on monitoring, reporting, and flagging deviations (using tools like AWS Budgets and Service Quotas across accounts), while the actual consumption/budget decisions remain with the application/owner team, since they understand the real business need driving that consumption. Establish a tolerance band (a commonly cited rule of thumb is roughly ±10–20% deviation from forecast being acceptable) so minor, expected fluctuation doesn’t trigger unnecessary friction — but deviations well beyond that band (e.g., ±50%) should trigger a structured re-evaluation of the original budgeting assumptions, feeding into a revised forecast for the next cycle, rather than either being ignored or requiring FinOps to approve every individual resource change.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

How would you decide whether a given security finding from a general-purpose scanning tool (like ScoutSuite) warrants immediate remediation versus being logged for a later, more formal audit phase?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Assess based on the finding’s actual exploitability and blast radius in the specific environment — e.g., default firewall rules or default SSH access being left enabled on internet-facing resources represents an immediately exploitable, high-severity gap warranting prompt remediation, since it doesn’t require any special access or insider knowledge to exploit. Lower-severity findings, or findings on non-production/isolated resources with limited blast radius, can reasonably be logged and addressed as part of a more comprehensive, later compliance-focused audit phase (as this session explicitly scoped this particular scan as a lightweight overview ahead of a fuller Phase 2 security engagement) — the key judgment is distinguishing “this is actively exploitable right now with minimal effort” from “this is a gap that should be closed as part of ongoing security maturity work,” and prioritizing the former for immediate action regardless of which broader engagement phase is officially underway.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

How would you design a cost-optimization approach for a client's EC2 fleet where 116 out of 170 instances are candidates for architecture migration, while ensuring no production risk?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Start with an inventory categorized by both current architecture and management type (standalone/ASG/EKS node group), since these dictate the migration procedure. Run an application compatibility assessment (developer review + tooling like AWS Porting Advisor for Graviton) to separate instances that are safe for direct ARM migration from those that need the safer Intel→AMD→ARM staged path, and from those that shouldn’t be touched at all due to unresolved dependencies. Prioritize by expected savings and migration simplicity — likely starting with standalone Intel→AMD instances (lowest complexity, immediate savings, minimal blast radius) before tackling ASG and EKS node group migrations. Every migration should follow the backup-first, stop/change/start, monitor-for-a-defined-window, validate-actual-savings, delete-backup-after-window procedure. At production scale, this entire workflow should be codified in Terraform/Ansible/scripting rather than executed manually, to preserve auditability and IaC state accuracy — and any change affecting production should respect an agreed downtime/maintenance window (e.g., HealthCorp’s ~30-minute daily window) rather than being executed ad hoc.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

How would you explain to a non-technical stakeholder (e.g., a compliance officer) the difference between "we stopped storing these logs in our operational bucket" and "we deleted this data," in a way that would satisfy an audit conversation?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

I’d explain that this was purely a routing/storage-location change, not a data-deletion action: specific low-value log categories (like routine debug and informational messages) were reconfigured to no longer be duplicated into our day-to-day operational log storage, purely to control storage cost — but the complete, unfiltered record of all logs, including those same categories, continues to be captured in full in our dedicated compliance/audit log store, which is retained for [X] days per our compliance requirements and was never modified by this change. I’d offer to show the actual configuration (the exclusion rule scoped only to the operational bucket, with the audit bucket’s inclusion/retention settings unchanged) as verifiable evidence, since audit conversations generally go better with concrete, inspectable configuration rather than a verbal assurance alone.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

How would you reconcile a scenario where the aggregate billing figure for a service (e.g., "30,000 GB over 90 days") doesn't cleanly match a per-day calculation presented separately (e.g., "30 GB/day × 30 days")? What would you do before presenting a cost-savings number to a client?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Treat any live, back-of-envelope arithmetic as provisional until cross-checked against the actual billing/usage data pulled directly from the cloud provider. In this case, the two figures given in the session (30,000 GB over 90 days, versus an implied ~30 GB/day × 30 days = 900 GB calculation) don’t reconcile cleanly, and a careful engineer would pull the actual daily log ingestion volume from Cloud Logging metrics (or the billing export) rather than relying on a rounded mental-math example used for illustrative purposes in a live call. Before presenting a specific savings figure externally (to a client or in a report), always verify it against the authoritative billing/usage source rather than a live-session approximation.


Core Syscall Knowledge
Cloud Cost Optimizationsenior

How would you scope a security audit for a client with 13+ separate cloud accounts and no architecture documentation, and what audit categories would you define?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Break the audit into discrete, sequential categories rather than attempting one monolithic audit: (1) cloud account audit — permissions, exposed resources, misconfigurations across every account; (2) CI/CD audit — pipeline security, secret handling, Terraform/IaC review, rollback capability; (3) platform/internal-tooling audit — any custom self-service tools built by the org; (4) architectural audit — reviewing whether the design itself (not just configuration) is inefficient or insecure, covering compute and data layers; (5) backup and disaster recovery audit — with DR explicitly scoped as a separate conversation from routine backup review, since DR involves RTO/RPO-style questions (how fast can the full environment be recreated) that go beyond “do backups exist.”

Core Syscall Knowledge
Cloud Cost Optimizationsenior

What are the risks of buying a Savings Plan without doing the mathematics first?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

Over-commitment: you pay for unused compute hours for 1–3 years with no refund or resale option (unlike Reserved Instances). Under-commitment: you leave money on the table — On-Demand pricing for the uncovered portion. The correct process: analyze the past 90-day On-Demand baseline (removing already-covered spend), project the stable portion that won’t scale down, and commit to that $/hr amount, leaving headroom for growth. AWS’s Savings Plans recommendations in Cost Explorer help but should be validated manually.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

What's the risk profile of making infrastructure changes to a system with no clear ownership or point of contact, and how do you mitigate it?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

The core risk is that a seemingly safe infra-layer change (e.g., resizing an instance, changing a storage class) could unexpectedly break a business-critical dependency that isn’t documented anywhere and that no single person can confirm is safe to touch. Mitigation strategies discussed/implied in this transcript: build a complete inventory before any change; validate every change in a lower environment first (with pre-prod treated as production-critical here); constrain all changes to a narrow, pre-approved maintenance window; and be willing to run duplicate infrastructure in parallel during a migration so a rollback is instantaneous rather than a scramble.

Core Syscall Knowledge
Cloud Cost Optimizationsenior

Why can you NOT specify an IAM instance profile in the Launch Template when creating EKS node groups via CLI?

Tags: aws, cost-optimizationReveal Answer →
ANSWER REFERENCE

When you use aws eks create-nodegroup with a --node-role, the EKS service automatically creates and attaches an instance profile derived from that node role to the EC2 instances in the node group. If the Launch Template also specifies an instance profile, AWS returns an error because only one instance profile can be attached to an EC2 instance. The fix: in the Launch Template’s Advanced Details, explicitly set “Do not include IAM instance profile.”

Core Syscall Knowledge
Cloud Cost Optimizationsenior

You've configured a log exclusion rule and want to verify it's actually working as intended. What would your verification process look like, and why is timing important?

Tags: gcp, cost-optimizationReveal Answer →
ANSWER REFERENCE

Since log routing and storage aggregation aren’t necessarily instantaneous, you’d need to allow a reasonable window (this session specifically used 24–72 hours) before checking whether the exclusion is actually reducing what lands in the target bucket — checking too soon could show a false negative (exclusion appears not to be working) simply because insufficient time has passed for the effect to be observable in aggregate storage metrics. The verification itself should compare the bucket’s daily/total storage volume before and after the change takes full effect, ideally cross-referenced against the specific excluded categories no longer appearing when querying that bucket directly in Log Explorer — not just trusting that the configuration was accepted without errors, since a successfully-created sink doesn’t guarantee it’s filtering exactly as intended until you’ve observed the actual effect on stored data.

Core Syscall Knowledge

Kubernetes

46 cards
Kubernetesjunior

A pod is in Pending state. Where do you look first?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

kubectl describe pod <pod-name> -n <namespace> and read the Events section at the bottom. It will say something like: “0 nodes available: 1 node had taint that the pod didn’t tolerate, 1 node had pod anti-affinity rules rejecting the pod, 1 node was cordoned.” Each reason maps to a specific fix.

Core Syscall Knowledge
Kubernetesjunior

A pod is stuck in Pending with no node or IP assigned. Should you check CNI logs first?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

No — a pod with no node assigned hasn’t even passed the scheduling stage yet, and CNI issues (like failed pod sandbox creation or IP assignment) only become relevant after a pod has been scheduled and is attempting to start. Checking CNI logs at this stage would be investigating a stage the pod never reached; the correct first step is to check the pod’s scheduling-related events (kubectl describe pod) instead.

Core Syscall Knowledge
Kubernetesjunior

Does a Pod Disruption Budget prevent a pod from being scheduled?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

No — this is a common misconception. A PDB only affects voluntary disruptions (like draining a node or evicting a pod) by guaranteeing a minimum number of replicas remain available during such operations. It has no effect on the initial scheduling decision for a new pod.

Core Syscall Knowledge
Kubernetesjunior

In what order does the kubelet evict pods under memory pressure?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

BestEffort pods are evicted first, followed by Burstable pods if pressure continues, and Guaranteed pods only as a last resort.

Core Syscall Knowledge
Kubernetesjunior

What are the three Kubernetes QoS classes, and how are they assigned?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

Guaranteed (requests equal limits for every resource), Burstable (some requests set, but not equal to limits), and BestEffort (no requests or limits set at all). They are automatically derived by Kubernetes from how you define requests/limits — you don’t set the QoS class directly.

Core Syscall Knowledge
Kubernetesjunior

What do kubectl drain and kubectl cordon each do, and why are both needed when migrating a node group?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

drain evicts all currently-running pods from a node (or node group), forcing the Kubernetes scheduler to reschedule them elsewhere. cordon marks a node as unschedulable, preventing any new pods from being placed there in the future. Both are needed together: draining alone would remove current pods, but without cordoning, the scheduler could still place new pods back on the same (soon-to-be-retired) nodes.

Core Syscall Knowledge
Kubernetesjunior

What does it mean when a Kubernetes pod is stuck in Pending state with no node or IP assigned?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

It means the Kubernetes scheduler has not yet been able to place the pod onto any node at all — this is different from a pod that’s been scheduled but is failing to start (e.g., due to an image pull error or crash). A pod with no node assignment indicates a scheduling-level problem: the scheduler couldn’t find any node satisfying all of the pod’s placement constraints (resource requests, node affinity/anti-affinity, taints/tolerations, node selectors).

Core Syscall Knowledge
Kubernetesjunior

What is a taint and how does it affect pod scheduling?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

A taint is a key=value:effect mark on a node that repels pods without a matching toleration. Effects: NoSchedule (new pods without matching toleration won’t be placed here), PreferNoSchedule (soft — prefer not to place, but will if no other option), NoExecute (evicts existing pods that don’t have a matching toleration). Pods that need to run on a tainted node must include a tolerations spec in their pod spec.

Core Syscall Knowledge
Kubernetesjunior

What is the difference between a pod being OOMKilled and a pod being Evicted?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

OOMKilled happens when a single container exceeds its own memory limit; the Linux kernel, via cgroups, kills it — this is a container-level event. Evicted happens when the node itself is under resource pressure (memory/disk/PID); the kubelet proactively removes pods to protect the node — this is a node-level event. They have different causes and require different fixes.

Core Syscall Knowledge
Kubernetesjunior

What is the difference between kubectl cordon and kubectl taint?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

cordon marks a node as SchedulingDisabled (no new pods will be placed there by any pod — total block). taint marks a node with a specific key/value/effect that only repels pods without a matching toleration (other pods without that toleration are blocked, but pods WITH the toleration are fine). Cordon is for maintenance; taint is for workload segregation.

Core Syscall Knowledge
Kubernetesjunior

What's the difference between modifying an ASG's Launch Template directly versus creating a new Launch Template version?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

A Launch Template supports versioning — rather than editing the existing (active) version in place, you create a new version with the desired changes (e.g., a different instance type), while the old version remains fully intact and available. You then point the ASG at the new version explicitly. This preserves the old version as an instant rollback path if the new configuration causes problems.

Core Syscall Knowledge
Kubernetesjunior

What's the difference between requiredDuringSchedulingIgnoredDuringExecution and preferredDuringSchedulingIgnoredDuringExecution in Kubernetes affinity rules?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

required is a hard constraint — if no node satisfies it, the pod remains Pending indefinitely; the scheduler will not compromise. preferred is a soft constraint — the scheduler tries to satisfy it, but will still place the pod on the best available node even if the preference can’t be met, rather than leaving it unscheduled.

Core Syscall Knowledge
Kubernetesjunior

What's the difference between the Kubernetes scheduler's "filter" phase and "score" phase?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

The filter phase removes any node that violates a hard constraint (like a required anti-affinity rule, an unmet node selector, or an unmatched taint) — those nodes are entirely excluded from consideration. The score phase then ranks the remaining, filtered-in nodes by weight or priority to select the best candidate among valid options. A pod stuck in Pending has, by definition, failed the filter phase — every candidate node was excluded.

Core Syscall Knowledge
Kubernetesjunior

What's the first command you'd run to understand why a specific pod is stuck in Pending state?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

kubectl describe pod <pod-name> — specifically, review its Events section, which directly states the scheduler’s reason(s) for failing to place the pod (e.g., “node(s) didn’t match pod affinity/anti-affinity rules,” “node(s) had untolerated taint,” or resource-related messages).

Core Syscall Knowledge
Kubernetesjunior

Why might a Compute Savings Plan be preferable to an EC2 Instance Savings Plan for an organization using multiple AWS compute services?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

A Compute Savings Plan applies its commitment discount flexibly across EC2, Lambda, and ECS/Fargate collectively, whereas an EC2 Instance Savings Plan only covers EC2 usage. If an organization uses more than just EC2 for compute, a Compute Savings Plan provides broader coverage from a single commitment, rather than needing separate plans (or leaving non-EC2 compute uncovered).

Core Syscall Knowledge
Kubernetesmid

A checkout-api pod is Pending. kubectl describe pod shows: "0 nodes available: 1 node had taint {workload=batch:NoSchedule}, 1 node was cordoned, 1 didn't match pod's node affinity." What are the three fixes and which should you apply in a P0?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Fix 1 (immediate/P0): Add a toleration to the Deployment spec for the batch taint, uncordon the cordoned node (if safe), and verify/fix node affinity labels. Fix 2 (medium-term): Add a 3rd on-demand node with the correct labels so anti-affinity can be satisfied with required. Fix 3 (permanent/architectural): Ensure the Deployment’s scheduling constraints are always satisfiable at any scale — document the relationship between replica count, anti-affinity requirements, and minimum node count.

Core Syscall Knowledge
Kubernetesmid

A node has a new taint added to it, but the pods that were already running on that node before the taint was added are still running fine. Why doesn't the taint affect them?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Taints (with the default NoSchedule effect, as opposed to NoExecute) only affect future scheduling decisions — they prevent new pods without a matching toleration from being scheduled onto that node, but they don’t retroactively evict pods that are already running there. This is exactly why a cluster can “look fine” after a taint is added — until the next deployment, rollout, or scale-up event triggers a fresh scheduling decision that then gets blocked.

Core Syscall Knowledge
Kubernetesmid

A production pod shows status Evicted. What should you check first, and why?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

Check kubectl describe node <node> for the MemoryPressure (or DiskPressure/PIDPressure) condition — Evicted is a node-level symptom, so the investigation should start at the node, not the pod’s own configuration. Simply raising that pod’s memory limit will not fix a node-level capacity shortfall.

Core Syscall Knowledge
Kubernetesmid

A team wants to use spot instances for a production Kubernetes workload but is worried about interruption risk. What architectural safeguards would you recommend?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

At minimum: run at least 2 replicas so a single spot interruption doesn’t take the workload fully offline; configure a Horizontal Pod Autoscaler so capacity can adjust to compensate; configure a PodDisruptionBudget so voluntary disruptions (including node draining) don’t remove too many replicas simultaneously; design a fallback instance-type chain so that if your preferred spot instance type becomes unavailable, the system automatically falls back to alternative types rather than failing to schedule; and implement graceful shutdown handling in the application so it can respond cleanly to spot interruption notices. This mirrors how real, sophisticated organizations (Pinterest, Slack, Netflix, per their own published engineering blogs) run substantial production workloads on spot successfully.

Core Syscall Knowledge
Kubernetesmid

Explain podAntiAffinity with required vs. preferred and give a real-world scenario where using required would cause a production outage.

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

required is a hard constraint — if unsatisfiable, the pod stays Pending forever. preferred is a soft constraint with a weight — if unsatisfiable, the pod schedules anyway. Real-world scenario: a deployment with 3 replicas and required anti-affinity (topologyKey: hostname) runs fine on a 3-node cluster. A new node group with a taint is added but the pod spec has no toleration. A node maintenance event reduces available nodes to 2. The 3rd replica can’t schedule (both remaining nodes already have a replica) → Pending → rolling deployment freezes → CI/CD blocked. Fix: either add a 3rd node, add a toleration for the new node, or change to preferred.

Core Syscall Knowledge
Kubernetesmid

Explain why an engineer might deliberately avoid right-sizing instances during a cloud-to-cloud migration, even though both activities individually seem like sound cost-optimization practice.

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Different cloud providers implement instance families with different underlying capacity characteristics and specifications, even when instance types are marketed as roughly “equivalent” (e.g., a GCP machine type and an AWS instance type with similar vCPU/RAM numbers can still behave differently under real workload conditions). Attempting to simultaneously migrate to a new provider and right-size instances compounds two large sources of behavioral change at once, making it much harder to isolate the cause if something goes wrong — and can directly cause incidents, since you’re both changing the underlying platform and reducing headroom at the same time. The safer practice is to complete the migration first, stabilize, observe real-world behavior on the new platform, and only then evaluate right-sizing separately.

Core Syscall Knowledge
Kubernetesmid

Explain why converting a pod anti-affinity rule from "required" to "preferred" is a meaningful fix, but why it might not be sufficient on its own.

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

required anti-affinity operates in the scheduler’s filter phase — it can entirely exclude nodes from consideration, potentially leaving zero valid candidates and causing a pod to stay Pending indefinitely. preferred anti-affinity operates only in the score phase, meaning it never removes a node from consideration — it can only influence ranking among nodes that already passed filtering, so it can never by itself block scheduling. However, if other filter-phase constraints are also active (like a conflicting node selector, or taints without matching tolerations), those other constraints can still independently cause the pod to remain unschedulable even after the anti-affinity rule is loosened — meaning a full fix requires addressing every contributing filter-phase constraint, not just one.

Core Syscall Knowledge
Kubernetesmid

Walk through why migrating an EKS node group's architecture requires downtime, while migrating a standalone EC2 instance or an ASG-managed instance typically doesn't.

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Standalone instances can simply be stopped, have their instance type changed in place, and restarted — a direct, self-contained operation. ASG migrations can achieve zero downtime by launching and health-verifying new instances before terminating old ones (the ASG manages this overlap directly). EKS node group migration is fundamentally different: it depends on the Kubernetes scheduler naturally rescheduling pods after the old node group is drained and cordoned — there’s an inherent window between pods being evicted from the old nodes and being successfully placed and started on the new node group, which is where the ~2–3 minutes of downtime comes from. This is a scheduling-driven process, not a simple infrastructure swap.

Core Syscall Knowledge
Kubernetesmid

What is a "retry storm," and how did it appear in this incident?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

When clients retry failed requests during an outage, those retries add additional load to an already-degraded system, creating a feedback loop that worsens latency and error rates. In this incident, checkout failures triggered client-side retries, which amplified load on the already-pressured checkout-gateway pods.

Core Syscall Knowledge
Kubernetesmid

What is the difference between nodeSelector and nodeAffinity, and why should nodeSelector be avoided in autoscaling environments?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

nodeSelector is a simple key-value map that hard-constrains pod placement to nodes with all matching labels. nodeAffinity supports the same hard constraint (required) but also a soft (preferred) form, and supports complex expressions (In, NotIn, Exists, DoesNotExist, Gt, Lt). In autoscaling environments (ASG, Karpenter), newly-provisioned nodes are assigned dynamic names/IPs; if nodeSelector points to a specific node name or label that new nodes don’t have, pods will never schedule on new nodes. nodeAffinity with preferred is more resilient.

Core Syscall Knowledge
Kubernetesmid

What's the difference between stating a root cause and stating a symptom in an incident report, and why does this distinction matter?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

A symptom is what was directly observed during the incident (e.g., “the PDB caused the deployment to fail”); a root cause is the complete causal chain that actually produced that symptom (e.g., a node selector reduced eligible nodes, a hard anti-affinity rule then capped achievable replica count below the PDB’s guarantee, and the PDB then blocked any disruption from proceeding, ultimately manifesting as a blocked deployment). Stating only the symptom as if it were the root cause produces an incomplete, sometimes factually incorrect account (a PDB, for instance, cannot directly “cause a deployment to fail” — it can only block eviction), and critically, it also produces incomplete or wrong remediation, since fixing only the symptom’s proximate trigger without addressing the full chain risks leaving the underlying structural issue in place.

Core Syscall Knowledge
Kubernetesmid

What should be included in a Kubernetes incident's RCA to make it useful to both on-call engineers and non-technical executives?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

A structured RCA should include a short (~5 line), plain-language summary covering what happened, customer impact, root cause, immediate fix, and prevention plan — accessible to a non-technical reader. This should be paired with substantially more technical depth elsewhere in the document: a detailed, timestamped timeline; the full technical root-cause causal chain (not a single symptom); precise blast-radius scoping (what was and wasn’t affected); a gap analysis explaining why the incident wasn’t caught earlier; and specific, technically verifiable action items. Supporting evidence (screenshots, command output) should back every significant claim throughout.

Core Syscall Knowledge
Kubernetesmid

Why is "allocatable memory" different from a node's advertised memory capacity, and why does that matter?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

A portion of a node’s total memory is always reserved for the OS, the kubelet, the container runtime, and system daemons/agents (e.g., CNI). Allocatable memory = Capacity − Reserved. If workload placement assumes allocatable equals capacity (as happened in this incident), the node will run out of real usable memory sooner than expected, triggering premature MemoryPressure and eviction.

Core Syscall Knowledge
Kubernetesmid

Why might kubectl top nodes show "normal" CPU while the node is actually in trouble?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

top reflects live CPU/memory usage snapshots but doesn’t directly surface node conditions like MemoryPressure. A node can have normal CPU utilization while still crossing a memory-based eviction threshold — you need kubectl describe node (or equivalent condition checks) to see pressure conditions directly.

Core Syscall Knowledge
Kubernetesmid

Why might simply uncordoning a previously-cordoned node "fix" a stuck pod, but not actually be a correct or complete fix?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Uncordoning makes a node schedulable again, which can allow a Pending pod to finally be placed — but if the underlying cause was a combination of issues (e.g., taints on other nodes with no matching tolerations, as in this session), the newly-uncordoned node may become the only viable target, causing all replicas to concentrate there rather than being properly spread according to the deployment’s original anti-affinity intent. This “resolves” the immediate symptom (pod no longer Pending) without addressing the underlying misconfiguration (missing tolerations), and undermines the resiliency goal the anti-affinity rule was meant to enforce in the first place.

Core Syscall Knowledge
Kubernetesmid

You've fixed a pod's anti-affinity rule from required to preferred, but the pod is still stuck in Pending. What would you check next?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Loosening the anti-affinity constraint only addresses that one specific requirement — if the pod is still failing to schedule, other independent constraints are likely still unsatisfied. Check kubectl get events again for the current failure reason, and specifically review the pod/deployment spec for taints/tolerations mismatches and any nodeSelector that might be pointing to a node that doesn’t actually exist or doesn’t satisfy the other constraints — all of these are evaluated together (AND logic), so fixing one doesn’t guarantee the pod becomes schedulable if others remain unresolved.

Core Syscall Knowledge
Kubernetessenior

A namespace has no ResourceQuota/LimitRange, and a BestEffort batch job is co-located with a Burstable production service on the same node group. What's the risk, and how would you redesign this?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

The BestEffort job has no cap on consumption, so it can drive the node into memory pressure, at which point the kubelet’s QoS-based eviction can escalate to evicting the Burstable production service once BestEffort pods alone aren’t enough to relieve pressure. Redesign options: separate critical and non-critical workloads onto distinct node groups/pools; apply namespace-level ResourceQuota/LimitRange; set explicit requests/limits on the batch job (moving it out of BestEffort); consider Guaranteed QoS plus a PriorityClass for the critical service; enable cluster autoscaler/Karpenter so genuine capacity shortfalls provision new nodes rather than force eviction.


Core Syscall Knowledge
Kubernetessenior

A team's PDB, anti-affinity rule, and node selector are each individually reasonable, but together they create a scheduling deadlock. How would you design a process to catch this class of compound misconfiguration before it reaches production?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

Since no single setting is individually wrong, code review alone (reviewing each configuration change in isolation) is unlikely to catch this — the risk specifically arises from interaction between settings that may even be defined in separate files or changed at separate times. A more effective approach combines: (1) a pre-deployment or CI validation step that simulates or calculates the maximum achievable replica count given the combination of current node labels/taints, anti-affinity rules, and node selectors for a given deployment, flagging any case where that maximum falls below the deployment’s desired replica count or below any associated PDB’s minAvailable threshold; (2) treating any PDB configuration change as requiring explicit cross-validation against the current scheduling constraints of the deployment it governs, not just against the deployment’s replica count in isolation; and (3) periodic, scheduled audits (not just point-in-time reviews at deployment creation) that re-check this same combination, since node labels/taints can change independently of the deployment spec over time (exactly as happened in this incident, where taints were likely added after the original pods were scheduled) — meaning a configuration that was safe when first deployed can silently become unsafe later without any change to the deployment itself.

Core Syscall Knowledge
Kubernetessenior

A team wants to enforce strict one-pod-per-node placement for a critical, high-availability service using required pod anti-affinity, but their cluster doesn't reliably have enough distinct, correctly-configured nodes available to satisfy this at all times (e.g., during a temporary node group scaling event). What are the trade-offs of different approaches to this tension?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Using required anti-affinity preserves the strongest guarantee — the scheduler will never colocate replicas on the same node, ensuring true node-level fault isolation — but at the cost of pods potentially being stuck Pending (and therefore under-replicated/under capacity) whenever sufficient distinct nodes aren’t available, which is itself an availability risk during exactly the kind of event (node loss, scaling, maintenance) that high availability is meant to protect against. Using preferred anti-affinity instead guarantees pods will always be scheduled (assuming other resources are available), trading away the strict node-spread guarantee for scheduling reliability — meaning under resource pressure, the scheduler might place two replicas on the same node, reducing the fault-isolation benefit exactly when it might matter most. A more robust approach than choosing one or the other outright is ensuring genuinely sufficient, correctly-configured node capacity is reliably available (e.g., via a properly-configured cluster autoscaler with node groups that match the deployment’s actual constraints) so that required anti-affinity’s guarantee can be honored without regularly hitting scheduling failures — treating capacity planning and autoscaling configuration as the actual fix, rather than permanently weakening the availability guarantee to work around insufficient capacity.

Core Syscall Knowledge
Kubernetessenior

Describe the interaction between nodeSelector, podAntiAffinity, and tolerations as AND conditions in the Kubernetes scheduler. How can these compound to deadlock a pod?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

The scheduler must satisfy ALL constraints simultaneously. If nodeSelector says “only on nodes with label X,” and podAntiAffinity: required says “not on any node that has a pod with label Y,” and tolerations must match all node taints — then any node that satisfies one constraint may fail another. In this session: nodeSelector filtered to primary nodes → anti-affinity required 1 pod per host → only 2 primary nodes available → 3rd pod can’t satisfy anti-affinity → Pending. All three constraints were AND’d. The deadlock was broken only by removing nodeSelector (eliminated one constraint) and changing anti-affinity to preferred (made another constraint soft).

Core Syscall Knowledge
Kubernetessenior

Design a diagnostic approach for a Kubernetes incident where a pod is stuck in Pending, using the frameworks discussed in this session.

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

First, determine whether the symptom belongs to the control plane (scheduling, controllers, PDBs, eviction) or the data plane (kube-proxy, CNI, networking) — a Pending pod with no node/IP assigned is unambiguously a control-plane symptom, so data-plane investigation (CNI logs, kube-proxy logs, networking) should be deferred entirely. Next, apply the pod lifecycle checklist (created → scheduled → running → reachable) to confirm exactly which stage the pod is stuck at — in this case, scheduling. Since scheduling failures originate in the scheduler’s filter phase, narrow investigation to the small, known set of filter-phase causes: node selectors, taints/tolerations, affinity/anti-affinity rules, resource requests vs. available capacity, and topology constraints. Use kubectl describe pod to read the scheduler’s own stated reason for the failure directly from the Events section, rather than guessing, and cross-reference the deployment’s actual spec (nodeSelector, affinity, tolerations) against the cluster’s actual node labels/taints to identify the specific mismatch. Only after confirming the pod has actually progressed past scheduling should OSI-style, traffic-focused troubleshooting be considered — applying it earlier would waste significant time investigating layers that were never relevant to a pure scheduling failure.

Core Syscall Knowledge
Kubernetessenior

Design a safe, staged process for migrating a stateless EKS workload's underlying node group from Intel to a different processor architecture, including how you'd verify success and how you'd roll back if needed.

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

First, confirm the workload is genuinely stateless (a hard prerequisite for a clean migration), and capture the existing node group’s full configuration — labels, taints, subnets, IAM node role, and ASG scaling parameters (min/max/desired). Create a new Launch Template version with the target architecture’s instance type, ensuring the “no instance profile” setting is correctly applied if creating the node group via CLI/eksctl (since node group creation auto-generates one). Create a brand-new node group from scratch using the captured subnet/role/scaling configuration and the new LT version, then apply the same labels and taints as the original node group so it’s an eligible scheduling target for the existing workloads. At this point both node groups coexist with no workload movement yet. To cut over: drain the old node group (evicting its pods) and cordon it (preventing future scheduling there) — the scheduler will then place the evicted pods onto the new, matching, still-schedulable node group, causing a brief (roughly 2–3 minute) downtime window while rescheduling completes. Verify success by confirming application health post-migration and cross-checking actual cost impact in Cost Explorer, filtered by the relevant instance IDs, over a 72-hour observation window. If a rollback is needed, reverse the sequence: drain and cordon the new node group, then uncordon the old node group, letting the scheduler move workloads back — accepting a similar downtime window for the rollback itself.

Core Syscall Knowledge
Kubernetessenior

Design a systematic diagnostic sequence for a pod stuck in Pending state in an EKS cluster where all standard component health checks (nodes, CNI, kube-proxy) report healthy.

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Start with kubectl describe pod and read the Events section carefully — this almost always directly names the specific scheduling constraint that’s failing, rather than requiring guesswork. Cross-reference with kubectl get nodes to check for cordoned (SchedulingDisabled) nodes and kubectl describe node to check for taints. Review the full pod/deployment spec for nodeSelector, nodeAffinity, podAffinity/podAntiAffinity, and tolerations — and critically, evaluate all of these together as a combined AND condition rather than checking each in isolation, since a single misaligned constraint can make an otherwise-correct configuration unsatisfiable. Check resource requests against actual available node capacity (kubectl top nodes) to rule out simple resource exhaustion. If the cluster recently had any node group, taint, or labeling changes, specifically investigate whether those changes were made after existing pods were already scheduled — a common, easily-overlooked timing-dependent root cause pattern, since ...IgnoredDuringExecution semantics mean already-running pods aren’t retroactively affected by such changes.

Core Syscall Knowledge
Kubernetessenior

Explain the full causal chain that turned an architectural memory-allocation assumption into a customer-facing checkout outage.

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

(See Section 3.11 in full.) In short: incorrect allocatable-memory assumption → co-located critical/non-critical workloads on one node group with no quota → uncapped BestEffort workload consumes memory → real usage exceeds true allocatable capacity → kubelet flips MemoryPressure: True → BestEffort pods evicted first, then Burstable pods (including checkout-gateway) when pressure persists → in parallel, individual containers get OOMKilled as a side effect of the same underlying shortfall → checkout-gateway destabilizes → latency/500s → client retry storm → amplified business impact.

Core Syscall Knowledge
Kubernetessenior

How do PriorityClass/preemption and QoS-based eviction interact — are they the same mechanism?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

No. PriorityClass (with preemption) operates at scheduling time, determining which pending pod can preempt a lower-priority pod to get placed on a node. QoS-based eviction operates at runtime, as the kubelet’s mechanism for protecting an already-running node under resource pressure. PriorityClass can influence eviction ordering within the same QoS tier, but it does not replace the QoS eviction hierarchy itself. Conflating these two is a common mistake.

Core Syscall Knowledge
Kubernetessenior

How would you decide which specific EC2 instances in a large fleet are good candidates for Savings Plan coverage versus Spot versus on-demand, as part of a comprehensive cost-optimization plan?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Categorize instances by workload characteristics and criticality rather than treating the fleet uniformly. Instances supporting stable, long-running, business-critical workloads with predictable utilization are strong Savings Plan candidates (locking in a discount against a spend commitment you’re confident you’ll actually use). Instances supporting stateless, fault-tolerant, or easily-restartable workloads (background workers, CI/CD agents, batch/ETL processing, non-critical microservices with adequate replica counts and fallback logic) are strong Spot candidates, since interruption risk is either irrelevant or well-mitigated by the workload’s own design. Instances that don’t clearly fit either category — highly variable/uncertain traffic patterns, workloads you don’t yet have enough historical data on, or resources currently mid-migration — should remain on-demand until you have enough operational confidence to reclassify them, since committing prematurely (via Savings Plan) or exposing an unproven workload to interruption risk (via Spot) both carry real downside. This categorization should be revisited periodically as workload behavior and business needs evolve, rather than treated as a one-time decision.

Core Syscall Knowledge
Kubernetessenior

How would you evaluate whether an RCA is "production grade," using the specific criteria discussed in this session, if you were reviewing a colleague's RCA before it goes to a client?

Tags: kubernetes, rcaReveal Answer →
ANSWER REFERENCE

Check systematically against each of the following: Does the summary give a complete picture in a few lines, understandable without deep technical knowledge? Is there a detailed, timestamped timeline showing exactly when key events occurred? Is the stated root cause a full causal chain, or does it collapse into a single symptom (a strong red flag, as illustrated by the “PDB caused deployment to fail” example)? Is every significant claim backed by attached evidence (screenshots, command output), or does the document rely on unsupported prose? Is impact quantified with actual numbers, or described only in vague terms? Does the document avoid hedging language (“may have,” “probably,” “it seems”) in favor of precise, factual statements? Is there an honest gap analysis explaining why the incident wasn’t caught earlier, rather than glossing over that question? And critically — are the action items specific and technically verifiable (naming an exact change to be made), or are they generic platitudes that don’t commit to anything concrete? An RCA failing on several of these dimensions — even if the underlying incident was actually resolved correctly — should be sent back for revision before being shared externally, since a weak RCA can undermine stakeholder confidence even when the technical response itself was sound.


Core Syscall Knowledge
Kubernetessenior

How would you prevent the specific class of incident demonstrated in this session (a taint added to nodes without corresponding tolerations being added to existing deployments) from recurring in a real production environment?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Establish a change-management practice where any node-group-level change that introduces or modifies taints is explicitly cross-checked against all deployments that might need to schedule onto affected nodes — ideally as an automated check (e.g., a CI/CD or admission-control step that validates a proposed taint change against currently-deployed workloads’ tolerations before it’s applied) rather than a purely manual review, since this exact class of issue is easy to miss precisely because it doesn’t manifest immediately (existing pods keep running fine) and only surfaces on the next fresh scheduling event. Additionally, maintaining clear documentation of the purpose of each node group’s taints (e.g., “this node group is Spot-only, tainted for batch workloads, requires this specific toleration”) makes it much easier for engineers making unrelated deployment changes to recognize when their workload needs a corresponding toleration update. Regular, proactive audits comparing node taints against deployment tolerations across the cluster (rather than waiting for an incident to reveal a mismatch) would catch this class of drift before it causes a production incident.


Core Syscall Knowledge
Kubernetessenior

What's the strategic value of running kube-hunter, kubescape, and kube-bench together, rather than choosing just one, and how would you prioritize adoption if resource/time constraints only allowed a phased rollout?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Each tool answers a genuinely different question: kube-hunter answers “if an attacker got into my cluster via a compromised pod, what could they actually do?” (an offensive/attacker-perspective simulation); kubescape answers “what specific misconfigurations exist across my deployed workloads, and how do I fix each one?” (a comprehensive, remediation-focused defensive audit); kube-bench answers “does my cluster meet a recognized, industry-standard security baseline?” (a compliance/audit-oriented checklist against the CIS benchmark). Together they cover offensive testing, comprehensive defensive remediation, and standardized compliance auditing — three complementary angles rather than redundant coverage. For a phased rollout under real constraints, prioritize kubescape first (as explicitly recommended in this session) given its breadth and directly actionable remediation guidance, since it provides the most immediate risk-reduction value per unit of adoption effort; add kube-bench next if compliance/audit requirements are a factor (since its output format maps directly onto formal audit documentation); and add kube-hunter last, once the more foundational misconfiguration and compliance gaps are already being addressed, since its attacker-simulation findings are most valuable once the “easy” defensive gaps have already been closed.


Core Syscall Knowledge
Kubernetessenior

Why can a CoreDNS-related outage be one of the hardest failure modes to diagnose from logs alone?

Tags: kubernetes, dnsReveal Answer →
ANSWER REFERENCE

Under CPU throttling or resource pressure, CoreDNS typically doesn’t crash or panic — it just becomes slower. This means logs can look entirely normal (queries received, forwarded, response codes returned) while resolution latency silently increases and manifests elsewhere as generic timeouts. Diagnosing this requires checking DNS latency, not just presence/absence of errors, and testing both external DNS reachability and internal service-to-service DNS resolution separately, since one working does not guarantee the other is healthy.

Core Syscall Knowledge
Kubernetessenior

You're in a P0. The checkout-api pod has been Pending for 8 hours. The business wants it fixed NOW, but the engineering lead says "we can't compromise our HA topology." How do you resolve the conflict?

Tags: kubernetes, schedulingReveal Answer →
ANSWER REFERENCE

Apply a two-phase fix. Phase 1 (immediate — 5 minutes): Change anti-affinity to preferred, add tolerations, remove conflicting nodeSelector. Pods come up immediately. CI/CD unblocked. Revenue impact stops. Phase 2 (next maintenance window — same day): Add a third schedulable node to the primary node group. Revert anti-affinity to required. Document the constraint: replicas ≤ schedulable nodes. This satisfies both: immediate stabilization AND full HA restoration within hours. The key principle: stabilize first, then restore the intended design.


Core Syscall Knowledge

Linux & Networking

30 cards
Linux & Networkingjunior

If a TCP handshake to port 22 succeeds via netcat, but ping to the same host fails completely, what does that tell you?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

It tells you the failure isn’t a full network-path outage — since a TCP connection to a specific port was able to complete, security groups, NACLs, and basic routing to that host are working. ping uses ICMP, a different protocol than TCP, and can be independently blocked or fail even while TCP connections on specific ports succeed. This is a useful diagnostic signal to narrow the investigation, not a contradiction to be resolved by dismissing one result.

Core Syscall Knowledge
Linux & Networkingjunior

List the steps of an SSH login at a high level.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

TCP 3-way handshake → SSH banner + cipher/MAC/key-exchange negotiation + host-key check → authentication (public key → OS Login → PAM → SSSD → cloud API) → optional reverse-DNS/GSSAPI side effects → PAM session → shell fork (parent + child sshd) → prompt.

Core Syscall Knowledge
Linux & Networkingjunior

Name five "common fix" checks for an SSH outage.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Restart sshd/sssd; reboot; check CPU/RAM/disk (free,top); check logs; verify ports/firewall (netstat, SG); check DNS/resolv.conf; review audit logs for changes.

Core Syscall Knowledge
Linux & Networkingjunior

SSH times out connecting to an EC2 instance. Ping also fails. But nc -zv <ip> 22 succeeds. What does this tell you?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

TCP handshake on port 22 works → security groups, NACLs, and routing are not blocking SSH. Ping failure is a separate issue — ICMP may be blocked by security group rules (common in AWS). The problem is likely higher in the stack: key mismatch, GSSAPI timeout, reverse DNS, PAM session limits, or ephemeral port exhaustion — not a network connectivity issue.

Core Syscall Knowledge
Linux & Networkingjunior

Walk through the OSI model layers from L1 to L7 in the context of debugging an SSH connection failure.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

L1 Physical: ping to check ICMP reachability and packet loss. L2 Data-Link: arp -n to check MAC address resolution. L3 Network: tracepath to find where packets stop. L4 Transport: nc -zv <ip> 22 to test TCP handshake. L5–6 Session/Presentation: ssh -vvv verbose log to watch every negotiation step. L7 Application: inspect sshd_config, PAM, /etc/profile.d/, sysctl (port range, conntrack).

Core Syscall Knowledge
Linux & Networkingjunior

What are two alternative ways to access an EC2 instance if SSH access is completely broken?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

The EC2 Serial Console provides direct, out-of-band access that doesn’t depend on network connectivity or SSH at all. AWS Systems Manager’s Automation feature can run a runbook to reset the instance’s console password, allowing login through the console UI even without working SSH keys. (A third option, AWS Systems Manager Session Manager, also provides SSH-independent access, provided the SSM agent is online and functioning.)

Core Syscall Knowledge
Linux & Networkingjunior

What is a bastion/jump server and why use one?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

A hardened entry host you SSH into first, then “jump” to private servers. It centralizes and controls ingress to machines that have no public access. (Here: bastion → prod in the same VPC.)

Core Syscall Knowledge
Linux & Networkingjunior

What is ARP and why does an arp -n check matter during SSH troubleshooting?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

ARP (Address Resolution Protocol) maps IP addresses to MAC addresses at Layer 2. Without a MAC address, the OS cannot build Ethernet frames to send to the target, even if the IP is correct. If arp -n returns no entry for the destination, it means Layer 2 neighbor discovery is failing — possibly a NIC issue, ARP cache problem, or the destination is not on the expected subnet.

Core Syscall Knowledge
Linux & Networkingjunior

What's the canonical incident-response sequence?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Isolate → Stabilize → Fix/Correct → Prevent.

Core Syscall Knowledge
Linux & Networkingjunior

What's the difference between an SSH connection that times out versus one that hangs after authentication succeeds?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

A timeout typically indicates the connection attempt never even reached the SSH daemon in a meaningful way — often pointing to network-path issues like firewall rules, NACLs, or security groups blocking the connection outright. A hang after successful authentication (as in this session’s scenario) means the network path and SSH’s own authentication sequence both worked correctly — the problem lies further downstream, typically in shell/session creation, PAM configuration, or reverse-DNS-related settings like UseDNS.

Core Syscall Knowledge
Linux & Networkingmid

A production incident shows a mix of failing and succeeding network-layer tests (e.g., ARP fails, but a TCP connection to a specific port succeeds). How would you characterize this kind of failure mode, and what should your next diagnostic steps be?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

This pattern is consistent with a partially-degraded kernel networking stack — one that retains enough functionality to establish a narrowly-scoped TCP connection but has broader dysfunction affecting general packet forwarding, ARP resolution, or ICMP handling. Rather than treating this as contradictory or inconclusive, the next step is to move past pure network-layer testing into protocol-specific diagnostics (like SSH verbose logging, if the affected service is SSH) to determine exactly where within that specific protocol’s sequence things are actually breaking, and separately investigate kernel-level configuration (connection-tracking tables, ephemeral port ranges, relevant sysctl parameters) that could explain a stack that’s “alive but degraded” rather than fully down.

Core Syscall Knowledge
Linux & Networkingmid

Four ways to access an EC2 instance when SSH is broken. List them in order of preference and explain the tradeoff.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

(1) SSM Session Manager — best; no network dependencies, audit-logged, IAM-controlled; requires SSM agent running. (2) EC2 Serial Console — console-level access; needs pre-set local password and must be enabled in account settings; doesn’t require network. (3) SSM Automation Runbook (AWSSupport-ResetAccess) — resets OS password; combine with serial console; slow but non-disruptive. (4) EBS detach/reattach — most powerful (can fix any OS-level config); requires stopping the instance; highest disruption.

Core Syscall Knowledge
Linux & Networkingmid

How can DNS cause intermittent SSH login lag?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

With UseDNS yes, sshd does a reverse (PTR) lookup of the client per login. If DNS is slow or flapping, every login waits on resolution, adding seconds — perceived as lag/timeout. Disabling UseDNS removes that dependency.

Core Syscall Knowledge
Linux & Networkingmid

SSH is hanging at login (after entering password/accepting key), but it eventually connects after 30 seconds. What are the likely causes?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

The classic causes for login lag (vs full timeout) are: (1) Reverse DNS lookup — UseDNS yes + slow PTR resolution; fix: UseDNS no. (2) GSSAPI/Kerberos timeout — SSH tries GSSAPI first, waits for KDC response, retries, then falls back to publickey; fix: GSSAPIAuthentication no. (3) SSSD/PAM slow external call — SSSD calling cloud identity API with high latency; check SSSD logs. (4) /etc/profile.d/ script with remote call. These are the same root causes as a full freeze, just below the timeout threshold.

Core Syscall Knowledge
Linux & Networkingmid

The affected users change every hour and the app dashboard is green. What does that tell you?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Intermittent + rotating membership implies a variable per-connection cost (latency/timeout crossing a threshold), not a static misconfig or a hard outage. Green app dashboards suggest the failure is in the login/control path (user health), not the service — so build/inspect latency and connection metrics, not just CPU/RAM.

Core Syscall Knowledge
Linux & Networkingmid

Walk through why a disciplined engineer would continue investigating after finding 100% packet loss on a ping test, rather than immediately concluding the network is down.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

A single failed test (even one as dramatic-looking as 100% packet loss) only tells you that specific protocol/test failed — it doesn’t tell you why, and it doesn’t rule out that other, more specific paths (like a TCP connection to one particular port) might still work. Continuing to gather evidence across multiple layers (ARP resolution, path tracing, then a direct TCP handshake test) builds a fuller picture that can either confirm or meaningfully contradict the initial signal. In this session’s case, continuing past the failed ping revealed a successful TCP handshake — evidence that materially changed the diagnosis away from “the network is fully down” toward a much more specific and different conclusion.

Core Syscall Knowledge
Linux & Networkingmid

What is the "green dashboard" problem?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Standard dashboards track system health (CPU/RAM/service-up), so ~70–80% of subtle outages still look green. You need user-centric SLIs — login latency, per-user error rate, connection success — to catch them.

Core Syscall Knowledge
Linux & Networkingmid

What is the UseDNS setting in sshd_config, and how could it cause an SSH session to hang specifically after authentication succeeds?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

When UseDNS is enabled, the SSH daemon performs a reverse DNS lookup on the connecting client’s IP address as part of completing the session — checking that the IP resolves back to a hostname, sometimes for logging or additional verification purposes. If DNS resolution is slow, degraded, or unavailable in that environment, this reverse lookup can hang or take a very long time, causing exactly the kind of “authentication succeeded, but the session never becomes usable” symptom observed in this session — even though the actual SSH authentication and key-exchange process completed without any errors.

Core Syscall Knowledge
Linux & Networkingmid

Why might MaxSessions and resource exhaustion be ruled out quickly here?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

MaxSessions was 999 (not a limiter), and free/top showed ≤30% usage with no zombies. A session ceiling would fail all new sessions past the cap, not a rotating subset; idle resources contradict a load-induced CPU/RAM stall.

Core Syscall Knowledge
Linux & Networkingmid

You run ssh -vvv and see "Authentication succeeded (publickey)" followed by "channel 0 opened, shell allocated" — and then the terminal freezes. What do you investigate?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

The freeze is happening in shell initialization, after SSH auth. Investigate: (1) /etc/profile.d/ scripts for any blocking operations. (2) PAM session setup — cat /etc/pam.d/sshd; SSSD or external auth making slow calls. (3) Ephemeral port range — cat /proc/sys/net/ipv4/ip_local_port_range; if only 1,000 ports, new child processes block waiting for a port. (4) UseDNS yes in sshd_config — reverse DNS adding latency. (5) Conntrack table full — conntrack -C vs nf_conntrack_max.

Core Syscall Knowledge
Linux & Networkingsenior

An incident involves a compound fault with 5 contributing factors. You fix one (UseDNS), verify SSH works, and close the incident. Three days later, the same symptom returns. What went wrong and how do you prevent it?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Fixing only one of five contributing factors resolved the dominant bottleneck temporarily — the others remained. Under slightly different load conditions (more concurrent SSH sessions, slightly slower DNS at that moment), the remaining factors became sufficient to reproduce the symptom. Prevention: complete the full RCA before closing the incident; fix all identified factors in the same maintenance window; test all fixes together. Post-incident: add monitoring for each identified factor (port range utilization, conntrack table usage, DNS PTR latency, SSSD backend health) so future degradation is caught before it causes a full outage.

Core Syscall Knowledge
Linux & Networkingsenior

Critique relying on "what changed?" as your first question.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

It’s usually right, but in no-change incidents it biases you toward “everything’s fine, stop looking,” and you ignore partial/intermittent failure. It can also blind you to provider-side changes (e.g., undisclosed LB change) or OS/hardware bugs. Pair it with blast-radius analysis and a protocol-level model.


Core Syscall Knowledge
Linux & Networkingsenior

Design a troubleshooting approach for an incident where SSH access to a critical production server is itself broken, preventing you from directly investigating the server's own configuration. What's your overall strategy?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

First, establish an alternative, out-of-band access path independent of the broken access method — check whether SSM Session Manager is available (fastest, least disruptive if the agent is online); if not, use the EC2 Serial Console for direct console access; if that’s insufficient for the needed changes, use a Systems Manager Automation runbook to reset console credentials; and as a last resort, detach the affected instance’s volume, attach it to a healthy instance to directly inspect/modify the filesystem, then reattach it. Once you have any form of access restored, apply the same structured, layer-by-layer diagnostic approach you would have used via SSH — checking DNS configuration, relevant kernel parameters (ephemeral port ranges, connection-tracking settings), the SSH daemon’s own configuration (particularly settings like UseDNS that specifically affect post-authentication behavior), and PAM/session-related configuration — since the underlying investigation methodology doesn’t change; only the access mechanism does. Document which access method worked and why, since a scenario where your primary access method is broken is itself worth capturing as an operational finding, separate from whatever root-caused the original SSH freeze.

Core Syscall Knowledge
Linux & Networkingsenior

Explain how GSSAPI/Kerberos can inject login latency, and a counter-argument.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

If GSSAPIAuthentication yes but the environment has no/broken Kerberos KDC, sshd attempts GSSAPI negotiation, waits for a response, re-attempts, then times out — per login. Counter-argument (raised in-session): GSSAPI/Kerberos/DNS are environment-global, so a purely global fault should hit everyone uniformly, not a rotating subset of one machine — implying the real trigger is the interaction of that global latency with per-connection timing/load thresholds. This tension was left unresolved in the session.

Core Syscall Knowledge
Linux & Networkingsenior

Explain the "networking stack alive for TCP but dead for ICMP/ARP" scenario. What causes it and what does it indicate?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

It indicates a partial degradation of the Linux kernel networking stack. The TCP/IP stack has different code paths for: (a) ICMP processing (handled at raw socket / kernel level) and (b) ARP (handled at the link layer, requires NIC driver). TCP (especially when an existing flow is established or the SYN/SYN-ACK succeeds) may work because the connection-tracking state machine has already set up the entry. ICMP and ARP, which are lower-level and require the full link layer to be functional, fail. This can be caused by: kernel memory pressure causing link-layer buffer exhaustion, NIC driver fault, conntrack table overflow, iptables rules specifically blocking ICMP while allowing established TCP, or corruption in the kernel’s networking data structures. In AWS, it often indicates the EC2 instance’s ENI or its underlying hypervisor networking is degraded.

Core Syscall Knowledge
Linux & Networkingsenior

How would you decide whether to apply a general troubleshooting framework like OSI versus a system-specific framework (e.g., a Kubernetes-specific troubleshooting model) to a given production incident?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

The deciding factor is which layer/system the incident actually appears to live in, based on initial symptoms. If the incident presents as fundamentally a Linux/system/networking-level problem — connectivity, authentication, kernel resource issues, as in this session’s scenario — the OSI framework’s bottom-up, layer-by-layer discipline is well-matched and efficient. If the incident instead presents primarily within a higher-level orchestration system (e.g., pods failing to schedule, a Kubernetes control-plane component behaving unexpectedly), applying pure OSI-layer network diagnostics first would be comparatively inefficient — you’d want to reach for a Kubernetes-specific troubleshooting framework instead, since it’s purpose-built to reason about that system’s specific failure modes (scheduling, control-plane health, etc.) more directly. The general principle: match the framework’s design assumptions to the system that’s actually misbehaving, rather than defaulting to one framework universally regardless of context.

Core Syscall Knowledge
Linux & Networkingsenior

How would you detect a single "naughty user" doing heavy transfer / port-forwarding via the bastion?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

It should appear in audit/access logs (auditd rules, SSH logs) and in per-connection metrics/tcpdump; if logs show nothing and the system seems to “change on its own,” suspect a non-user-driven cause (DNS/KDC/cache) instead.

Core Syscall Knowledge
Linux & Networkingsenior

This incident was deliberately engineered as a combination of multiple contributing factors (a narrow ephemeral port range, a UseDNS setting, and a partially degraded kernel networking stack) rather than a single root cause. What does this imply about how you should approach root-cause analysis and remediation for real production incidents?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

It implies that a root-cause analysis process should remain open to identifying and addressing multiple contributing factors rather than stopping as soon as a plausible cause is found — declaring victory after finding just one contributing issue (e.g., fixing the port range alone) risks leaving the underlying incident only partially resolved, since the other contributing factors (DNS/UseDNS behavior, kernel networking stack degradation) would remain unaddressed and could cause a recurrence or a related-but-distinct incident later. Practically, this means: continue the structured, layer-by-layer investigation even after finding one plausible explanation, explicitly ask whether the evidence gathered so far is fully explained by that one factor alone or whether some residual symptoms remain unexplained, and structure the resulting RCA and remediation plan to address every identified contributing factor, not just the first or most obvious one found.


Core Syscall Knowledge
Linux & Networkingsenior

Walk the layered (OSI-adapted) framework for a cloud VM and why data-link folds into physical.

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Classic OSI 1–7 → cloud-debuggable Physical (NIC drivers, hypervisor, CPU/RAM, ephemeral ports, FD limits, run-queue) · OS (sshd session/cipher, logs) · Network (IP/routing/TCP/UDP/ports) · Data (resolv.conf, timeouts, authorized_keys, PAM, SSSD cache, profiles) · Application, with Security cross-cutting all. Data-link (ARP/MAC/Ethernet) is abstracted by the cloud — you can’t touch frames — so it folds into Physical. You sweep layer by layer, enumerating every config, instead of guessing.

Core Syscall Knowledge
Linux & Networkingsenior

You're in a P0 incident. SSH to production is broken. SSM agent is offline. The instance has no serial console password set. The application is serving traffic via a different path (not SSH-dependent). What do you do?

Tags: linux, sshReveal Answer →
ANSWER REFERENCE

Since the application is still serving traffic, you have some breathing room. Options: (1) Use SSM Automation Runbook to reset the local OS password → then use serial console. (2) If the EBS volume can be detached safely (instance can be stopped), stop the instance, attach root volume to a rescue instance, mount it, fix /etc/ssh/sshd_config (UseDNS no, GSSAPIAuthentication no), resize port range in /etc/sysctl.conf, unmount, reattach to original, start → SSH works. (3) If stopping the instance is unacceptable: snapshot the root volume → create a new instance from that snapshot with the fixes applied → cut over DNS/load balancer to the new instance. In parallel: post-incident, mandate SSM agent installation and serial console password setup in your AMI baking process so you’re never locked out again.


Core Syscall Knowledge

Structured Debugging

26 cards
Structured Debuggingjunior

How would you determine whether a DNS resolution failure is caused by your local machine's resolver or by a broader network/DNS problem?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Run a DNS query using your system’s default (local) resolver configuration, and separately run the same query directly against a known public DNS resolver (like 8.8.8.8), bypassing your local resolver configuration entirely. If the local query fails or is slow but the direct query to the public resolver succeeds, the problem is isolated to your local resolver daemon (e.g., systemd-resolved) — restart it. If both fail, the problem is broader than your local machine.

Core Syscall Knowledge
Structured Debuggingjunior

Name the five categories that production outages typically fall into.

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: Capacity issues (CPU/RAM/disk/connection exhaustion), Configuration issues (misconfigured secrets/routing/IAM/drift), Dependency failures (upstream/downstream systems failing — DB, cache, DNS, third-party services), Deployment issues (bad rollouts, schema mismatches, incompatible versions), and Process failures (manual changes, untested changes, missing alerts).

Core Syscall Knowledge
Structured Debuggingjunior

Should you run multiple independent microservices inside a single Kubernetes pod?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: No. A pod should host one primary application because pods share a single lifecycle — they scale, get scheduled, and get replaced together. Running independent microservices together defeats the purpose of microservices architecture (independent scaling, independent deployment, independent failure isolation). Multiple containers in a pod are appropriate only for the sidecar pattern — containers that support the primary application (e.g., log shippers, metrics collectors, auth proxies), not independent business logic.

Core Syscall Knowledge
Structured Debuggingjunior

What does a high or rising number of established connections (as shown by ss -s) typically indicate?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

It’s a signal that connections are being opened faster than they’re being closed — often caused by a retry storm, where clients repeatedly retry failed requests (e.g., due to a slow or intermittently-failing dependency like DNS), each retry opening a new connection. Left unaddressed, this can exhaust available file descriptors or ports and take the system down entirely, even if the original triggering issue was relatively minor.

Core Syscall Knowledge
Structured Debuggingjunior

What is a "retry storm," and why can it be worse than an external attack?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A retry storm happens when a system’s own legitimate users or clients, encountering failures or timeouts, automatically or manually retry their requests — often many times, often simultaneously. This adds load on top of an already-degraded system, which can push it from a partial degradation into a full outage. It’s sometimes described as worse than an external DDoS attack because it’s driven by real, well-intentioned traffic that’s hard to simply block, and it can catch a team off guard because it looks like organic (if elevated) demand rather than an obvious attack.

Core Syscall Knowledge
Structured Debuggingjunior

What is the difference between a liveness probe and a readiness probe in Kubernetes?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: A liveness probe checks whether a container is alive/functioning correctly. If it fails, Kubernetes kills the container and restarts it. A readiness probe checks whether a container is ready to receive traffic. If it fails, Kubernetes removes the pod from the Service’s list of endpoints — the pod keeps running, but stops receiving traffic, and it is NOT restarted. The key distinction: liveness failure = restart; readiness failure = traffic removal without restart.

Core Syscall Knowledge
Structured Debuggingjunior

What's the difference between what ping and curl actually test, and why might one succeed while the other fails?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

ping tests basic network reachability using the ICMP protocol. curl tests application/service-level connectivity, typically over TCP (e.g., HTTP on port 80/443). Because these are different protocols, a firewall or routing rule can block one without affecting the other — for example, an iptables rule dropping TCP port 80 traffic would cause curl to fail while ping (ICMP) continues to succeed, which is a useful diagnostic signal pointing toward a port/protocol-specific block rather than a full network outage.

Core Syscall Knowledge
Structured Debuggingjunior

What's the difference between what ping, curl, and nc each actually test, and why would you use all three?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

ping tests basic ICMP-level reachability, curl tests full application-level HTTP/HTTPS connectivity, and nc (netcat) tests a raw TCP handshake to a specific host and port without any application-layer protocol involved. Using all three together lets you narrow down exactly which layer is failing: if ping works but nc fails, the problem is likely at the TCP/firewall/socket level; if ping and nc both work but curl fails, the problem is more likely at the application/HTTP layer.

Core Syscall Knowledge
Structured Debuggingjunior

Why is DNS often described as "the root of most production outages"?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Because DNS sits at the very front of nearly every network interaction — before an application can even attempt a connection, it typically needs to resolve a hostname to an IP address. This means DNS failures (whether from the DNS servers themselves, routing to reach them, or misconfiguration) can silently break connectivity for everything downstream, even when the actual destination service is perfectly healthy. This is why experienced engineers are trained to check DNS early when facing an ambiguous networking-flavored incident.

Core Syscall Knowledge
Structured Debuggingmid

A pod is showing as "Not Ready" but is not restarting. What's the most likely cause and how would you investigate?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: This points to a readiness probe failure, not a crash. Since the pod isn’t restarting, the liveness probe (if configured) is passing — the container process itself is alive. Investigation: check the readiness probe’s configured endpoint/command and see why it’s failing — common causes include the application still warming up (cache population, DB migration in progress), a dependency the readiness check calls being unavailable, or an incorrectly configured probe path/port/threshold. Check kubectl describe pod for probe failure events and kubectl logs for what the application itself reports about its readiness state.

Core Syscall Knowledge
Structured Debuggingmid

A production incident shows CPU, RAM, and disk all reporting as "healthy" in monitoring, yet a specific service is clearly struggling. What's a diagnostic angle that basic resource monitoring might miss?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Top-level system resource monitoring can miss per-process or per-cgroup constraints — a specific service could be CPU-throttled at the cgroup level even while overall system CPU usage looks normal, because cgroup limits control the CPU time actually granted to a process, not just overall utilization. This is a genuinely advanced but important distinction: “CPU usage looks fine” and “this process is getting the CPU time it needs” are not the same claim, and checking cgroup-level allocation (not just top-level top/htop output) can reveal a bottleneck that basic monitoring dashboards wouldn’t surface.

Core Syscall Knowledge
Structured Debuggingmid

A service status check that normally responds instantly is now taking 8 seconds to respond. What would you conclude, and what would you do next?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Based on the thresholds demonstrated in this session (under ~0.5s = healthy, ~1–3s = under pressure, ~5–10s+ or hanging = choking), an 8-second response time indicates the system/service is significantly choking — likely under CPU, I/O, or thread-pool pressure. The next step would be to reload the systemd daemon manager and/or restart the specific affected service, then re-time the same status check to confirm whether the intervention actually improved responsiveness, rather than assuming a restart fixed it without verifying.

Core Syscall Knowledge
Structured Debuggingmid

An organisation's production outage was traced to a legacy load balancer's DNS resolver going down. What category of outage is this, and what's the systemic fix (not just the immediate fix)?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: This is a Dependency Failure — the internal application and infrastructure were healthy; an external dependency (the DNS resolver used by the load balancer) failed. The immediate fix is restoring or bypassing the failed resolver. The systemic fix is configuring DNS failover — a secondary resolver that automatically takes over if the primary fails — so that a single external dependency (however reliable it seems) doesn’t become a single point of failure for the entire system.

Core Syscall Knowledge
Structured Debuggingmid

Describe a structured approach to debugging a production outage where logs and metrics show no obvious errors, but customers are reporting latency and intermittent errors.

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: Apply the four-pillar framework: (1) Establish system behaviour baseline — quantify what “normal” latency/error rate looks like versus current observed values. (2) Reconstruct the timeline — check the last 24–72 hours for deployments, infrastructure changes, patching, or configuration changes that correlate with the onset. (3) Establish blast radius — is this affecting one API or all APIs, one region or all regions, internal only or customer-facing? This rules in/out categories of cause (e.g., if it spans multiple cloud providers simultaneously, it’s not a single provider’s outage). (4) Trace upstream/downstream flow — map the full request path from client to backend and back, checking each hop (load balancer, gateway, DNS, application, cache, database) to localise exactly where the anomaly is introduced. Rather than guessing at specific components, this sequence converges on evidence-backed hypotheses.

Core Syscall Knowledge
Structured Debuggingmid

Explain the cascading failure pattern seen in the Slack outage, step by step.

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

An AWS Transit Gateway interconnecting Slack’s VPCs became saturated, which caused packet loss. That packet loss increased request latency and caused backend timeouts, which in turn blocked worker threads (a form of resource exhaustion). As users experienced failures, they retried their actions (re-uploading files, resending messages) — often repeatedly — which created a retry storm that piled additional load onto an already-struggling load balancer. This retry-driven overload compounded the original problem into a full, roughly hour-long service outage — illustrating how a single infrastructure component’s saturation can cascade into total unavailability through retry dynamics alone.

Core Syscall Knowledge
Structured Debuggingmid

In a team-based incident response scenario, how would you avoid the kind of coordination failure seen in this session (where one responder's unannounced fix invalidated another responder's ongoing diagnosis)?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Establish a clear communication discipline during any live incident: anyone who takes an action that changes system state (stopping a process, restarting a service, modifying a config) should announce it immediately in the shared incident channel, ideally before acting if time allows, and always immediately after if not. Maintaining a running incident timeline/log (even informally, in a shared chat) that captures who did what and when prevents exactly this kind of confusion, where one person’s fix silently changes the ground truth that everyone else is diagnosing against.

Core Syscall Knowledge
Structured Debuggingmid

Walk through a structured approach to diagnosing an ambiguous "intermittent connectivity issue" on a Linux server, from the outside in.

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Start outside the machine and work inward: first rule out cloud-infrastructure-level blocking (security groups, VPC/firewall rules), then check the host’s own firewall rules (iptables). Next, determine scope by testing multiple destinations — is only one target affected, or is everything external unreachable? Then check core system resources (CPU via top, memory via free, load average via uptime). Run the DNS local-vs-upstream isolation test. Check connection state (ss -s) for retry-storm signals. Check for kernel-level blocking (stuck/uninterruptible processes plus kernel logs). Finally, check the responsiveness of key system services with timed status checks, restarting/reloading as needed. Document every command and result along the way so you can form and test a specific hypothesis rather than guessing randomly.

Core Syscall Knowledge
Structured Debuggingmid

Walk through the OSI-layer approach to troubleshooting a suspected network issue.

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Start at the most fundamental layer and work upward, drawing a conclusion at each step before moving on: first confirm basic network reachability (can the host reach the outside world at all — using tools like ping, traceroute, ss), then check DNS resolution (is it working, and is it fast — using dig), then examine TCP/connection-level behavior (are connections establishing, what states are they in), and continue upward through higher layers as needed. This structured approach prevents “directionless debugging” — jumping between unrelated hypotheses — which wastes critical time during a live incident where every minute has real business cost.

Core Syscall Knowledge
Structured Debuggingsenior

A junior engineer on your team says a system issue "just fixed itself" during a live troubleshooting session, and they can no longer reproduce a bug you were actively diagnosing together. What questions would you ask before concluding the issue is actually resolved?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Before accepting “it fixed itself,” I’d ask: did anyone (on my team or with shared access to this system) take any action recently — restarting a service, killing a process, changing a configuration — that might explain this, even if they didn’t think it was relevant enough to mention? Is this a shared/multi-tenant environment where someone else’s unrelated action could have coincidentally resolved (or masked) the symptom? Systems don’t typically “just fix themselves” — an unexplained resolution is much more likely to indicate an uncoordinated human action (as happened in this session, where a teammate silently stopped the disruptive background scripts) or an unrelated external factor than a genuine self-resolution, and treating it as a mystery to be traced (not just a lucky break) is the more disciplined response — especially before declaring an incident closed.


Core Syscall Knowledge
Structured Debuggingsenior

Design a lightweight incident-response process for a mid-size engineering organisation that doesn't yet have a formal RCA/knowledge-base practice. What are the minimum viable components, based on the principles discussed in this session?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: Minimum viable components: (1) A shared, categorised location for RCAs (even a simple folder structure by domain — K8s, CI/CD, cloud provider, DB/caching, networking — is sufficient to start; sophistication can come later). (2) A lightweight RCA template mandated for every incident above a minimum severity threshold, covering: when reported, description, impact/blast radius, root cause, immediate fix, and prevention steps — this doesn’t need to be exhaustive, but it needs to be consistent so RCAs are comparable and searchable. (3) A standing baseline-observability practice — dashboards/alerts that define “normal” for key services, so that during an incident, responders can immediately answer the “then vs. now” question rather than debating what normal even looks like. (4) A lightweight structured-debugging checklist (even just the four pillars: system behaviour, timeline, blast radius, upstream/downstream flow) posted somewhere visible/accessible during incidents, to counter the natural tendency toward assumption-driven guessing under pressure. (5) A recurring (even monthly) practice of reviewing recent RCAs as a team, to build shared pattern-recognition and catch recurring root causes across seemingly unrelated incidents.


Core Syscall Knowledge
Structured Debuggingsenior

Explain why "assumption-driven" debugging is inefficient in production incidents, and what specifically makes "structured" debugging faster — not just theoretically, but in terms of what's actually different about the process.

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A: Assumption-driven debugging treats the investigation as an unordered search — each guess (“maybe it’s the load balancer,” “maybe it’s caching”) is tested somewhat independently, often without first gathering evidence that would rule entire categories in or out. This means: (a) guesses can be redundant or contradictory across team members, (b) there’s no accumulation of evidence — a wrong guess doesn’t necessarily narrow the search space for the next guess, and (c) it depends heavily on the guesser’s prior pattern-matching experience, which doesn’t generalise to novel failure modes.

Structured debugging (e.g., the four-pillar framework) is faster because each pillar produces evidence that mechanically eliminates or confirms broad categories of cause before any specific hypothesis is tested. For example, establishing “blast radius spans 2 cloud providers and 4 regions simultaneously” immediately eliminates any single-provider or single-region infrastructure cause — this is a category-level elimination achieved in one step, versus potentially dozens of individual component-level guesses. The real-world example cited (2.5 hours unstructured vs. 30 minutes structured, same incident) demonstrates this isn’t a marginal improvement — it’s roughly a 5x reduction in resolution time, driven by the fact that structured evidence-gathering eliminates entire hypothesis categories per step rather than testing one hypothesis at a time.

Core Syscall Knowledge
Structured Debuggingsenior

How would you design monitoring/alerting to catch a retry-storm pattern (like the one discussed in this session) before it causes a full outage, rather than discovering it only during manual ss -s inspection?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Rather than relying on manual, point-in-time inspection during an active incident, you’d want continuous monitoring of established-connection counts (and their rate of change) as a first-class metric, with alerting thresholds tuned to your system’s normal baseline — a sudden, sustained climb in established connections (rather than just a high absolute number, which might be normal for a busy system) is the more actionable signal. Pairing this with monitoring on the specific dependency most likely to trigger retries (in this session’s case, DNS resolution latency/failure rate) lets you catch the triggering condition (e.g., DNS starting to degrade) before it fully cascades into the consequence (a connection storm), giving responders a meaningfully earlier warning window than waiting for the full cascade to manifest as a general “system is slow” symptom.

Core Syscall Knowledge
Structured Debuggingsenior

How would you structure a live war-room troubleshooting session to be maximally useful for a cohort of already-experienced engineers, based on the feedback given in this session?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

Based on the direct feedback in this session, the most effective structure is: (1) don’t just review documentation/RCA links passively — walk through a real architecture diagram live, showing exactly where in the request/access path the failure occurred; (2) fully deep-dive one representative incident live, with actual terminal-based debugging shown step by step, rather than shallowly covering many incidents; (3) explicitly connect the specific commands/tools used at each diagnostic step back to the structured framework being taught (e.g., OSI layers), so participants can generalize the pattern, not just memorize the one specific fix; and (4) follow the live demo with a second, related-but-distinct problem statement for the group to solve independently, reinforcing the pattern through active practice rather than passive observation. This “watch one, do one” structure respects that experienced practitioners often already know individual commands/tools — what they need is the structured decision process for applying them under pressure.

Core Syscall Knowledge
Structured Debuggingsenior

In the unresolved bastion/SSH scenario, several plausible-sounding hypotheses were ruled out one by one (firewall rules, FD limit misconfiguration, max session caps, user permissions, DNS, multi-region routing, NAT gateway). What does this progressive elimination process illustrate about real incident response, and why might it be valuable that the session didn't resolve the incident?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

This illustrates that real incident response is fundamentally a process of narrowing a hypothesis space under uncertainty, not a lookup-table exercise — many of the ruled-out hypotheses were entirely reasonable given the symptoms and had to be actively tested/confirmed-absent, not just intuited. The value of leaving the scenario unresolved in this teaching context (rather than being handed a clean answer) is that it forces genuine diagnostic reasoning practice: readers/participants have to sit with real ambiguity, weigh which of the remaining open hypotheses (FD exhaustion, ndots misconfiguration, cgroup throttling, and undisclosed additional factors) are most consistent with the specific pattern of clues (intermittent, not user-specific, temporarily fixed by a restart, recurring after ~10-15 minutes) — which is a much closer simulation of an actual on-call incident than a scenario with an immediately revealed answer.


Core Syscall Knowledge
Structured Debuggingsenior

Why is it important to test DNS resolution against multiple targets/methods (local resolver vs. direct upstream query) rather than a single dig command, especially in a production incident?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

A single dig command using default local configuration conflates two very different possible fault domains: the local resolver daemon/configuration, and the broader DNS/network infrastructure your queries ultimately depend on. If you only run the default query and it fails, you don’t yet know whether to focus your remediation effort on your own machine (fast, low-risk, narrow blast radius) or escalate to a network/DNS-infrastructure investigation (potentially much broader impact, more stakeholders, more time). The two-query isolation technique (local resolver vs. direct upstream) is a small additional cost that dramatically narrows your remediation scope and prevents wasted effort or unnecessary escalation.

Core Syscall Knowledge
Structured Debuggingsenior

You're debugging an intermittent SSH access issue affecting a random subset of users (not tied to specific identities), where restarting the SSH daemon provides only temporary relief before the issue recurs. What does this pattern suggest about the nature of the underlying problem, and what would you check next?

Tags: debugging, sreReveal Answer →
ANSWER REFERENCE

The fact that a service restart provides only temporary relief strongly suggests the underlying cause is something that accumulates or degrades over time rather than a static, one-time misconfiguration — for example, a resource that gets consumed and not properly released (file descriptors, connection-tracking table entries, or similar), which the restart temporarily clears but which then re-accumulates. The randomness across users (rather than being tied to specific accounts) suggests the exhausted resource is likely shared/pooled rather than per-user — consistent with something like a systemwide file descriptor limit, a connection-tracking table, or a shared credential/session pool. Next steps: check file descriptor usage over time (not just at a single snapshot) via ulimit//proc-based inspection, examine whether SSH sessions are being properly closed/reaped or are lingering as zombies, and check DNS resolver configuration (specifically ndots) for anything that might be silently multiplying DNS lookups per connection attempt, since DNS lookups performed as part of SSH’s reverse-DNS or hostname-based authentication flow can itself be a slow, resource-consuming step under the right misconfiguration.

Core Syscall Knowledge

Career & Interview Strategy

21 cards
Career & Interview Strategyjunior

What core fundamentals should every DevOps engineer master first?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Linux and networking (the core), then Kubernetes, Docker, Terraform, and at least one cloud provider; Bash plus one programming language (Python/Go).

Core Syscall Knowledge
Career & Interview Strategyjunior

What is an ATS and why does it matter for your CV?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

An Applicant Tracking System is a bot that scores and filters CVs before a human reviews them, based on both keywords and template format. It matters because for high-volume postings it’s the first gate — fail it and no human sees your CV.

Core Syscall Knowledge
Career & Interview Strategyjunior

What's the difference between how reads and writes are handled in this system's multi-region design?

Tags: career, programReveal Answer →
ANSWER REFERENCE

Reads (like checking an account balance) can be served locally from a read replica in whichever region the user is closest to, prioritizing low latency. Writes (like withdrawing funds) must always be routed to that specific account’s designated “home” region — the single authoritative writer for that account — even if the user is physically located elsewhere, prioritizing correctness over latency for the write path specifically.

Core Syscall Knowledge
Career & Interview Strategyjunior

What's the recommended CV section order?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Header → Summary → Professional Experience → Technical Skills → Education & Certifications → Extracurricular (tech-community contribution).

Core Syscall Knowledge
Career & Interview Strategyjunior

Why does this system avoid synchronous cross-region database writes?

Tags: career, programReveal Answer →
ANSWER REFERENCE

Because of the latency cost (cross-continental replication can add 120-150ms or more), the risk of commits blocking or failing during a network partition between regions, and the risk of split-brain-style inconsistency. For a payments system with a strict P95 latency target, synchronous cross-region writes would be both too slow and too fragile.

Core Syscall Knowledge
Career & Interview Strategyjunior

Why might a large fintech system choose to decompose into 500 microservices rather than a smaller number of larger services?

Tags: career, programReveal Answer →
ANSWER REFERENCE

The decision is typically driven by organizational scale and independence requirements, not decomposition for its own sake — in this example, more than 150 independent business units each needed the ability to deploy, scale, and operate without depending on or blocking other teams, across multiple geographic regions with different compliance requirements. The microservice count emerged as a consequence of that organizational structure, added incrementally as new business domains were introduced, rather than being an upfront target.

Core Syscall Knowledge
Career & Interview Strategyjunior

Why use Gmail over Yahoo on a résumé?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Yahoo can fail to receive mail from Google/Microsoft Workspace senders, silently blocking recruiter contact.

Core Syscall Knowledge
Career & Interview Strategymid

Explain "open endpoint vs. closed endpoint" with examples.

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

An open endpoint invites a clarifying call; a closed endpoint lets a filter/recruiter eliminate you first. Closed examples: rigid role titles, a fixed location, stated current salary. Remove these to maximize callbacks.

Core Syscall Knowledge
Career & Interview Strategymid

Explain the "home-region ownership" pattern and how it prevents a double-withdrawal scenario in a multi-region banking system.

Tags: career, programReveal Answer →
ANSWER REFERENCE

Each account is permanently assigned to one specific region as its authoritative owner for write operations. If a user accesses their account from a different region, that region does not write directly to its own local database — instead, it forwards the write request (typically via internal RPC) to the account’s home region, which is the only place that ever actually processes writes for that account. Because there is only ever one authoritative writer for any given account, it’s structurally impossible for two regions to simultaneously process conflicting writes (like two withdrawals) against the same balance.

Core Syscall Knowledge
Career & Interview Strategymid

How does Naukri's matching differ from LinkedIn's, and how do you optimize each?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Naukri matches keywords recursively across all sections and rewards maximum information + trending keywords + frequent updates — so seed keywords into headline, skills, summary, projects. LinkedIn does not reward keyword-stuffing the headline; it wants a human, credibility-establishing summary plus a complete Featured section, custom banner, and recommendations.

Core Syscall Knowledge
Career & Interview Strategymid

How does the CAP theorem relate to the multi-region architecture decisions described in this session?

Tags: career, programReveal Answer →
ANSWER REFERENCE

CAP theorem states a distributed system can fully guarantee at most two of Consistency, Availability, and Partition tolerance simultaneously. Since partition tolerance is a non-negotiable reality in any real multi-region system (network partitions between regions will happen), the actual choice being made is between prioritizing consistency or availability during a partition. This system’s design — routing all writes to a single authoritative region rather than allowing any region to write independently — reflects a deliberate choice to prioritize consistency for the write path, accepting a potential availability/latency cost (a region being unable to reach the authoritative region during a partition) rather than risking inconsistent data.

Core Syscall Knowledge
Career & Interview Strategymid

Walk through a STAR-format RCA for a CoreDNS outage.

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

S — CoreDNS outage caused latency/intermittent failures across core microservices serving ~1M users. T — as DevOps lead, stabilize infra (cloud, observability, K8s, service mesh). A — structured debugging steps you executed. R — discovered/fixed cluster security issues, contributing to cost optimization and better team understanding.

Core Syscall Knowledge
Career & Interview Strategymid

What operational risk does over-decomposing an application into too many microservices introduce, according to the discussion in this session?

Tags: career, programReveal Answer →
ANSWER REFERENCE

Beyond the commonly-cited benefits of independent scaling, excessive decomposition for a system that doesn’t actually need it introduces real overhead: separate CI/CD pipelines and repos per service (more to maintain), increased inter-service network complexity and potential connectivity issues, and — critically — significantly harder observability and incident troubleshooting, since a single user action may now span many services that all need to be traced and correlated during an incident. If most services end up being scaled together anyway (because they’re tightly coupled to the same user actions), the independent-scaling benefit that justifies microservices in the first place isn’t actually being realized, while all the operational costs still apply.

Core Syscall Knowledge
Career & Interview Strategymid

Why do experienced engineers' CVs fail to stand out, and what's the fix?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Everyone uses the same AI tools, producing identical statistic-heavy bullets, so a 3-year and 15-year CV look the same. Fix (for 5+ yrs): write experience as production-outage RCAs in STAR format, putting statistics only in the Result, and back claims with public GitHub.

Core Syscall Knowledge
Career & Interview Strategysenior

A multi-region system's architecture team wants to justify why they've deliberately built in the assumption that any given region can fail at any time, rather than treating regional failure as a rare edge case. How would you frame this design philosophy to a skeptical stakeholder who sees it as over-engineering?

Tags: career, programReveal Answer →
ANSWER REFERENCE

Frame it around real, documented precedent rather than hypothetical risk — cite specific, real recurring incidents (such as repeated AWS us-east-1 outages) as evidence that regional failures are not theoretical tail risks but expected, periodic events for any system operating at sufficient scale and duration. Emphasize that the cost of designing for this assumption upfront (active-active regional architecture, health-based routing, async cross-region backup replication) is significantly lower than the cost of retrofitting resilience after a major outage has already caused real business and reputational damage — especially for a fintech system where downtime has direct, quantifiable financial consequences. Position the “assume failure” philosophy not as pessimism but as the same category of engineering discipline as designing for peak load rather than average load — you don’t wait for the failure to discover your system can’t handle it.

Core Syscall Knowledge
Career & Interview Strategysenior

Critique the advice to set salary fields to 0 and notice period to 30 days. What are the risks?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Upside: stays inside recruiter budget filters and preserves negotiation leverage. Risks: some portals/recruiters read “0/undisclosed” as evasive or auto-deprioritize it; understating a real 90-day notice can create trust problems if discovered; hedging may backfire with structured employers. It’s a tactic to test, not a universal rule.

Core Syscall Knowledge
Career & Interview Strategysenior

Design a strategy for a fintech platform that wants lower write latency for non-local users than the home-region ownership pattern provides, without sacrificing correctness.

Tags: career, programReveal Answer →
ANSWER REFERENCE

Two complementary approaches, as discussed in this session: first, implement “go-home routing” at the load-balancer/edge layer — proactively detecting a user’s home region (their account’s authoritative region) and routing their traffic there directly from the start, minimizing the internal RPC hop that would otherwise occur if they landed in a different region first. Second, consider adopting a globally-consistent distributed SQL database (like Google Spanner or CockroachDB) instead of the region-scoped SQL + RPC-forwarding pattern — these systems can provide strong consistency guarantees across regions natively, though it’s important to recognize they still incur a quorum-commit cost on the write path, meaning they reduce but do not eliminate the fundamental latency trade-off inherent in maintaining strong consistency across geographically distributed writers. The right choice depends on how much additional engineering complexity (adopting a new database technology) the organization is willing to take on versus how much latency improvement is actually needed.

Core Syscall Knowledge
Career & Interview Strategysenior

How portable is cloud expertise, and how do you demonstrate it?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Highly portable — providers expose similar primitives over different UIs (e.g., AWS ECS ↔ GCP Cloud Run), and strong Linux/networking fundamentals let you switch clouds in ~2–3 weeks. Demonstrate via mapped examples, IaC (Terraform) abstractions, and proof-of-work.

Core Syscall Knowledge
Career & Interview Strategysenior

How would you evaluate whether an organization considering a shift from fine-grained microservices to a coarser "service-based" architecture (as one participant described) is making the right call?

Tags: career, programReveal Answer →
ANSWER REFERENCE

Evaluate against the same criteria that justify microservices in the first place: does the organization have a genuinely large, diverse user base with services that have meaningfully independent scaling patterns and access requirements? If most of the organization’s services are small-scale, tightly coupled (most user actions touch multiple services regardless of how finely they’re split), and don’t have truly independent traffic/scaling profiles, then the operational overhead of fine-grained microservices (separate CI/CD, separate repos, increased network complexity, harder distributed tracing) likely outweighs the independent-scaling benefit that’s the primary justification for decomposition. Reference a recognized framework like the 12-factor app methodology to structure this evaluation rather than relying purely on intuition, and weigh the decision specifically against the organization’s actual current scale and team structure — not against what might theoretically be needed at some future, larger scale that hasn’t yet materialized.


Core Syscall Knowledge
Career & Interview Strategysenior

How would you present knowledge you have but never ran in production, without misrepresenting yourself?

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Build and publish labs/PoCs on public GitHub with links; on the CV describe the work credibly but be honest in the interview (“I have the knowledge; haven’t implemented it in an org yet”) and justify it conceptually. (The “frame it as org work” shortcut risks misrepresentation and is detectable.)

Core Syscall Knowledge
Career & Interview Strategysenior

Make the case against this workshop's keyword/volume-maximization approach.

Tags: career, interviewReveal Answer →
ANSWER REFERENCE

Stuffing every Naukri section to the word limit and gaming refresh cadence optimizes for reach, not fit, and can attract low-quality calls and look like manipulation to a careful recruiter; it also conflicts with LinkedIn’s anti-stuffing behavior. A targeted, evidence-backed profile may convert better even with fewer matches. (The workshop itself concedes results vary and ~4–5% of people see no benefit.)


Core Syscall Knowledge

Kubernetes Autoscaling

17 cards
Kubernetes Autoscalingjunior

How does Karpenter know which subnets and security groups to use when provisioning a new node?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Karpenter discovers them via tags. You must tag all subnets and the cluster security group with karpenter.sh/discovery=<cluster-name>. The EC2NodeClass manifest uses subnetSelectorTerms and securityGroupSelectorTerms to find resources with this tag at runtime.

Core Syscall Knowledge
Kubernetes Autoscalingjunior

What does it mean that Karpenter has a "consolidation delay" when scaling down?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Rather than immediately removing nodes the instant utilization drops, Karpenter waits a period (observed as roughly 5 minutes in this session’s demo) before deprovisioning underutilized nodes. This avoids “thrashing” — rapidly removing and re-adding capacity in response to brief, temporary dips in demand.

Core Syscall Knowledge
Kubernetes Autoscalingjunior

What is CastAI and how is it different from Karpenter?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

CastAI is a SaaS cost optimization platform for Kubernetes. It monitors your cluster and recommends workload right-sizing, Spot migration, and hibernation schedules. Karpenter is an autoscaler — it provisions and terminates nodes based on demand. CastAI is a recommendation and visibility tool — it tells you what to change but doesn’t itself provision nodes. They’re complementary: Karpenter handles scaling efficiently; CastAI identifies what still needs optimization.

Core Syscall Knowledge
Kubernetes Autoscalingjunior

What is the difference between Karpenter and the Kubernetes Cluster Autoscaler?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Cluster Autoscaler scales within predefined node groups (fixed instance types, manual min/max/desired config) and takes 3–5 minutes to provision. Karpenter directly provisions nodes by reading pod resource requests, selects the cheapest fitting instance type dynamically, and provisions in ~60 seconds. Karpenter also consolidates idle nodes automatically; Cluster Autoscaler requires manual scale-down configuration. Karpenter was developed by AWS, open-sourced, and now supports EKS, AKS, and GKE.

Core Syscall Knowledge
Kubernetes Autoscalingjunior

What's the core functional difference between Karpenter and CastAI?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Karpenter is a Kubernetes node autoscaler — it provisions and de-provisions EC2 nodes in real time based on pod scheduling demand. CastAI is a cost-observability and monitoring platform — it shows whether the resources actually being provisioned (often in response to tools like Karpenter) are being genuinely utilized, surfacing gaps between what’s requested and what’s actually used.

Core Syscall Knowledge
Kubernetes Autoscalingjunior

Why might Karpenter choose a Spot instance for one workload and an on-demand instance for another?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Karpenter makes instance-type and purchasing-option decisions based on the specific workload’s declared requirements and the NodePool/NodeClass configuration constraints it’s operating within — it isn’t defaulted to one purchasing model universally; it evaluates what best satisfies the specific pod’s request within the allowed configuration.

Core Syscall Knowledge
Kubernetes Autoscalingmid

A team says "Karpenter already optimizes our costs, so we don't need a separate cost-monitoring tool." How would you respond?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Karpenter optimizes provisioning against what’s declared — it satisfies the resource requests it’s given as efficiently as it can, but it has no visibility into whether those declared requests actually reflect real usage. A separate cost-observability tool (like CastAI) is needed to reveal that gap — e.g., a workload requesting far more CPU than it actually uses will be perfectly “satisfied” by Karpenter while still representing real, avoidable waste that only a utilization-monitoring tool would surface.

Core Syscall Knowledge
Kubernetes Autoscalingmid

How would you decide whether a given batch workload is a good candidate for Spot instances?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Assess interruption tolerance (can the job be safely paused/restarted without data loss or corruption?), and critically, confirm the actual acceptable delay/SLA with the business stakeholder who consumes the workload’s output — not just assume based on the job’s technical characteristics. As illustrated in this session, the same report might have a very relaxed SLA most of the time but become highly time-sensitive at specific calendar moments (e.g., fiscal year-end) — so the answer isn’t purely technical; it requires direct confirmation with the business.

Core Syscall Knowledge
Kubernetes Autoscalingmid

Walk through the 6 steps to install Karpenter on an EKS cluster.

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

(1) Install Karpenter controller via Helm (helm upgrade --install karpenter oci://public.ecr.aws/karpenter/karpenter ...). (2) Create an IAM role for the Karpenter controller with EC2 and IAM permissions; bind it to the Karpenter service account. (3) Tag all cluster subnets with karpenter.sh/discovery=<cluster-name>. (4) Tag the cluster security group with the same tag. (5) Create an EC2NodeClass manifest defining the AMI family, IAM instance profile, and subnet/SG selectors. (6) Create a NodePool manifest defining requirements (instance types, capacity type, architecture), resource limits, and disruption/consolidation policy. Apply the manifests — Karpenter is now active.

Core Syscall Knowledge
Kubernetes Autoscalingmid

What are the main risks or downsides of over-customizing Karpenter's NodePool configuration for every workload type upfront?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Over-customization substitutes your own upfront assumptions for Karpenter’s dynamic optimization — while this helps for well-understood, predictable workloads, it can reduce Karpenter’s ability to adapt efficiently to genuinely unexpected demand patterns, since you’ve constrained its decision space based on assumptions that may not hold under unusual conditions. The recommended approach is deliberate planning for known, predictable patterns (dedicated pools for known workload categories like batch/spot vs. on-demand/critical), while still leaving Karpenter room to handle genuinely unpredictable spikes as the “second line of defense.”

Core Syscall Knowledge
Kubernetes Autoscalingmid

What does Karpenter's consolidation feature do and why does it save cost?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

When load decreases (pods removed, workloads scaled down), Karpenter’s consolidation policy identifies underutilized nodes. It cordons and drains the node (evicting pods to other nodes), then terminates it. This bin-packs remaining workloads onto fewer, fully-utilized nodes. The result: you pay for fewer nodes during off-peak hours without manually adjusting min/max/desired configuration. Consolidation timescale is configurable (e.g., consolidateAfter: 30s).

Core Syscall Knowledge
Kubernetes Autoscalingmid

You're on-boarding Karpenter into a production EKS cluster that currently uses custom hardened AMIs and a blue-green patching strategy. How do you maintain this with Karpenter?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Use multiple NodePool resources, each referencing a different EC2NodeClass with a different AMI ID. Use node affinity or taints on deployments to target specific NodePools. When a new AMI is validated in lower environments: update the EC2NodeClass for one NodePool → Karpenter uses the new AMI for any new nodes in that pool → existing nodes continue with old AMI until consolidated. Gradually shift deployments to the new NodePool. This gives blue-green AMI management within Karpenter at the cost of some deployment configuration complexity.

Core Syscall Knowledge
Kubernetes Autoscalingsenior

A prospective client is based in the European Union and has strict data-residency requirements. You're evaluating CastAI (US-only SaaS) versus Karpenter (open-source, in-cluster) for their EKS autoscaling needs. Walk through your decision process.

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Apply the structured tool-selection framework: both tools can technically satisfy the functional requirement (autoscaling/cost visibility). On cost, Karpenter has no licensing cost while CastAI does. The decisive factor here is the non-functional (security/compliance) criterion: CastAI, as a SaaS platform with servers only in the US, would require the client’s cluster/workload data to leave the EU and be processed on US infrastructure — a likely disqualifying issue if the client’s data-residency requirements are strict (a common regulatory posture for EU organizations). Karpenter, being open-source and fully in-cluster, sends no data externally at all, avoiding this issue entirely. Depending on the client’s actual requirements, this could mean recommending Karpenter alone (accepting reduced cost-observability tooling) or seeking an alternative cost-observability tool that specifically offers EU-region data residency, rather than defaulting to CastAI simply because it was demonstrated in training.

Core Syscall Knowledge
Kubernetes Autoscalingsenior

Compare capacity planning approaches: traditional (static max) vs. Karpenter-managed. When is each appropriate?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Traditional static max: appropriate for predictable, stable workloads where the peak load pattern is well understood and cost of provisioning complexity is low. Advantages: simple, predictable cost. Disadvantages: 30% chronic overprovisioning, slow to respond to unexpected spikes. Karpenter-managed: appropriate for dynamic workloads with variable load patterns, microservices architectures, and ML/batch workloads with burst requirements. Advantages: right-sized provisioning, fast (~60s), automatic consolidation, lower off-peak cost. Disadvantages: requires IAM and networking setup, newer tooling, complex OS patching strategy. For most modern K8s deployments, Karpenter is superior. For legacy monoliths on dedicated nodes, static configuration may be simpler.


Core Syscall Knowledge
Kubernetes Autoscalingsenior

Design a node pool strategy for an EKS cluster that needs to support both a real-time customer-facing calculation service and a large nightly Spark analytics job, using the principles discussed in this session.

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Categorize the two workloads first: the real-time calculation service is a real-time, user-facing workload requiring low latency and minimal interruption tolerance — appropriate for an on-demand node pool, sized based on planned/predictable traffic patterns with Karpenter available as a second-line-of-defense autoscaler for genuine spikes. The nightly Spark analytics job is a large-scale, after-the-fact analytics workload, tolerant of interruption (a job segment can be resumed if a node is reclaimed) and not time-critical in the way real-time traffic is — appropriate for a dedicated Spot node pool, since the cost savings (avoiding a significant on-demand premium for a large, hours-long, high-volume job) meaningfully outweigh the interruption risk. Implement this via separate NodePool/NodeClass definitions (one constrained to on-demand, one allowing Spot), with node selectors/taints on each workload’s pod specs directing them to the correct pool — while still confirming actual SLA requirements for the analytics job’s output with its business consumer, since (as discussed in this session) that determines whether even more aggressive off-hours scheduling is appropriate.

Core Syscall Knowledge
Kubernetes Autoscalingsenior

How would you use the "functional vs. non-functional requirement" distinction to structure a broader infrastructure tool evaluation (not just autoscaling), and why does treating security/compliance as a distinct, dedicated evaluation category matter?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

Structure the evaluation as: first confirm the tool actually solves the stated technical/functional problem (a necessary but insufficient condition for adoption) — then separately and explicitly evaluate non-functional requirements (security, compliance, data residency, performance impact, operational readiness) as their own dedicated pass, rather than treating them as an afterthought once a tool has already been functionally validated. Treating security/compliance as a distinct category matters because these factors can be genuinely disqualifying regardless of how well a tool performs functionally — as this session’s EU-data-residency example shows, a tool can be a perfect functional fit and still be entirely inappropriate for a given client due to a compliance factor that has nothing to do with the tool’s technical capability. Evaluating functional fit and non-functional constraints as separate, sequential passes (rather than one blended judgment) reduces the risk of a compliance blind spot being overlooked simply because the tool “worked well” in a technical demo.


Core Syscall Knowledge
Kubernetes Autoscalingsenior

Karpenter provisioning is taking longer than expected during a traffic spike. What would you investigate?

Tags: kubernetes, autoscalingReveal Answer →
ANSWER REFERENCE

(1) Check IAM permissions on the Karpenter controller role — missing EC2:RunInstances or IAM:PassRole causes silent failures (NodeClaim created but node never spins up — exactly what happened in the session demo). (2) Check EC2 instance capacity availability in the configured AZ — Spot capacity may be exhausted; diversify instance types in NodePool. (3) Check subnet CIDR capacity — if the subnet has no available IP addresses, new instances can’t get IPs. (4) Check karpenter.sh/discovery tags on subnets and SGs — missing tags cause Karpenter to find no valid launch configuration. (5) Check Karpenter controller logs: kubectl logs -n kube-system -l app.kubernetes.io/name=karpenter.

Core Syscall Knowledge

AI Systems Design

16 cards
AI Systems Designjunior

What are the four core reasons naive AI agents fail in production?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

(1) The latency trap — sequential LLM/tool calls stacking up to 10-20+ seconds; (2) storing conversation/session state in local RAM, which breaks horizontal scaling; (3) tool cascading — sequential, dependent API calls that create unpredictable cost/latency/behavior; (4) an observability gap — no visibility into which layer (LLM, tool, cache) caused a failure.

Core Syscall Knowledge
AI Systems Designjunior

What is the general rule of thumb for how response latency affects user experience?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Under 100ms feels instant, under 1 second feels smooth, 2-3 seconds becomes noticeable, over 5 seconds causes frustration, and over 10 seconds causes users to abandon the product.

Core Syscall Knowledge
AI Systems Designjunior

Why is storing conversation history in a pod's local RAM a problem in a Kubernetes environment?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

If a load balancer routes a user’s next request to a different pod than the one that handled their first request, that new pod has no access to the RAM-stored history, silently losing context. It also means the system cannot safely autoscale or allow Kubernetes to restart pods without losing active sessions.

Core Syscall Knowledge
AI Systems Designmid

Describe the three-tier memory hierarchy used in a production agentic system and what belongs in each tier.

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Tier 1 is a cache (e.g., Redis) for anything needed in under ~1 second — current conversation state, immediate tool outputs. Tier 2 is a vector database for large, semantically-searchable content needing ~200ms-1s latency — embeddings, policy documents, conversation summaries. Tier 3 is a relational database/data warehouse for structured, durable metadata like request/session/conversation IDs, without strict sub-second requirements.

Core Syscall Knowledge
AI Systems Designmid

Explain the three-tier memory hierarchy for production AI agents.

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Redis (hot memory, < 10ms): stores current session state — last N conversation turns, tool outputs from this request. Vector DB (warm memory, 100–500ms): stores document embeddings and past conversation summaries — enables semantic search over large corpora. SQL/Data Warehouse (structured, 10–100ms): stores user metadata, order records, session IDs, audit logs. The key rule: anything accessed in the same request twice goes into Redis on first access. Anything requiring semantic search goes in the Vector DB. Anything with a known key/ID goes in SQL.

Core Syscall Knowledge
AI Systems Designmid

How does a DAG orchestrator solve the tool cascading problem?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

A DAG (Directed Acyclic Graph) pre-defines which tasks are independent and can run in parallel, and which depend on each other. The LLM no longer decides the order of tool calls — the code-defined graph does. Independent intents (e.g., fetch order status AND fetch refund policy) are executed concurrently with asyncio.gather(). Total latency becomes the latency of the slowest single task rather than the sum of all tasks. The “acyclic” property prevents the agent from looping — the graph has a defined end state.

Core Syscall Knowledge
AI Systems Designmid

How does converting a sequential agent workflow into a DAG (Directed Acyclic Graph) improve performance?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

In a DAG, independent tasks (nodes with no dependency relationship between them) can be identified and executed in parallel using asynchronous execution, rather than being forced through a single sequential chain. This directly addresses the tool-cascading latency problem by overlapping work that doesn’t need to happen in order.

Core Syscall Knowledge
AI Systems Designmid

What is speculative execution in the context of AI agents?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Starting data retrieval before the user has finished typing their query. A WebSocket streams the user’s live keystrokes to the SLM intent classifier. After the first few words, the classifier predicts the likely intent and begins fetching the relevant data (vector search, DB query) speculatively. By the time the user hits Enter, the data is already available. The LLM receives pre-assembled context and produces a response almost immediately. Works especially well when many users ask similar questions (speculative fetch hits the Redis cache).

Core Syscall Knowledge
AI Systems Designmid

What is "tool cascading" and why is it a problem?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Tool cascading is when an agent’s workflow requires calling one API, then based on that result calling a second API, then a third — each step sequentially dependent on the previous one’s output. Total latency becomes the sum of every step’s latency plus reasoning time in between, and any single failure in the chain can trigger retries that compound both latency and cost unpredictably.

Core Syscall Knowledge
AI Systems Designmid

What is TTFT and how do you optimise it?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

TTFT = Time To First Token — the delay between a user submitting a query and seeing the first word of the response. Three optimisations: (1) System prompt caching — pre-define system prompts for each intent+route combination; select the cached prompt in microseconds rather than constructing it dynamically. (2) KV caching — cache the key-value vectors computed during transformer attention for stable parts of the context (system prompts); reduces LLM compute on repeated calls. (3) Conversation summarisation — compress long conversation history into a summary; the LLM processes fewer tokens, reducing inference time and cost.


Core Syscall Knowledge
AI Systems Designmid

What is wrong with a naive LLM agent and why can't it be used in production?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Four failure modes: (1) Latency trap — sequential LLM→tool→LLM flow takes 10–20+ seconds; users abandon at >10 seconds. (2) State bottleneck — storing conversation history in application RAM breaks horizontal scaling; Kubernetes pod restarts lose all session state. (3) Tool cascading — each API call waits for the previous, creating exponential latency and unpredictable cost. (4) Observability gap — when the agent fails, you can’t tell whether the LLM hallucinated, the API failed, or the cache was stale.

Core Syscall Knowledge
AI Systems Designmid

Why use a small language model (SLM) for intent classification instead of the same large LLM used for reasoning?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Intent classification is a simple, bounded classification task (mapping a query to one of a predefined set of intents), which doesn’t require the reasoning capability of a large LLM. Using an SLM (or even a classical ML classifier) for this step reduces latency from multi-second LLM reasoning time down to milliseconds, and significantly reduces cost, since the large LLM is reserved only for the final synthesis step.

Core Syscall Knowledge
AI Systems Designsenior

Explain the difference between reducing TTFT via system-prompt caching versus KV caching.

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

System-prompt caching reduces the time to assemble and dispatch the final prompt to the LLM by pre-caching the predictable framing/instruction text associated with a given intent/route combination — it does not make the LLM’s own inference any faster. KV (Key-Value) caching, by contrast, targets the transformer/attention mechanism itself: by caching the Query/Key/Value vectors generated during attention computation, the model avoids recomputing them from scratch, which does directly speed up the actual inference process.

Core Syscall Knowledge
AI Systems Designsenior

In the layered security model described for agentic systems, why is separating the "prompt construction" layer from the "data access" layer an effective mitigation against prompt injection?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

If a single LLM layer both directly receives raw, unsanitized user input and has control over sensitive data/tool access, a malicious or malformed user input can potentially manipulate that layer into misusing its data access. By splitting this into two layers — one that only constructs/combines the prompt with a system prompt (and has no data-access privileges), and a second layer that performs the actual data access/reasoning (and is shielded from directly ingesting raw unsanitized user text) — the attack surface for prompt injection affecting privileged operations is reduced.


Core Syscall Knowledge
AI Systems Designsenior

Walk through the full optimized architecture for a multi-intent customer support query, from user input to final response.

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

(See Section 3.10 and diagram 5.5 in full.) In short: user query → SLM classifies it into parallel sub-intents → independent retrieval tasks (e.g., vector DB semantic search for policy, relational DB lookup for user data) execute concurrently via async/await → results are merged with a pre-cached, intent-specific system prompt → a single final LLM call performs reasoning/synthesis over the combined context → response returned to the user. Follow-up turns in the same conversation can be served from the cache tier instead of re-querying the database.

Core Syscall Knowledge
AI Systems Designsenior

What is speculative execution in the context of AI agents, and what latency does it actually reduce?

Tags: ai-agents, llmReveal Answer →
ANSWER REFERENCE

Speculative execution consumes a user’s live, partial input (e.g., via WebSockets) before they finish typing, using an SLM to predict intent early and begin retrieval (vector search/DB lookup) in the background while the user continues typing. It is important to note this does not speed up the final LLM reasoning/inference call itself — that step still takes roughly the same time. What it eliminates is the perceived wait, because retrieval work that would normally happen after submission has already completed by the time the user hits submit, overlapping it with typing time instead of adding it afterward.

Core Syscall Knowledge

CI/CD & Automation

14 cards
CI/CD & Automationjunior

What's the difference between in-place patching and immutable rotational patching?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

In-place patching modifies existing, live infrastructure directly — applying updates to a running server or node. This risks configuration drift and is difficult to debug if a step fails partway through. Immutable rotational patching instead builds entirely new, already-patched infrastructure alongside the old, validates that the new infrastructure is healthy, and only then retires the old infrastructure — the live resource itself is never directly mutated.

Core Syscall Knowledge
CI/CD & Automationjunior

Why might checking only that a pod's status is "Running" and passing its readiness probe be insufficient to confirm a service is actually healthy after a deployment?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

A pod can be technically running and passing basic health checks while the application itself is functionally broken in a way those checks don’t detect — for example, a payment service could report healthy pod status while actually failing to process real transactions correctly. This is why more thorough validation (like a synthetic test transaction, or checking real error rates and latency from observability data) is needed for business-critical services.

Core Syscall Knowledge
CI/CD & Automationjunior

Why should multi-region deployments or patching operations always be sequential rather than parallel?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Sequential rollout contains the blast radius of any bad change to a single region at a time — if something goes wrong, only one region is affected, and the rollout halts before any other region is touched. Parallel rollout means a single bad change is applied to every region simultaneously, risking a full, global outage from one mistake.

Core Syscall Knowledge
CI/CD & Automationmid

A self-service application allows developers to request cloud resource access, which is then approved by their manager and automatically provisioned. What are the key architectural components needed to build this safely?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

A front-end request interface capturing structured, complete request details (requester identity, business unit, specific resource and scope requested); an approval workflow that notifies the correct approver (typically derived from the requester’s business unit/team) and captures an explicit approve/reject decision; a secure execution layer (like a dedicated CI/CD tool such as Jenkins) that holds the actual privileged credentials separately from the user-facing request system, executing the actual cloud action only after approval; and critically, robust infrastructure state management (e.g., via Terraform/Terragrunt) so that resources created or modified through this platform remain consistent with infrastructure-as-code state, preventing drift between what the platform has provisioned and what’s actually tracked in code.

Core Syscall Knowledge
CI/CD & Automationmid

Explain the difference between in-place patching and immutable (rotational) patching. Which should you use and why?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

In-place patching runs updates directly on a running server (apt-get upgrade, yum update). Problems: if step N fails out of M steps, the node is in an unknown intermediate state; over time nodes drift from the base configuration; debugging a failed patch is hard because you don’t know the exact starting state. Immutable patching builds a new server image (AMI) with the patch applied, then replaces old nodes with new nodes running the new image, then deletes old nodes. Any failure means you still have the known-good old node and can simply rollback to it. Production Kubernetes environments should always use immutable patching.

Core Syscall Knowledge
CI/CD & Automationmid

Explain the expand-migrate-contract pattern for database schema changes, and why the order matters.

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

This pattern sequences schema evolution into three distinct steps to support zero-downtime deployment when two application versions may run simultaneously (as in a canary rollout). First, expand the schema by adding new columns/elements as their own release — old application code safely ignores columns it doesn’t know about. Second, migrate — deploy the new application version (which uses the new schema elements) progressively via canary rollout, while the old version continues running safely against the same expanded schema, ignoring the new elements. Third, contract — only after the new version has been fully rolled out and confirmed stable, remove the old, now-unused schema elements. The order matters because deploying code and schema changes together, or removing old schema elements too early, risks breaking whichever version is still running against the old assumptions.

Core Syscall Knowledge
CI/CD & Automationmid

How do you handle DB schema migrations during a canary deployment where two versions of the application run simultaneously?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Use the Expand → Migrate → Contract pattern. First, deploy a schema change separately (before the code change) that adds the new column as nullable — this is backward-compatible; v1 ignores it. Then deploy v2 (canary), which reads and writes both old and new columns. A backfill job populates the new column for existing rows. After 100% rollout and stability, deploy a cleanup that drops the old column. The key rules: schema changes always deploy separately from code changes; every schema change must be backward-compatible with the previous version.

Core Syscall Knowledge
CI/CD & Automationmid

The 3 phases of a production CI/CD pipeline — what are they and what does each gate check?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Phase 1 (CI/Code Integrity): runs on every PR — linting, unit tests, SAST (CodeQL), dependency scanning (Snyk). Gate: any failure blocks PR merge. Phase 2 (Artifact Hardening): builds the Docker image, tags with semantic version + git SHA, pushes to registry, runs Trivy container scan (CRITICAL/HIGH = fail), signs with Cosign. Gate: any CRITICAL/HIGH CVE blocks the release. Phase 3 (CD/Progressive Deployment): deploys sequentially AP → EU → US; after each region, validates Prometheus SLO (error rate, P95 latency) + synthetic transaction test. Gate: SLO failure = automatic rollback of that region + stop; next region never gets the broken version.

Core Syscall Knowledge
CI/CD & Automationmid

Why did this organization deliberately avoid including patching/security-hardening automation in the same self-service application used for routine access requests?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Based on real, repeated operational and audit issues observed across multiple organizations, combining security-sensitive automation (which carries significant blast radius if misused or misconfigured) with routine, high-volume, lower-risk self-service requests (like access grants) creates governance and audit complications. Keeping configuration/patching automation in its own separately-governed, manually-triggered pipeline preserves stricter control and auditability specifically where the risk is highest, without slowing down the much higher-volume, lower-risk routine requests handled by the general self-service platform.

Core Syscall Knowledge
CI/CD & Automationmid

Why is configuration automation kept separate from a self-service application?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Configuration automation (patching, OS hardening) touches running production infrastructure with the potential to take down an entire node or region if it goes wrong. The blast radius is too high for self-service execution. Additionally, security-related changes require a qualified engineer present during execution — not just at approval time. In regulated industries (fintech, healthcare), auditors expect documented human oversight of security configuration changes. SSA’s self-service model would make it harder to demonstrate this oversight.

Core Syscall Knowledge
CI/CD & Automationmid

Why is rollback done in parallel across all regions while forward deployment is sequential?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Forward deployment is sequential to limit blast radius: if a broken change reaches AP and fails, EU and US remain on the known-good version. Rollback is parallel because, by definition, you already know the change is bad and want to return all regions to the known-good state as quickly as possible. Speed is the primary objective during rollback; blast radius is no longer a concern because the damage is already known. The if: always() flag on the rollback matrix ensures all 3 regions roll back even if one fails.


Core Syscall Knowledge
CI/CD & Automationsenior

A participant in a training session directly tells the instructor that the material has stayed too high-level and hasn't explained the system-design reasoning behind key architectural choices. How should this kind of feedback be handled, and what does the instructor's actual response in this session illustrate about good practice?

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Direct, specific critical feedback — especially feedback naming exactly what’s missing (live demonstration, comparative reasoning against alternative approaches) rather than vague dissatisfaction — should be treated as valuable, actionable input rather than a challenge to be deflected or minimized. In this session, the instructor’s response modeled good practice: acknowledging the gap directly without defensiveness, explaining the practical constraint that motivated the original approach (fully reproducing a production environment live isn’t always feasible), and converting the feedback into a concrete, specific commitment (recording an actual live-environment demonstration video) rather than a vague promise to “do better.” This kind of responsive, non-defensive handling of direct feedback — especially feedback given in front of a group — is itself a transferable professional skill relevant well beyond a training context, applicable to how a technical lead or mentor should respond to critical feedback from their own team.


Core Syscall Knowledge
CI/CD & Automationsenior

A team wants to run a canary deployment where a new application version requires a database column that doesn't exist yet, and the old version must keep running correctly during the rollout. Walk through exactly how you'd sequence this change to avoid an outage.

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

First, deploy a schema-only change (the “expand” step) that adds the new column, as its own separate release — this is safe because the currently-running old application version simply ignores a column it doesn’t reference. Confirm this schema change is stable before proceeding. Second, begin the canary rollout of the new application version (the “migrate” step) — starting at a small traffic percentage (e.g., 10%), with the new version now writing to the new column while the remaining traffic continues to be served by the old version, which continues ignoring that column safely; if existing data needs to be backfilled into the new column for consistency, this can be done during this phase. Progress the canary through increasing traffic percentages (e.g., 25%, 50%, 100%), applying the same health-validation gates as any other canary rollout at each step. Only after the new version has been fully promoted to 100% of traffic and confirmed stable over an appropriate observation window should the old, now-unused schema elements actually be removed (the “contract” step) — at no point in this sequence does either running application version ever encounter a schema state it can’t handle safely.

Core Syscall Knowledge
CI/CD & Automationsenior

Design a patching automation system for a 3-region, 500-microservice Kubernetes-based infrastructure that minimizes the risk of a patching-induced production outage.

Tags: cicd, automationReveal Answer →
ANSWER REFERENCE

Structure the rollout as immutable and rotational — provision new, patched node groups alongside existing ones rather than patching in place, and never mutate live nodes directly. Sequence the rollout strictly by region (never in parallel), ordered by business priority, with a full multi-dimensional health validation gate between each region: infrastructure-level checks (API server health, absence of crash-loop errors, respecting PodDisruptionBudgets during node draining), application-level checks (synthetic transaction testing for business-critical services, not just probe status), and observability-level checks (P95 latency, error rate, SLO compliance, evaluated only after a brief stabilization window to avoid transient false positives). Any validation failure in any region must halt the entire rollout immediately — no promotion to subsequent regions should be permitted after a failure. Gate the pipeline’s execution behind a manual trigger requiring explicit change-ticket/CVE/reason metadata, since patching is a security-sensitive operation warranting human authorization even when execution itself is automated. Ensure rollback is fast and well-tested, since forward progress can reasonably be slow and careful, but recovery from a failed patch must be near-instant.

Core Syscall Knowledge

Systems Design & Architecture

5 cards
Systems Design & Architecturemid

How does Kong rate limiting work and how is it different per endpoint?

Tags: architecture, microservicesReveal Answer →
ANSWER REFERENCE

Each endpoint has its own KongPlugin Kubernetes resource defining its rate limit independently. Bulk operations (e.g., bulk price updates) are capped at 12 requests/minute per authenticated user — they’re expensive server-side. Standard operations get 200 requests/minute. The base catch-all rule gives 10 requests/second per IP. All per-user limits use limit_by: header, header_name: Authorization — counting per authenticated session, not per IP. For distributed Kong deployments (multiple Kong pods), policy: redis shares the rate limit counter via a Redis cluster, so a user can’t bypass limits by hitting a different Kong pod.

Core Syscall Knowledge
Systems Design & Architecturemid

How does rollback work, and why not kubectl rollout undo?

Tags: architecture, microservicesReveal Answer →
ANSWER REFERENCE

rollback.yml re-renders the target version’s Kubernetes manifests using envsubst with the old image tag, then applies them via kubectl apply — exactly the same pipeline as a forward deployment. It runs as a matrix across all 3 regions in parallel (if: always() so all regions roll back even if one fails). kubectl rollout undo can only roll back one revision, has no cross-region coordination, bypasses the manifest pipeline, produces no Slack notification with a reason, and creates no git tag. The re-render approach means every rollback is auditable, tagged as v{VERSION}-rollback, Slack-notified with an explicit Reason field.

Core Syscall Knowledge
Systems Design & Architecturemid

How does the access automation work for onboarding a new engineer?

Tags: architecture, microservicesReveal Answer →
ANSWER REFERENCE

An Ansible playbook is triggered with the target user_email and resource type. It authenticates using AWS STS temporary credentials (not permanent keys), checks whether the IAM user already exists (aws iam get-user), creates them if not, then attaches the pre-defined least-privilege policy for that resource. The same idempotent pattern covers EC2, EKS, RDS, S3, Lambda, ECS, SQS on AWS, and GKE, GCS, Cloud Run, Cloud SQL, Compute Engine, Pub/Sub, Cloud Functions on GCP. Running the playbook twice produces the same result as running it once — safe for retries.


Core Syscall Knowledge
Systems Design & Architecturemid

How does the canary deployment work and why is it done via Istio rather than a separate Deployment?

Tags: architecture, microservicesReveal Answer →
ANSWER REFERENCE

When a new image is deployed, istio/canary-10.yaml is applied — this is an Istio VirtualService that routes 10% of traffic to the new pod version and 90% to the old. After a 3-minute observation window and SLO validation, istio/canary-100.yaml shifts 100% to the new version. Using Istio means both versions share the same Kubernetes Deployment resource — the HPA continues to work normally, there are no extra Deployments to clean up, and traffic splitting is at L7 (application-layer) not L4. A separate canary Deployment would require duplicating pod specs, managing two HPAs, and explicitly cleaning up after promotion.

Core Syscall Knowledge
Systems Design & Architecturemid

Walk through how TitanGrid deploys a new version to production.

Tags: architecture, microservicesReveal Answer →
ANSWER REFERENCE

CI runs tests, lint, and CodeQL SAST. Build produces a Docker image, tags it with both the version and the git SHA, and runs Trivy for vulnerability scanning (exit-code 1 on CRITICAL/HIGH). Deploy is sequential: AP-South-1 first — kubectl set image, rollout status, SLO validation via Prometheus queries (error rate < 2%, P95 < 500ms), and a synthetic transaction test. If AP passes, EU deploys (same steps). EU passing unlocks US. If any SLO check fails, an automatic rollback is triggered for that region and the pipeline stops — EU and US are never touched. On full success, a git tag v{VERSION}-prod is created.

Core Syscall Knowledge

Linux & Scripting

2 cards
Linux & Scriptingjunior

What is the difference between #!/bin/bash and #!/bin/sh, and which should you use in production?

Tags: linux, shell-scriptingReveal Answer →
ANSWER REFERENCE

#!/bin/sh calls the default system shell (which is often dash on Debian/Ubuntu or bash in POSIX compatibility mode on older RedHat systems). It is designed to be POSIX-compliant, lightweight, and fast, but lacks modern shell features.

#!/bin/bash explicitly targets the Bourne Again Shell, providing advanced capabilities like arrays, custom regular expressions inside [[ ]] test operators, local scoping for functions, and robust string handling (e.g. parameter expansion).

Production Recommendation: Always use #!/bin/bash if your script uses any bash-specific features (“bashisms”). If portability is absolute and you only need POSIX compliance, use #!/bin/sh or /bin/sh, but ensure your script is strictly linted with a tool like ShellCheck to prevent syntax crashes on different host distributions.

Core Syscall Knowledge
Linux & Scriptingsenior

Why are set -e, set -u, and set -o pipefail critical in production Shell Scripts?

Tags: linux, shell-scriptingReveal Answer →
ANSWER REFERENCE

By default, Bash executes a script sequentially even if one of its middle commands fails. This silent failure can cascade, resulting in severe data loss or broken deployment states in production CI/CD pipelines.

  • set -e (Exit on error): Instructs the shell to terminate execution immediately if any command exits with a non-zero status code. This prevents downstream commands from executing on invalid assumptions.
  • set -u (Nounset): Treating unset variables as an error. If the script attempts to expand an unassigned variable, Bash will abort immediately rather than returning an empty string. This prevents devastating bugs like rm -rf $UNSET_VAR/* resolving to rm -rf /*.
  • set -o pipefail (Pipe exit code): By default, a pipeline (e.g. cmd1 | cmd2 | cmd3) only returns the exit code of the last command (cmd3). With pipefail active, the pipeline returns the exit code of the first command that failed, preventing errors hidden inside command pipelines from being swallowed.

In production engineering, using set -euo pipefail at the start of scripts ensures fail-fast execution, protecting filesystems, cluster configurations, and CI/CD runs.

Core Syscall Knowledge

Network Protocols

1 cards
Network Protocolsmid

What is the sequence of system calls executed when a Linux process establishes a TCP socket connection?

Tags: linux, syscallsReveal Answer →
ANSWER REFERENCE

When a Linux process connects to a remote port over TCP, it invokes the socket APIs via the glibc wrapper functions, triggering the following sequence of system calls:

  1. socket(domain, type, protocol): Allocates a new socket file descriptor. For TCP, this is typically socket(AF_INET, SOCK_STREAM, 0).
  2. connect(sockfd, addr, addrlen): Initiates the TCP 3-way handshake on the file descriptor.
    • SYN: The kernel sends a TCP SYN packet to the remote destination.
    • SYN-ACK: The remote host replies with SYN-ACK, moving the connection to SYN_RECV.
    • ACK: The local host replies with ACK. The connect system call blocks until the ACK is complete and the connection state moves to ESTABLISHED.
  3. write() or send(): Transmits payload data once the connection is established.
  4. close(): Initiates connection tear-down (FIN/ACK sequence).
Core Syscall Knowledge