HireHireInterview Quizzes › Systems / Infrastructure Engineer

Systems / Infrastructure Engineer Interview Questions

Think you're ready? These are the questions that actually decide Systems / Infrastructure Engineer interviews. Warm up on Easy — then face the Hard round, where 95% of candidates crumble. 80 questions across 3 levels, instant score, completely free.

80Questions
3Difficulty levels
95%Fail the hard round
FreeInstant score
Easy
Warm-up · 20 Qs
Medium
Practical · 30 Qs
Hard
Brutal · 30 Qs
⚡ Take the Systems / Infrastructure Engineer quiz — get your score →

The Systems / Infrastructure Engineer interview questions

Below are the real questions, grouped by difficulty. Expand any one to reveal the correct answer and why — or take the timed quiz for a score you can share. Can you clear the Hard round?

Easy round 20 questions

A Linux server shows 95% memory used but applications run fine. What is the most likely explanation?
  • A. The server is about to crash
  • B. Much of it is cache/buffers that free on demand ✓
  • C. A memory leak has already failed
  • D. Swap is disabled permanently
Correct answer: B. Linux uses free RAM for disk cache and buffers, which are reclaimed when applications need memory.
You run 'chmod 640' on a file. What access does the group get?
  • A. Read and write
  • B. Read only ✓
  • C. Execute only
  • D. No access
Correct answer: B. In 640, the group digit is 4, which grants read-only permission.
A user reports a website is unreachable, but 'ping' to its IP works. What does this suggest?
  • A. The disk is full
  • B. Network layer works; the issue is DNS or the web service ✓
  • C. The CPU is overloaded
  • D. The firewall blocks ICMP
Correct answer: B. A successful ping to the IP shows connectivity works, pointing to DNS resolution or the application layer as the fault.
A process is stuck and ignoring 'kill' (SIGTERM). What is the appropriate next step?
  • A. Reboot the whole server immediately
  • B. Send SIGKILL with 'kill -9' ✓
  • C. Delete the binary
  • D. Run it again with sudo
Correct answer: B. SIGKILL (kill -9) forcibly terminates a process that will not respond to the catchable SIGTERM.
A server has IP 192.168.1.10 with mask 255.255.255.0. Which host is on the same subnet?
  • A. 192.168.2.10
  • B. 10.0.1.10
  • C. 192.168.1.200 ✓
  • D. 172.16.1.10
Correct answer: C. With a /24 mask, hosts share the first three octets, so 192.168.1.200 is on the same subnet.
The root filesystem is 100% full and services are failing. Which action most directly helps first?
  • A. Add more RAM
  • B. Clear or rotate large log files under /var/log ✓
  • C. Restart networking
  • D. Increase CPU cores
Correct answer: B. Large or unrotated logs commonly fill a disk; clearing or rotating them frees space to restore service.
You want a service to start automatically on boot with systemd. Which command does this?
  • A. systemctl start service
  • B. systemctl enable service ✓
  • C. systemctl status service
  • D. systemctl reload service
Correct answer: B. 'systemctl enable' creates the boot-time symlink; 'start' only runs it in the current session.
An HTTP request returns status 502. What does this typically indicate?
  • A. The page was not found
  • B. The client is unauthorized
  • C. A gateway/proxy got a bad response from an upstream server ✓
  • D. The request was redirected
Correct answer: C. 502 Bad Gateway means a proxy or load balancer received an invalid response from the backend it forwarded to.
You need to see which process is listening on TCP port 8080. Which command helps?
  • A. ss -ltnp ✓
  • B. df -h
  • C. top -c
  • D. uptime
Correct answer: A. 'ss -ltnp' lists listening TCP sockets with the owning process and port.
A cron job set as '0 2 * * *' runs when?
  • A. Every 2 minutes
  • B. At 2:00 AM every day ✓
  • C. At 2:00 AM only on Sundays
  • D. Every 2 hours
Correct answer: B. The fields mean minute 0, hour 2, every day of month/month/weekday, i.e. 2:00 AM daily.
Load average on a 4-core server reads 8.0. What does this suggest?
  • A. The system is idle
  • B. The system is over-subscribed; tasks are waiting ✓
  • C. Exactly half capacity is used
  • D. Memory is exhausted
Correct answer: B. A load of 8 on 4 cores means roughly twice as many runnable tasks as cores, so processes queue and wait.
You SSH into a server and want the last 50 lines of a live log as it updates. Which command?
  • A. cat file.log
  • B. grep ERROR file.log
  • C. tail -n 50 -f file.log ✓
  • D. wc -l file.log
