Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit c50810e · 15 days ago

Grading Interviews, Part 2: System Administrator and DevOps — Questions and Sample Answers

🌐 Machine-translated from Russian. Show original

Designations: J — junior, M — middle, S — senior and above. Sample answers — concise: present them with your own examples during the interview.

In this part:

Seti#

J. What happens when you enter a site address in a browser?#

A classic that shows the breadth of knowledge. A good step-by-step answer:

  1. The browser checks the cache, then the OS requests DNS: cache, hosts file, DNS server (usually domain controller or router), then recursively to the authoritative zone server. We get an IP.
  2. TCP connection (three-way handshake SYN, SYN-ACK, ACK) to port 443. If the address is on another network — the packet goes to the default gateway, the gateway MAC is determined via ARP.
  3. TLS: the server sends a certificate, the browser checks the chain and name, and keys are negotiated.
  4. HTTP request GET, the server (often through a balancer and reverse proxy), responds to HTML.
  5. The browser disassembles the page and loads CSS, JS, images — new queries.

Middle can add: HTTP/2 and HTTP/3, CDN, HSTS, caching.

J. What types of DNS records do you know?#

  • A / AAAA — name → IPv4 / IPv6.
  • CNAME — an alias with a different name.
  • MX — domain mail server.
  • TXT — arbitrary text: SPF, DKIM, DMARC, domain ownership proof.
  • PTR — IP → name rewrite (important for mail servers).
  • SRV — services; through them, clients find AD domain controllers.
  • NS / SOA — who is responsible for the zone and its parameters.

J. How does DHCP work?#

Four steps of DORA: Discover (client searches for server via broadcast), → Offer (server offers an address), → Request (client requests), → Acknowledge (server confirms). Besides IP, mask, gateway, DNS, and lease time are provided. If the server is in a different segment, DHCP relay (IP helper) on the router is required.

J. TCP and UDP — what is the difference?#

TCP — with connection establishment, guaranteed delivery, and order (web, mail, SSH, databases). UDP — without connection or guarantees, but faster and simpler (DNS, VoIP, video, DHCP, syslog). A good additional example: DNS uses TCP for large responses and zone passing.

J. How many addresses are there on the /24 and /26 network?#

/24 — 256 addresses, 254 for hosts (minus network address and broadcast). /26 — 64 addresses, 62 for hosts. The ability to quickly calculate subnets is a common practical question.

M. What is a VLAN and why is it needed?#

Logical division of one physical switch into several isolated networks: users, servers, IP telephony, guests, video surveillance. Pros: security, less broadcast traffic, flexibility. Ports can be access (one VLAN, no tags) and trunk (multiple VLANs with 802.1Q tags). Traffic travels between VLANs through a router or L3 switch, where it can be filtered.

Details — the series "Network Equipment from Different Manufacturers."

Linux#

J. What do the 640 rights in the file mean?#

Owner — read and write (6 = 4 + 2), group — read only (4), others — nothing (0). A typical variant for password configs: chown root:app file && chmod 640 file.

J. How to find what is taking up space on the disk?#

df -h                                     # заполненность файловых систем
du -xh --max-depth=1 / | sort -h | tail   # самые большие каталоги в корне
find / -xdev -type f -size +1G -exec ls -lh {} +   # файлы больше 1 ГБ

M. df shows that the disk is 100% full, and du counts much less. Why?#

Two common reasons:

  1. The deleted file is still open by the process (typically — the log was deleted rm, but the service continues writing to it). Space will be freed only when the process closes the file. Find: lsof +L1 or lsof | grep deleted. The solution is to restart the service or reset the file through /proc/PID/fd/N. More correctly — logrotate with copytruncate or service signal.
  2. The inode ran out — many small files (sessions, cache, mail queue). Check: df -i.

Less commonly: data lies in a directory on top of which another disk is mounted — du does not see it.

M. The server is "lagging." Your actions?#

A good answer is an algorithm, not just one command:

  1. What exactly is slow and from what point? What has changed (updates, releases)?
  2. Overall picture: uptime (load average), top / htop.
  3. CPU: who's eating, %wa (I/O wait) is high — let's look at the disks.
  4. Memory: free -h, whether there is swap activity (vmstat 1), OOM in journalctl -k.
  5. Drives: iostat -x 1 — loading and response time.
  6. Network: interface errors, number of connections (ss -s).
  7. Service and system logs. And most importantly — compare with the monitoring charts for the previous week.

M. What is load average?#

The average number of processes running or waiting for the CPU (in Linux — also waiting for the disk in continuous sleep) is 1, 5, and 15 minutes. Compare with the number of cores: load 8 on a 16-core server is normal, on a 2-core server — overload. High load at low CPU load usually indicates problems with disks or network storage.

M. How does SSH key login work?#

