DevOps / Cloud Engineer — Interview Questions
In short: URL parsed → browser/OS caches checked → DNS resolves the host to an IP (resolver → root → TLD → authoritative) → TCP three-way handshake to port 443 (or QUIC for HTTP/3) → TLS handshake validates the certificate and sets up encryption → HTTP request sent with headers/cookies → CDN/load balancer/reverse proxy route it → web server and application handle it (auth, routing, controller, database) → HTTP response with status, headers, body → browser parses HTML into the DOM, loads CSS/JS/images, builds the render tree, lays out and paints the page;
- further requests reuse the connection.
In short: DNS translates domain names to IP addresses through a hierarchy of servers with caching (TTL).
- An A record maps a name to an IPv4 address (AAAA for IPv6);
- a CNAME makes a name an alias of another name (e.g.
www→shop.azurewebsites.net); - an MX record lists the mail servers for the domain.
- TXT records are used for verification and email security (SPF, DKIM, DMARC).
In short: HTTPS is HTTP over TLS: the connection is encrypted (confidentiality), protected from tampering (integrity), and the server proves its identity with a certificate signed by a trusted certificate authority (authentication).
- Default ports 80 vs 443.
- HTTPS is required for modern browser features, SEO and any login or personal data.
In short: TCP is connection-oriented and reliable: handshake, acknowledgements, retransmission, ordering, flow and congestion control — used for the web, databases, email.
- UDP is connectionless with no delivery guarantees but lower latency and overhead — used for DNS, voice/video, games and QUIC (HTTP/3), where the application handles reliability.
In short: GET (read), POST (create/action), PUT (replace, idempotent), PATCH (partial update), DELETE (remove, idempotent), OPTIONS/HEAD.
- Status: 200 OK, 201 Created, 204 No Content, 301/302 redirects, 304 Not Modified, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 429 Too Many Requests, 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout.
In short: A component that distributes incoming traffic across several servers for scalability and availability, using health probes to skip unhealthy instances.
- Algorithms: round robin, weighted round robin, least connections, IP hash/sticky sessions, least response time.
- Layer 4 balancers route by IP/port (fast); layer 7 balancers understand HTTP and can route by path, host or header and terminate TLS.
In short: A Content Delivery Network caches content at edge servers around the world, so users download from a nearby location: lower latency, less load on the origin, protection against traffic spikes and DDoS, often a WAF and free TLS.
- Best for static assets with long cache headers and fingerprinted file names; dynamic content can also be accelerated.
In short: A forward proxy acts for clients (they connect out through it — corporate filtering, anonymity).
- A reverse proxy acts for servers (clients connect to it and it forwards to backend servers — TLS termination, load balancing, caching, compression, hiding internal servers).
- Nginx, IIS ARR, YARP and Azure Application Gateway are reverse proxies.
In short: Install the .NET Hosting Bundle (runtime + ASP.NET Core Module).
- IIS receives requests via HTTP.sys and the app pool's
w3wp.exe; - the ASP.NET Core Module runs the app in-process (inside w3wp, fastest) or out-of-process (proxying to Kestrel).
- The app pool uses "No Managed Code";
web.config(generated on publish) configures the module; bindings and certificates are set in IIS.
In short: Check from outside (another network, downforeveryoneorjustme, mobile data).
- DNS:
nslookupfrom different resolvers — wrong/expired record or propagation. - Connectivity:
Test-NetConnection host -Port 443, firewall/NSG, load balancer health probes. - TLS: expired certificate or missing intermediate (SSL Labs).
- Server: app pool/process running, logs (Event Viewer, stdout, Application Insights), 5xx errors, resource limits.
- Recent changes: deployment, certificate renewal, DNS edits.
- Your machine may use a cached DNS entry or hosts-file entry.
In short: DNS caching: resolvers and clients cache the old A record until its TTL expires (and some ignore TTLs).
- Next time lower the TTL (e.g. to 300 s) a day before the move, then change the record, keep the old server running (or redirecting) until traffic drains, and raise the TTL afterwards.
In short: Microsoft's Windows web server.
- It hosts static sites, ASP.NET Framework apps (Web Forms, MVC 5, Web API 2, WCF), ASP.NET Core apps via the ASP.NET Core Module, and through modules/ARR can proxy to Node.js, Next.js or other servers.
- It provides bindings, HTTPS, authentication (including Windows auth), compression, caching, URL rewriting and logging.
In short: A group of one or more applications served by the same worker process (w3wp.exe) with shared settings: .NET CLR version, pipeline mode, identity, recycling and limits.
- Pools isolate applications — a crash, memory leak or recycle in one pool doesn't affect apps in other pools — and define the security identity the app runs as.
In short: The IIS worker process.
- Each application pool runs in its own w3wp.exe (or several in a web garden);
- it hosts the IIS pipeline, modules and your application code (including in-process ASP.NET Core apps).
- You attach the Visual Studio debugger to w3wp.exe to debug IIS-hosted apps and see it in Task Manager with the pool identity as the user.
In short: Install the .NET Hosting Bundle on the server, dotnet publish -c Release, create an app pool with "No Managed Code", create a site pointing to the publish folder with bindings and a certificate, grant the pool identity read permissions (write for logs/uploads), set environment variables (ASPNETCORE_ENVIRONMENT, connection strings) and browse.
- The published web.config configures the ASP.NET Core Module (in-process by default).
In short: In-process runs the app inside the IIS worker process using IIS's HTTP server — no extra network hop, best performance, but only one ASP.NET Core app per pool.
- Out-of-process runs the app as a separate Kestrel process with IIS (ANCM) forwarding requests over loopback — slower, but multiple apps per pool and Kestrel-specific features.
- Configured with
hostingModelin web.config /AspNetCoreHostingModelin the project.
In short: IIS periodically (default every 29 hours), on configuration changes, memory/request limits or on demand starts a new worker process and shuts down the old one.
- It frees leaked memory and refreshes the app, but in-memory state is lost (InProc session, MemoryCache, static data) and the first request after startup may be slow.
- Schedule recycles off-peak, use out-of-process state and warm-up (Application Initialization).
In short: A per-pool virtual account (IIS AppPool\<PoolName>) created automatically, with minimal privileges.
- Grant it NTFS rights on the site folders (
icacls ... /grant "IIS AppPool\ShopPool":RX), and for SQL Server with Windows authentication create a login for it locally or for the computer account (DOMAIN\SERVER$) when SQL is remote — or use a dedicated domain service account.
In short: The app failed to start.
- Check Event Viewer (Application log) for the ANCM and app exceptions, enable
stdoutLogEnabledwith a writable logs folder, rundotnet YourApp.dllfrom the publish folder on the server to see errors, verify the Hosting Bundle/runtime version and bitness, the app pool "No Managed Code", file permissions, environment-specific configuration (missing connection string, Key Vault access) and database connectivity at startup.
In short: The application pool is likely stopped: open IIS Manager → Application Pools;
- check Event Viewer System log for WAS errors — rapid-fail protection after repeated crashes, wrong or expired password for a custom identity, missing .NET version, or a crash at startup.
- Fix the cause and start the pool.
- Also check the request queue limit and that the binding/host name is correct.
Enable Windows Authentication (disable Anonymous) on the site, [Authorize] in the app, and either connect to SQL Server with the app pool identity (simplest — grant that account the needed DB permissions and use User.Identity.Name for auditing) or, if SQL must see the end user, configure Kerberos constrained delegation (SPNs for the service account, delegation to the SQL service) and impersonation — more complex, so usually avoided.
In short: Git is a distributed version control system: every clone has the full history, so commits, branches, diffs and logs work offline and are fast;
- you sync with remotes by push/pull.
- SVN and TFVC are centralised: history lives on one server, many operations need the server, and branching is heavier.
- Git's cheap branching enables feature branches and pull-request workflows.
In short: git fetch downloads new commits and updates remote-tracking branches (origin/main) without touching your working branch — safe to run anytime.
git pull= fetch + integrate (merge by default, or rebase with--rebase/pull.rebase=true) into your current branch, which can cause conflicts.
In short: The index between your working tree and the repository.
git addputs selected changes into it andgit commitrecords exactly what is staged.- It lets you build clean, focused commits from a messy working tree (
git add -pto stage parts of a file).
In short: Run git status to see conflicted files, open each, decide the correct code between the <<<<<<<, =======, >>>>>>> markers (keep one side, both, or rewrite), remove the markers, build and test, then git add the files and git commit (or git rebase --continue).
- Use
git merge --abortto back out. - Prevent conflicts with small, frequent merges.
In short: Merge joins histories with a merge commit, keeps the true history and never rewrites commits — safe for shared branches.
- Rebase replays your commits on top of another branch, giving a linear history but new commit ids — use it for local/private branches to update with main or clean up before a PR.
- Never rebase commits others already have.
In short: reset moves the current branch pointer back (soft keeps changes staged, mixed keeps them unstaged, hard discards them) — it rewrites history, so only for unpushed commits.
revertcreates a new commit that undoes a previous commit — the safe way to undo something already pushed to a shared branch.
In short: Describe yours concretely, e.g. "GitFlow-like: main = production, develop for integration, feature/* per story with PRs into develop, release/* cut for UAT, hotfix/* from main merged back to both" — or "trunk-based: short-lived branches merged to main daily behind feature flags, every merge deploys to dev".
- Mention branch policies (reviewers, CI checks) and how releases are tagged.
In short: A request to merge a branch, where teammates review the diff and CI validates it before merge.
- Check: does it meet the requirement, tests, edge cases and error handling, security (secrets, injection, authorization), performance (N+1, missing indexes), naming and readability, consistency with architecture, and that the PR is small and focused.
In short: First rotate/revoke the secret immediately — assume it is compromised (bots scan GitHub within minutes).
- Then remove it from the code (move to Key Vault/user secrets/environment variables), and purge it from history with
git filter-repoor BFG, force-push and ask everyone to re-clone; - on GitHub contact support to clear cached views.
- Prevent it next time:
.gitignore, pre-commit secret scanning (gitleaks), GitHub push protection / secret scanning.
In short: git branch feature/x (new branch points at your commits) → git reset --hard origin/main (move main back to the remote state) → git switch feature/x and continue.
- Nothing is lost; if anything goes wrong,
git reflogshows the old position.
In short: git revert <sha> (for a merge commit git revert -m 1 <merge-sha>), push through the normal PR/pipeline so the revert is reviewed and deployed.
- Don't
reset+ force-push a shared branch — it breaks everyone's clones and the audit trail.
In short: Docker is a platform to build, ship and run applications in containers.
- A container packages the app with its runtime and dependencies, so it runs identically everywhere ("works on my machine" disappears).
- Benefits: consistent environments across dev/test/prod, fast startup, high density, isolation between apps, easy scaling, and a standard artifact for CI/CD and orchestrators like Kubernetes.
In short: A VM virtualises hardware and runs a full guest OS with its own kernel on a hypervisor — strong isolation, GBs in size, minutes to boot.
- A container virtualises at the OS level: isolated processes sharing the host kernel using namespaces (isolation) and cgroups (resource limits) — MBs in size, starts in seconds, much higher density.
- Containers can run inside VMs (as in most clouds).
In short: An image is a read-only, layered template (filesystem + metadata) built from a Dockerfile.
- A container is a running (or stopped) instance of an image with its own writable layer, network and process.
- One image can start many containers, just like a class and its objects.
In short: FROM (base image), WORKDIR, COPY/ADD, RUN (build-time command), ENV/ARG, EXPOSE, USER, HEALTHCHECK, ENTRYPOINT and CMD.
- ENTRYPOINT defines the executable that always runs; CMD supplies default arguments (or a default command) that
docker runarguments override. - COPY copies local files; ADD also auto-extracts local tar archives and can download URLs — prefer COPY for clarity and security.
In short: A Dockerfile with several FROM stages: an early stage (e.g. .NET SDK) compiles and publishes the app;
- the final stage starts from a small runtime image and copies only the build output with
COPY --from=build. - Result: much smaller images without compilers or source code, faster deployments, smaller attack surface — all in one Dockerfile.
In short: A tool for defining and running multi-container applications with a YAML file (compose.yaml): services, images/builds, ports, environment, volumes, networks, dependencies and health checks.
docker compose upstarts everything.- Used for local development environments (API + SQL Server + Redis + RabbitMQ), integration tests and simple single-host deployments.
- For production clusters, use Kubernetes or Azure Container Apps.
In short: Through Docker networks.
- On a user-defined bridge network (or Compose's default network), containers resolve each other by container/service name via Docker's embedded DNS (
http://api:8080,Server=sql). - The default
bridgenetwork doesn't provide name resolution. - Published ports (
-p) are only needed for access from the host or outside, not between containers.
In short: Use multi-stage builds;
- small base images (aspnet runtime instead of SDK, chiseled/Alpine variants, runtime-deps with self-contained/AOT);
- a
.dockerignore; - combine RUN commands and remove caches in the same layer;
- don't install unnecessary tools;
- publish trimmed/AOT apps where suitable.
- Check layers with
docker historyor Dive.