Correct answer: C. 'tail -n 50 -f' shows the last 50 lines and keeps streaming new entries as they are written.
A DNS 'A' record is used to map what?
  • A. A domain name to an IPv4 address ✓
  • B. A domain to a mail server
  • C. One domain name to another name
  • D. A domain to an IPv6 address
Correct answer: A. An A record resolves a hostname to an IPv4 address; AAAA is for IPv6 and CNAME aliases names.
You changed a config file but the service still uses old settings. What is usually needed?
  • A. Reinstall the OS
  • B. Reload or restart the service ✓
  • C. Change the file permissions
  • D. Reboot the router
Correct answer: B. Most services read config at startup, so a reload or restart is required to apply changes.
A RAID 1 array of two disks loses one disk. What happens to the data?
  • A. All data is lost
  • B. Data remains available from the mirror ✓
  • C. Only half the data survives
  • D. The array capacity doubles
Correct answer: B. RAID 1 mirrors data across disks, so a single disk failure still leaves a complete copy available.
A backup runs nightly but a restore has never been tested. What is the main risk?
  • A. Backups run too slowly
  • B. The backups may be unusable when actually needed ✓
  • C. Disk space is wasted
  • D. The backups encrypt automatically
Correct answer: B. An untested backup gives false confidence; only a verified restore proves the data is recoverable.
You get 'Permission denied (publickey)' when SSHing to a server. What is a likely cause?
  • A. The server disk is full
  • B. Your public key is not in the server's authorized_keys ✓
  • C. The DNS record expired
  • D. The CPU is busy
Correct answer: B. Key-based SSH fails with publickey errors when the matching public key is missing from authorized_keys.
In a load balancer setup, one of three backend servers is unhealthy. What should the load balancer do?
  • A. Send all traffic to it to recover it
  • B. Stop routing new requests to it until healthy ✓
  • C. Shut down the other two servers
  • D. Return 404 to all clients
Correct answer: B. Health checks let the load balancer remove the unhealthy node and route only to healthy backends.
A firewall rule allows inbound TCP 443 but blocks 80. What is the effect for a website?
  • A. Both HTTP and HTTPS work
  • B. Only HTTPS works; plain HTTP is blocked ✓
  • C. Only HTTP works
  • D. Nothing works
Correct answer: B. Port 443 serves HTTPS and port 80 serves HTTP, so blocking 80 leaves only encrypted HTTPS reachable.
You add a swap file to a low-RAM server. What is its primary purpose?
  • A. Speed up the CPU
  • B. Provide overflow space when RAM is exhausted ✓
  • C. Increase network bandwidth
  • D. Encrypt the disk
Correct answer: B. Swap gives the kernel disk-backed overflow so processes can continue when physical RAM is full, at a speed cost.

Medium round 30 questions

A Linux server is running low on disk space. You run `df -h` and see the root filesystem is 95% full, but `du -sh /*` only accounts for about half that usage. What is the most likely cause?
  • A. The `du` command is miscounting sparse files
  • B. A deleted file is still held open by a running process, keeping its space allocated ✓
  • C. The filesystem journal is corrupted
  • D. Disk quotas are misconfigured for the root user
Correct answer: B. When a process holds a deleted file open, the inode and its blocks remain allocated until the process closes it, so `df` counts the space but `du` cannot see the unlinked file.
You want a systemd service to automatically restart if it crashes, but not enter a restart loop if it fails repeatedly at startup. Which combination of directives best achieves this?
  • A. `Restart=always` with no other limits
  • B. `Restart=on-failure` with `StartLimitIntervalSec` and `StartLimitBurst` ✓
  • C. `Restart=no` with a cron job to check status
  • D. `RemainAfterExit=yes` with `Restart=always`
Correct answer: B. `Restart=on-failure` restarts only on abnormal exit, while `StartLimitIntervalSec`/`StartLimitBurst` cap restart attempts in a window to prevent rapid crash loops.
In a CIDR block `10.0.4.0/22`, how many usable host addresses are available (excluding network and broadcast)?
  • A. 510
  • B. 1022 ✓
  • C. 254
  • D. 2046