The user has a pair of keys; the public key lies on the server in ~/.ssh/authorized_keys. Upon login, the client proves ownership of the private key by signing session data — the private key itself is not transmitted anywhere. The server, in turn, proves its authenticity with the host key, whose fingerprint the client remembers in known_hosts. After switching to the keys, password login is disabled: PasswordAuthentication no.

Windows and Active Directory#

J. What is an Active Directory domain and why does a company need it?#

A centralized database of users, computers, and groups with unified authorization (Kerberos) and management through group policies. One login for all systems, centralized locking of fired users, password policies, deployment of settings and software.

J. In what order are group policies applied?#

LSDOU: local policy → site → domain → unit (OU) from top to bottom. The one closest to the object is applied, and in case of a conflict, it wins — unless Enforced or Block Inheritance is enabled. Result check: gpresult /r or gpresult /h report.html.

M. The user cannot log into the domain with a trust error. What to do?#

The computer's secure channel with the domain is broken (for example, the PC was restored from an old image and the computer account password does not match). Verification and repair without deleting the domain — in PowerShell under the local administrator: Test-ComputerSecureChannel -Repair -Credential CORP\admin. Other reasons worth mentioning: time difference over 5 minutes (Kerberos), DNS on the client points not to domain controllers.

Q. How would you organize secure AD administration?#

Senior-level response: tiering model — separate admin accounts for controllers, servers, and workstations; domain administrators do not log into regular PCs; LAPS for local passwords; separate administrator workstations; minimum members in Domain Admins; group change audit; protection against Kerberoasting (complex passwords or gMSA for service accounts). Details — the "Active Directory and Group Policies" series.

Reliability and backups#

J. What is the 3-2-1 rule?#

At least 3 copies of data on 2 different types of media, 1 copy — outside the office (or in the cloud). A modern addition — one copy is immutable or disconnected from the network so that the ransomware cannot reach. And most importantly: backup without recovery verification is not a backup.

J. How do RAIDs 0, 1, 5, and 10 differ?#

RAIDThe Essence ofWill Survive FailureComment
0interleavingno diskonly speed, for data cannot
1mirror1 disk of 2system disks
5Parity alternation1 disklong recovery on large disks, risk of second failure
10mirrors + alternatingone in each pair ofdatabases, high load

Be sure to add: RAID is not a backup. It won't save you from deleting a file or ransomware.

M/S. What are RPO and RTO?#

RPO — how much data can be lost (backup once a day — RPO up to 24 hours). RTO — how long it takes to restore work. They are determined by the business, not the admin, and decisions and budget depend on them: replication, backup site, backup frequency.

DevOps#

J/M. How is a container different from a virtual machine?#

A VM emulates an entire computer with its OS kernel — strong isolation but more resources and slow startup. Container — an isolated process on the common host kernel (namespaces and cgroups): lightweight, launches within seconds, and the image contains an application with dependencies. Isolation is weaker than VM, so in practice containers are often run inside the VM.

M. How is your CI/CD pipeline structured?#

Need a talk about your pipeline: commit → build → tests → code analysis and dependency checking → build an image → publish to the registry → deploy to the test → deploy to prod (by button or automatically) → health check and rollback. They expect to hear where the secrets are kept, how you roll back, and what you do if the tests fail.

Basics — in the series "Docker and CI/CD from Scratch."

M. What does "idempotency" mean in Ansible?#

Restarting the playbook does not change the system if it is already in the desired state. Modules describe the desired state ("package installed," "line in file available"), not actions. Modules shell and command are not idempotent by default — they require creates, changed_when , and checks.

Q. Do we need Kubernetes?#

A good senior answer is not "yes," but questions: how many services, what load and how often are deployed, are there people ready to support it. Kubernetes is justified with a large number of services, autoscaling, and frequent releases. For several applications, Docker Compose or systemd on a pair of VMs with a balancer is often enough — cheaper and easier to maintain.

S. Tell us about the incident you were investigating#

The structure is expected: how they found it (monitoring or users), how they assessed the scale and informed the business, how they restored the work (first restore it, then look for the root), what was found, what actions were taken, and analysis without finding fault (postmortem). It's good if in the end there are monitoring, testing, or automation that will prevent repetition.

Practical tasks#

Task 1 (J/M). Output 10 IP addresses with the highest number of requests from the web server log.

awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -10

Problem 2 (M). Which queries returned 5xx errors in the last hour?

journalctl -u myapp --since "1 hour ago" -p err
awk '$9 ~ /^5/ {print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head

(Field $9 — response code in the standard logs format nginx combined.)

Task 3 (M/S). Design an office infrastructure for 50 people with 1C, a file server, and mail. Expected: network scheme with VLAN, AD with two controllers, 1C server and DBMS, backups via 3-2-1, monitoring, VPN for remote work, UPS, cloud discussion and on-premise, requirements for personal data storage in the Republic of Kazakhstan. Guideline — series "Infrastructure of a Small Company."

Next — questions for backend developers: Grad interviews, part 3: backend developer — algorithms, SQL, HTTP, and design.

Comments 00 участников · 0 гостей🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.