INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 46–60 of 178 questions
46.What are RPO and RTO and how do they guide disaster recovery?SeniorJFrog Artifactory & Nexus
RPO is how much data you can afford to lose. RTO is how long you can be down. Short targets need warm standby or active-active with replication. Longer targets can use backup and restore.
47.When would you use federated repositories?SeniorJFrog Artifactory & Nexus
When teams in several regions need the same repository with fast local access. Members stay in sync both ways. For one-way copies or backups, use push or pull replication instead.
48.Your Artifactory is slow. How do you approach it?SeniorJFrog Artifactory & Nexus
Measure first: request times, CPU, memory, database connections, disk and network. Then fix the cause, for example replicate near far teams, reduce huge folders, clean up, tune the database or add nodes, and have CI cache dependencies.
49.Why is replication not a backup?SeniorJFrog Artifactory & Nexus
Replication copies changes, including mistakes. If syncDeletes is on, an accidental delete can spread to every site. You still need separate, tested backups of the database and filestore.
50.A pipeline takes 25 minutes. How would you make it faster and cheaper?SeniorGitLab CI/CD
Measure first: wall time (what people wait) and total job time (what you pay), per job, from CI/CD analytics or the API. Then: needs to remove waiting, a dependency cache keyed on the lock file with pull policy for readers, smaller images, rules: changes to skip unneeded jobs, parallel for long test suites, Docker layer caching, interruptible plus auto-cancel for old commits, artifact expiry, and right-sized or spot autoscaled runners.
51.How would you make sure every project in the company runs secret detection, even if a team removes it?SeniorGitLab CI/CD
Use security policies from a security policy project linked to the top group. A scan execution policy forces secret detection in every pipeline, and projects can't turn it off. A merge request approval policy blocks merges with new critical or high findings until the security team approves. Pipeline execution policies can add other required jobs. Scope policies to compliance frameworks where needed.
52.How do you protect production in GitLab end to end?SeniorGitLab CI/CD
Several layers: protected main and tags; merge checks (pipeline must pass, threads resolved) and approval rules with CODEOWNERS; protected variables for production secrets; protected runners or a protected-branch-only Kubernetes agent; protected environments with deployment approvals; resource_group for one deploy at a time; and audit events streamed to a SIEM.
53.What must a self-managed GitLab backup include, and how do you restore it?SeniorGitLab CI/CD
gitlab-backup create saves the database, repositories, uploads, artifacts, packages and more. It does not include /etc/gitlab/gitlab.rb and gitlab-secrets.json; copy those separately and keep them safe, because without gitlab-secrets.json encrypted data like CI/CD variables and runner tokens can't be read. To restore: same GitLab version, stop puma and sidekiq, gitlab-backup restore BACKUP=ID, put back the config files, reconfigure, restart, and run gitlab-rake gitlab:check. Practise restores regularly.
54.How do you upgrade a self-managed GitLab safely?SeniorGitLab CI/CD
Read the release notes, take a backup and copy the config files, and follow the upgrade path with its required stops (x.2, x.5, x.8, x.11), waiting for background migrations to finish between steps. Test on a staging instance first. Multi-node setups can do zero-downtime upgrades node by node. Afterwards, run gitlab:check. You can't downgrade a package; going back means restoring a backup.
55.What is the difference between HA and Geo in GitLab?SeniorGitLab CI/CD
HA runs several copies of each part in one site (several Rails nodes behind a load balancer, PostgreSQL with Patroni, Redis Sentinel, Gitaly Cluster, object storage), so one server can fail without downtime. Geo keeps a live, read-only copy of the whole site in another region, for disaster recovery and faster clones for far-away teams. If the primary site is lost, you promote the secondary and switch DNS. You still need backups, because both copy mistakes too.
56.Reusable workflow or composite action?SeniorGitHub & GitHub Actions
A reusable workflow shares whole jobs and is called at job level. A composite action shares a few steps and is used like a single step inside a job.
57.Why use OIDC to deploy to a cloud?SeniorGitHub & GitHub Actions
The job exchanges a short-lived signed token for temporary cloud credentials, so no long-lived key is stored in GitHub. A trust policy limits it to a specific repo and branch.
58.How do you secure a workflow?SeniorGitHub & GitHub Actions
Set minimal permissions, pin third-party actions to a commit SHA, avoid untrusted input in run steps, use environments with approvals, prefer OIDC to stored keys, and enable Dependabot, CodeQL and secret scanning.
59.Why be careful with pull_request_target?SeniorGitHub & GitHub Actions
It runs with access to secrets in the base repository. If it also checks out and runs code from a fork, an attacker can steal secrets. Use pull_request for untrusted code.
60.What are the risks of self-hosted runners?SeniorGitHub & GitHub Actions
Jobs run on your own network, so malicious code from a pull request could reach internal systems. Use them for private repos, make them ephemeral, and give them minimal access.