Correct answer: B. A /22 has 2^(32-22)=1024 addresses, and subtracting the network and broadcast addresses leaves 1022 usable hosts.
A web server behind an Nginx reverse proxy is logging the proxy's IP address instead of the real client IP in its access logs. What is the standard fix?
  • A. Disable keepalive connections on the proxy
  • B. Configure the backend to trust and read the `X-Forwarded-For` header set by the proxy ✓
  • C. Switch the proxy from HTTP/1.1 to HTTP/2
  • D. Enable gzip compression on the proxy
Correct answer: B. The reverse proxy forwards the client IP in the `X-Forwarded-For` header, and the backend must be configured to read that header (from trusted proxies) to log the real client.
You need to give a colleague read-only access to run `kubectl get pods` in one namespace only, with no access to other namespaces. Which Kubernetes RBAC objects should you use?
  • A. A ClusterRole bound with a ClusterRoleBinding
  • B. A Role in that namespace bound with a RoleBinding ✓
  • C. A PodSecurityPolicy applied to the namespace
  • D. A NetworkPolicy restricting the namespace
Correct answer: B. A Role is namespace-scoped and a RoleBinding grants it within a single namespace, correctly limiting the permissions to just that namespace.
Your Terraform apply fails midway, and now the real infrastructure doesn't match what Terraform thinks exists. A resource was created in the cloud but isn't tracked in state. What is the correct way to bring it under management without recreating it?
  • A. Delete the resource manually and re-run `terraform apply`
  • B. Run `terraform import` to associate the existing resource with the state ✓
  • C. Run `terraform refresh` to auto-detect all untracked resources
  • D. Manually edit the `.tfstate` JSON file to add the resource
Correct answer: B. `terraform import` maps an existing real-world resource into Terraform state so it can be managed without being destroyed and recreated.
A Docker container running a Java application keeps getting OOM-killed even though the host has plenty of free memory. The container was started with `--memory=512m`. What is the most likely issue?
  • A. Docker is ignoring the memory limit flag
  • B. The JVM heap is sized based on host memory, not the container's cgroup limit, so it exceeds 512m ✓
  • C. The host kernel does not support cgroups
  • D. The container image is corrupted
Correct answer: B. Older JVMs (or misconfigured ones) size the heap from total host memory rather than the container's cgroup limit, causing the process to exceed the container memory limit and get OOM-killed.
You SSH into a server but every command is extremely slow to start, though the network ping is fast. What should you check first?
  • A. Whether the CPU is overloaded
  • B. Reverse DNS resolution timing out (e.g., sshd `UseDNS` or a slow resolver) ✓
  • C. Whether the disk is failing
  • D. Whether the SSH key is too large
Correct answer: B. Slow SSH logins with fast network are commonly caused by reverse DNS lookups timing out, since sshd (and login) may block on resolving the client's hostname.
In a CI/CD pipeline, you want to ensure a deployment only proceeds to production after tests pass AND a human approves. Which pattern is most appropriate?
  • A. Run all stages in parallel to save time
  • B. Use a manual approval gate/stage after the automated test stage ✓
  • C. Disable tests in production to speed up deploys
  • D. Deploy to production first, then run tests as a rollback trigger
Correct answer: B. A manual approval gate placed after automated tests ensures both automated validation and human sign-off before a production deployment proceeds.
You're writing a bash script that processes files and want it to exit immediately if any command fails, treat unset variables as errors, and catch failures in pipelines. Which line should you add near the top?
  • A. `set -x`
  • B. `set -euo pipefail` ✓
  • C. `set +e`
  • D. `trap cleanup EXIT`
Correct answer: B. `set -euo pipefail` exits on error (`-e`), errors on unset variables (`-u`), and makes a pipeline fail if any component fails (`pipefail`).
A server shows a high load average but low CPU utilization. The most likely cause is:
  • A. The CPU is overheating
  • B. Processes are blocked waiting on I/O ✓
  • C. Insufficient swap space
  • D. Excessive DNS lookups
Correct answer: B. Load average counts runnable and uninterruptible (I/O-blocked) tasks, which raises load without CPU use.
Which command displays listening TCP/UDP sockets and their owning processes?
  • A. ifconfig
  • B. ss -tulnp ✓
  • C. route -n
  • D. arp -a
Correct answer: B. `ss -tulnp` lists TCP/UDP listening sockets with process information.
What permissions does `chmod 640 file` set?
  • A. owner rwx, group rw, others r
  • B. owner rw, group r, others none ✓
  • C. owner rw, group rw, others r
  • D. owner r, group w, others none
Correct answer: B. 6=rw for owner, 4=r for group, 0=no access for others.
What does a load balancer's health check accomplish?
  • A. Encrypts traffic to backends
  • B. Detects and removes unhealthy backends from the pool ✓
  • C. Caches static content
  • D. Compresses HTTP responses
Correct answer: B. Health checks probe backends and stop routing traffic to those that fail.
Which DNS record maps a hostname to an IPv4 address?
  • A. CNAME
  • B. A ✓
  • C. MX
  • D. TXT
Correct answer: B. An A record maps a name to an IPv4 address (AAAA is used for IPv6).
Which command identifies the process listening on port 8080?
  • A. ps aux | grep 8080
  • B. lsof -i :8080 ✓
  • C. netstat -r
  • D. top -p 8080
Correct answer: B. `lsof -i :8080` shows the process bound to that port.
What is the effect of `kill -9 <pid>`?
  • A. It gracefully asks the process to terminate
  • B. It sends SIGKILL, forcibly terminating the process immediately ✓
  • C. It pauses the process
  • D. It restarts the process
Correct answer: B. Signal 9 is SIGKILL, which the kernel enforces without allowing cleanup.
In configuration management, idempotency means that:
  • A. Each run executes faster than the last
  • B. Repeated runs converge to the same end state without extra side effects ✓
  • C. The playbook runs only once per host
  • D. Changes are automatically rolled back
Correct answer: B. Idempotent automation produces the same target state no matter how many times it runs.
Which RAID level uses striping with distributed parity and tolerates a single disk failure?
  • A. RAID 0
  • B. RAID 1
  • C. RAID 5 ✓
  • D. RAID 10
Correct answer: C. RAID 5 stripes data with distributed parity, surviving one drive loss.
`df -h` reports a filesystem at 100% but `du` shows far less used space. The likely cause is:
  • A. Failing disk hardware
  • B. A deleted file still held open by a running process ✓
  • C. Superblock corruption
  • D. Too many free inodes
Correct answer: B. A deleted-but-open file keeps consuming blocks until the holding process closes it, which `du` cannot see.
Compared with TCP, UDP:
  • A. Guarantees ordered, reliable delivery
  • B. Is connectionless and does not guarantee delivery ✓
  • C. Uses a three-way handshake
  • D. Has higher per-packet overhead
Correct answer: B. UDP is a lightweight, connectionless protocol with no delivery or ordering guarantees.
A /24 IPv4 subnet provides how many usable host addresses?
  • A. 256
  • B. 254 ✓
  • C. 255
  • D. 512
Correct answer: B. A /24 has 256 addresses minus the network and broadcast addresses, leaving 254 usable hosts.
A symbolic (soft) link differs from a hard link in that a symbolic link:
  • A. Shares the same inode as its target
  • B. Points to the target's pathname and can cross filesystems ✓
  • C. Cannot point to any file
  • D. Increases the target inode's link count
Correct answer: B. A symlink stores a path reference, so it can span filesystems and break if the target is removed.
To make a systemd service start automatically at boot, you run:
  • A. systemctl start <service>
  • B. systemctl enable <service> ✓
  • C. systemctl restart <service>
  • D. systemctl status <service>
Correct answer: B. enable creates the boot-time symlink; start only launches it in the current session.
A reverse proxy primarily:
  • A. Hides client identities from external servers
  • B. Forwards client requests to backend servers and returns their responses ✓
  • C. Assigns IP addresses to internal hosts
  • D. Caches DNS records for the LAN
Correct answer: B. A reverse proxy sits in front of backend servers, handling and distributing incoming client requests.
In Linux, swap space is used to:
  • A. Speed up the CPU cache
  • B. Provide overflow space on disk when physical RAM is full ✓
  • C. Store the kernel permanently
  • D. Cache DNS lookups
Correct answer: B. Swap holds pages evicted from RAM when memory pressure is high.
The cron entry `0 2 * * 0` runs a job:
  • A. Every day at 2 AM
  • B. At 2:00 AM every Sunday ✓
  • C. Every 2 hours on weekdays
  • D. At midnight on the 2nd of each month
Correct answer: B. The fields are minute 0, hour 2, any day-of-month, any month, day-of-week 0 (Sunday).
The file /etc/hosts is used to:
  • A. Configure upstream DNS servers
  • B. Provide static hostname-to-IP mappings resolved before DNS ✓
  • C. List permitted SSH hosts
  • D. Define firewall rules
Correct answer: B. /etc/hosts gives local static name resolution, typically consulted ahead of DNS.
Which tool would you use to capture and inspect raw network packets on an interface?
  • A. netstat
  • B. tcpdump ✓
  • C. traceroute
  • D. nslookup
Correct answer: B. tcpdump captures and decodes packets flowing through a network interface.
In nginx, `worker_processes auto;` typically sets the worker count to:
  • A. One regardless of hardware
  • B. The number of available CPU cores ✓
  • C. The number of configured server blocks
  • D. Twice the RAM in gigabytes
Correct answer: B. auto matches worker processes to the number of CPU cores for parallelism.

Hard round 30 questions

A production server reports `df -h` showing `/var` at 96% full, yet `du -sh /var` sums to only 40% of the partition. `du` was run as root. The app was recently restarted after a log-rotation script `truncate`d nothing but instead `rm`'d a 20GB active log file. What is the single most reliable command to confirm the root cause and reclaim the space without a reboot?
  • A. Run `sync && echo 3 > /proc/sys/vm/drop_caches` to flush the page cache holding the deleted file's dirty pages
  • B. Run `lsof +L1` (or `lsof | grep deleted`) to find the process holding the unlinked inode, then restart or signal that process to close the fd ✓
  • C. Run `fsck` on the `/var` filesystem to reclaim orphaned inodes left by the failed `rm`
  • D. Run `fstrim /var` to release blocks that the SSD firmware has not yet marked as free after the deletion
Correct answer: B. An unlinked file with an open file handle keeps its data blocks allocated until every fd is closed, so `lsof +L1` reveals the holding process and closing it (or the app was already restarted, releasing it) reclaims the space—no reboot or fsck needed.
A high-throughput reverse proxy under load starts refusing new outbound connections to a backend with `EADDRNOTAVAIL`, while `ss -s` shows tens of thousands of sockets in TIME_WAIT toward that single backend IP:port. Which change most directly addresses the exhaustion without risking data corruption from delayed duplicate segments?
  • A. Set `net.ipv4.tcp_tw_recycle=1` to aggressively recycle TIME_WAIT sockets globally
  • B. Lower `net.ipv4.tcp_fin_timeout` to 5 seconds so sockets leave TIME_WAIT much faster
  • C. Enable `net.ipv4.tcp_tw_reuse=1` and widen `net.ipv4.ip_local_port_range` so the client can safely reuse TIME_WAIT sockets for new outbound connections ✓
  • D. Increase `net.core.somaxconn` and the backend's listen backlog to accept the pending connections
Correct answer: C. `tcp_tw_reuse` safely reuses TIME_WAIT sockets for new outbound connections using timestamps (unlike the removed/unsafe `tcp_tw_recycle`), and widening the ephemeral port range increases the 4-tuple space, directly relieving source-port exhaustion.
A Kubernetes Service has the correct label selector but `kubectl get endpoints my-svc` returns no addresses, even though three Pods with matching labels are `Running`. The Pods' `readinessProbe` is an HTTP GET on `/healthz` port 8080. Which is the most likely cause of the empty endpoint list?
  • A. The Pods are Running but not Ready because the readiness probe is failing, so the endpoints controller excludes them ✓
  • B. The Service `targetPort` does not match `containerPort`, which prevents the endpoints controller from populating addresses
  • C. kube-proxy has not yet programmed iptables rules, so the endpoints object stays empty until it syncs
  • D. The Pods lack a `podIP` because the CNI plugin has not assigned addresses to Running Pods
Correct answer: A. The EndpointSlice/endpoints controller only includes Pod IPs once the Pod passes its readiness probe; a failing `/healthz` keeps Pods Running-but-not-Ready and thus absent from endpoints, while targetPort mismatch or kube-proxy syncing would not empty the endpoints list.
You must import an existing resource into Terraform state, but two engineers ran `terraform apply` simultaneously against an S3 backend and the DynamoDB lock table now shows a stale lock from a crashed run. What is the correct and safest recovery?
  • A. Delete the `.terraform/terraform.tfstate` local cache and re-run apply so Terraform re-acquires a fresh lock
  • B. Run `terraform force-unlock <LOCK_ID>` using the ID reported in the error after confirming no apply is actually running ✓
  • C. Manually delete the lock item from the DynamoDB table and immediately run `terraform apply`
  • D. Set `-lock=false` on the next apply to bypass the stale lock and let Terraform overwrite it
Correct answer: B. `terraform force-unlock` with the reported LOCK_ID is the supported, auditable way to clear a confirmed-stale lock, whereas `-lock=false` or hand-deleting the DynamoDB item risks two concurrent writers corrupting state.
An application intermittently sees ~5 second stalls on outbound requests to an internal API. `dig api.internal` is fast, but tcpdump shows the app sending two simultaneous A and AAAA queries and one response is consistently lost, after which the resolver waits before retrying. On a musl/Alpine-based container, which mechanism best explains and fixes this?
  • A. CoreDNS negative caching is returning NXDOMAIN for AAAA, so raising the negative TTL fixes the stall
  • B. The 5s stall is the glibc/musl resolver retransmit timeout triggered by a dropped parallel A/AAAA UDP reply (a conntrack race); set `single-request-reopen` / use `use-vc` or disable parallel lookups ✓
  • C. The MSS is too large for the DNS UDP packet, causing fragmentation drops; lowering MTU to 1400 resolves it
  • D. CoreDNS is rate-limiting the pod, and increasing its cache size eliminates the retries
Correct answer: B. Parallel A/AAAA queries sharing a socket can hit a conntrack insert race that drops one reply, and the resolver's ~5s retransmit timeout produces the stall—mitigated by serializing queries (single-request/single-request-reopen) or forcing TCP, not by TTL or MTU changes.
Consider this systemd unit fragment for a service that must start only after the network is truly up and its data mount is available: ``` [Unit] Wants=network-online.target After=network.target RequiresMountsFor=/data ``` The service still occasionally starts before connectivity exists. What is the precise fix?
  • A. Change `Wants=network-online.target` to `Requires=network.target` so the dependency becomes mandatory
  • B. Add `After=network-online.target` because `Wants` only pulls the target in but does not order the service after it ✓
  • C. Replace `RequiresMountsFor=/data` with `After=data.mount` since RequiresMountsFor does not enforce ordering
  • D. Add `Before=network.target` so the service is sequenced relative to the network stack
Correct answer: B. `Wants=` establishes a dependency (pulls the target in) but not ordering; you must also add `After=network-online.target` so the service is actually sequenced after connectivity is established.
A memory-sensitive service on a node with 32GB RAM and no swap is being OOM-killed while `free -m` shows ~8GB in `buff/cache`. The container has a cgroup v2 `memory.max` of 4GB. `memory.current` sits near 4GB and `memory.stat` shows large `active_file`/`inactive_file`. What is happening?
  • A. Page cache counts against the cgroup's `memory.max`; under pressure the kernel reclaims reclaimable file pages first, but the workload's anonymous memory exceeds what's left, triggering the cgroup OOM killer ✓
  • B. The node has 8GB of unreclaimable cache, so the global OOM killer fires despite the cgroup limit being irrelevant
  • C. cgroup v2 does not account page cache, so the OOM must be caused by a kernel memory leak in slab
  • D. Because there is no swap, `memory.max` is ignored and the process is killed by the node-level OOM killer at 32GB
Correct answer: A. In cgroup v2, page cache is charged to the cgroup and counts toward `memory.max`; the kernel reclaims clean/reclaimable file pages under pressure, but if anonymous (unreclaimable, unswappable) memory still exceeds the limit, the cgroup-level OOM killer fires.
You are designing delivery guarantees for a payment event consumer reading from a partitioned log (e.g., Kafka). The business requires that a duplicate delivery never double-charges. Which design is both correct and the least brittle at scale?
  • A. Use exactly-once by committing the consumer offset before processing so a message is never reprocessed
  • B. Rely on at-least-once delivery plus an idempotent handler keyed by a stable business idempotency key persisted transactionally with the side effect ✓
  • C. Enable at-most-once delivery so duplicates are impossible, accepting occasional lost charges
  • D. Deduplicate using an in-memory LRU set of recently seen message IDs on each consumer instance
Correct answer: B. True end-to-end exactly-once across external side effects is generally unachievable, so the robust pattern is at-least-once delivery with an idempotent handler that records a durable idempotency key in the same transaction as the effect; committing offsets first causes lost messages and an in-memory set fails across restarts and rebalances.
A read-heavy service fronts a database with a cache. When a hot key's TTL expires, thousands of concurrent requests all miss and stampede the database, briefly saturating it. Which mitigation most directly prevents the recomputation storm while keeping data reasonably fresh?
  • A. Set the hot key's TTL to a much larger value so it expires far less often
  • B. Add jitter to all TTLs so keys do not expire at the same wall-clock moment
  • C. Use a per-key mutex/single-flight so only one request recomputes and repopulates while others wait or serve stale ✓
  • D. Switch the cache eviction policy from LRU to LFU so hot keys are never evicted
Correct answer: C. A single-flight lock (or request coalescing) ensures exactly one caller recomputes the expired hot key while the rest wait or serve stale, directly stopping the thundering herd; TTL jitter helps correlated expiry across many keys but not a single hot key stampede.
During an incident, p50 latency is normal but p99 spiked 20x. CPU utilization averages 55%, and the service uses a fixed thread pool of 50 with a synchronous downstream call. A downstream dependency's p99 rose from 20ms to 800ms. Which explanation best accounts for the tail blowup despite modest average CPU?
  • A. Average 55% CPU proves headroom exists, so the tail must be caused by GC pauses unrelated to the downstream
  • B. Slow downstream calls occupy pool threads longer, so under bursty arrivals the queue builds and requests wait behind blocked threads—Little's Law/queueing means utilization of the pool, not CPU, is saturated at the tail ✓
  • C. The load balancer is using round-robin instead of least-connections, which only affects p50
  • D. The p99 spike is a measurement artifact of averaging CPU across cores and disappears with per-core metrics
Correct answer: B. With a bounded thread pool and synchronous blocking calls, slow downstream responses hold threads longer, so effective concurrency capacity (not CPU) saturates and queueing delay explodes the tail—classic Little's Law behavior where average CPU can look modest while the pool is the bottleneck.
What is the correct order of the TCP three-way handshake?
  • A. SYN, ACK, SYN-ACK
  • B. SYN, SYN-ACK, ACK ✓
  • C. ACK, SYN, SYN-ACK
  • D. SYN-ACK, SYN, ACK
Correct answer: B. The client sends SYN, the server replies SYN-ACK, and the client completes with ACK.
On a busy server, which side of a TCP connection accumulates sockets in the TIME_WAIT state?
  • A. The side that passively closes the connection
  • B. The side that actively closes, holding sockets for about 2×MSL ✓
  • C. Any side experiencing SYN retransmissions
  • D. The side receiving a SYN flood
Correct answer: B. The active closer enters TIME_WAIT for roughly twice the maximum segment lifetime to absorb stray packets.
The Linux OOM killer is invoked when:
  • A. A process exceeds its file-descriptor limit
  • B. The system is critically low on memory and must reclaim RAM ✓
  • C. Swap is disabled at boot
  • D. A process forks too many children
Correct answer: B. Under severe memory pressure the kernel kills a process (by oom_score) to free RAM.
Compared with a write-back cache, a write-through cache mainly provides:
  • A. Higher write throughput
  • B. Stronger consistency because cache and backing store are updated together, reducing data-loss risk ✓
  • C. Lower read latency
  • D. Reduced memory usage
Correct answer: B. Write-through writes to cache and storage simultaneously, so a cache failure does not lose committed data.
In Kubernetes, what does a pod's readiness probe control?
  • A. Whether the container is restarted
  • B. Whether the pod is added to Service endpoints and receives traffic ✓
  • C. Whether the node is schedulable
  • D. Whether the container image is pulled
Correct answer: B. A failing readiness probe removes the pod from Service endpoints so it stops receiving traffic.
How do SIGTERM and SIGKILL differ?
  • A. Both can be caught by the process
  • B. SIGTERM can be caught or handled for graceful shutdown; SIGKILL cannot be caught or ignored ✓
  • C. SIGKILL allows cleanup while SIGTERM does not
  • D. SIGTERM kills instantly while SIGKILL asks politely
Correct answer: B. SIGTERM is catchable for graceful exit, whereas SIGKILL is enforced by the kernel and uncatchable.
Setting `vm.swappiness` to 0 causes the kernel to:
  • A. Disable virtual memory entirely
  • B. Avoid swapping process pages out until it is nearly unavoidable ✓
  • C. Force all memory into swap
  • D. Enlarge the swap partition
Correct answer: B. A swappiness of 0 makes the kernel strongly prefer reclaiming page cache over swapping application memory.
During a TLS handshake, the server's certificate primarily lets the client:
  • A. Encrypt the whole session using the certificate directly
  • B. Verify the server's identity and obtain its public key ✓
  • C. Generate the symmetric session key by itself
  • D. Compress the handshake messages
Correct answer: B. The certificate authenticates the server and carries the public key used to establish the session key.
What is 'split-brain' in a high-availability cluster?
  • A. A single node handling all traffic
  • B. A network partition causing multiple nodes to each act as primary, risking data divergence ✓
  • C. A CPU cache-coherency failure
  • D. Memory being divided between two processes
Correct answer: B. When nodes lose communication, more than one may assume the primary role, corrupting shared state.
When multiple routes match a destination IP, the router selects the:
  • A. Route with the lowest metric regardless of prefix
  • B. Most specific route, i.e. the longest prefix match ✓
  • C. First route in the table
  • D. Route with the highest metric
Correct answer: B. IP forwarding uses longest-prefix match, choosing the most specific matching route.
The Linux OOM killer selects a process to terminate primarily based on:
  • A. The lowest PID on the system
  • B. A badness score derived from memory usage and oom_score_adj ✓
  • C. The oldest running process
  • D. The process consuming the most CPU
Correct answer: B. The kernel computes an oom_score from memory footprint and the tunable oom_score_adj to choose a victim.
A large number of sockets stuck in TIME_WAIT on a busy server is caused by:
  • A. The remote end failing to send SYN
  • B. The local end that actively closed the connection waiting to ensure the final ACK was received ✓
  • C. Running out of inodes
  • D. A misconfigured default gateway
Correct answer: B. The peer performing the active close enters TIME_WAIT to absorb delayed packets and confirm the final ACK.
A filesystem shows plenty of free space in `df` but writes fail with 'No space left on device'. The most likely cause is:
  • A. A corrupted superblock
  • B. Inode exhaustion (all inodes consumed) ✓
  • C. Swap being full
  • D. The disk mounted read-only
Correct answer: B. Many small files can exhaust inodes even when block space remains, blocking new file creation.
In RAID 5, the write penalty for a single small random write is approximately:
  • A. 1 I/O operation
  • B. 2 I/O operations
  • C. 4 I/O operations ✓
  • D. 6 I/O operations
Correct answer: C. A small write requires reading old data and parity, then writing new data and parity — four I/Os.
Linux containers achieve process and resource isolation primarily through:
  • A. Hardware virtualization via a hypervisor
  • B. Kernel namespaces and cgroups ✓
  • C. A separate guest kernel per container
  • D. chroot used alone
Correct answer: B. Namespaces isolate resource views while cgroups limit and account for resource usage, sharing the host kernel.
On a NUMA system, performance degrades most when:
  • A. All memory accessed is local to the CPU
  • B. A CPU frequently accesses memory attached to a remote node ✓
  • C. Hyper-threading is disabled
  • D. Swap is turned off
Correct answer: B. Remote-node memory access incurs higher latency than local access, hurting NUMA performance.
Lowering a DNS record's TTL shortly before a planned migration is done to:
  • A. Increase resolver cache duration
  • B. Reduce how long resolvers cache the old record so changes propagate faster ✓
  • C. Improve DNSSEC validation
  • D. Reduce authoritative server load
Correct answer: B. A lower TTL shortens caching so the new IP is picked up quickly after the cutover.
An LVM snapshot of a logical volume:
  • A. Creates a full independent copy immediately
  • B. Uses copy-on-write, storing only blocks changed since the snapshot ✓
  • C. Cannot be created while the volume is mounted
  • D. Requires the volume to be reformatted first
Correct answer: B. LVM snapshots are copy-on-write, capturing original blocks only as they change on the source volume.
The TCP three-way handshake sequence is:
  • A. SYN, ACK, SYN
  • B. SYN, SYN-ACK, ACK ✓
  • C. ACK, SYN, ACK
  • D. SYN, FIN, ACK
Correct answer: B. The client sends SYN, the server replies SYN-ACK, and the client completes with ACK.
In Kubernetes, a failing readiness probe on a pod causes:
  • A. The pod to be restarted immediately
  • B. The pod's endpoints to be removed from Service load balancing until it passes ✓
  • C. The node to be cordoned
  • D. The container image to be re-pulled
Correct answer: B. A failed readiness probe pulls the pod out of Service endpoints without restarting it, unlike a liveness probe.

Prep for another role

Questions are original, written and independently verified for HireHire's role interview quizzes. They reflect the kind of knowledge Systems / Infrastructure Engineer interviews test, not any specific company's questions. HireHire maps live tech & IT jobs across India, updated regularly. Last updated: August 2026.