Intermediate Level
This section covers intermediate DevOps concepts, including Site Reliability Engineering, cloud integration, and deployment strategies.
What is Site Reliability Engineering (SRE)?
SRE is Google's engineering approach to operations: treating reliability as a software problem solved with code, measurement, and error budgets rather than heroics.
The mechanics that define it:
- SLOs and error budgets — define a reliability target (e.g., 99.9%); the missing 0.1% is a budget to spend on releases. Under budget → ship features; exhausted → reliability work wins. This converts the dev-vs-ops tug-of-war into data
- Toil reduction — manual, repetitive operational work is capped (~50%) and progressively automated
- Production readiness — services must meet criteria (dashboards, runbooks, capacity plan) before taking traffic
The relationship to know: SRE is often described as "a specific, prescriptive implementation of DevOps ideas" — DevOps is the culture, SRE is one rigorous way to run it.
How does DevOps change when workloads move to the cloud?
The cloud removes the constraint that shaped classic DevOps — scarce, slow-to-change hardware — and replaces it with API-driven infrastructure:
- Provisioning becomes code — IaC provisions environments in minutes, so "spinning up a staging stack" is a pipeline stage, not a ticket
- Managed services replace undifferentiated work — managed databases, queues, and load balancers shrink the ops surface; your effort shifts to configuration, security, and cost
- New practices appear — multi-account guardrails, IAM as code, tag-based cost governance, and treating egress/pricing as architecture inputs
The trade-off to articulate: the cloud makes creating infrastructure nearly free, which is exactly why automated governance (IaC + policy-as-code) becomes non-negotiable — otherwise speed turns into sprawl.
What is immutable infrastructure, and why does it matter?
Immutable infrastructure means deployed servers/containers are never modified after deployment — any change (patch, config, code) is made by building a new image and replacing instances:
code- Why it matters — no configuration drift, no "snowflake" servers nobody dares touch, and rollback is redeploying the previous image
- How it's implemented — containers/Kubernetes, Packer golden images + auto-scaling groups, Terraform replacing resources
- The prerequisites — everything must be buildable from code (state externalized: logs, sessions, data), and CI must produce images fast enough that "replace" is cheaper than "patch"
Contrast phrase that lands: pets vs cattle — servers get replaced, not nursed back to health.
What is DevSecOps, and how is it actually implemented?
DevSecOps embeds security into every stage of the delivery lifecycle so it runs continuously instead of annually:
code- In the pipeline — SonarQube/Semgrep (code), Snyk/Dependabot (dependencies), Trivy (images), Checkov (IaC), OWASP ZAP (running app) — with severity thresholds gating builds
- In the platform — least-privilege IAM, short-lived credentials, admission policies in Kubernetes
- In the culture — security engineers set policy and tooling; developers own fixing findings, because the findings arrive in their PRs, minutes after the commit
The key statement: DevSecOps makes the secure path the automated path — controls that require a human to remember them will eventually be skipped.
What are the benefits of CI/CD pipelines beyond "faster releases"?
- Small blast radii — frequent small changes mean each deployment is low-risk and easy to bisect
- Consistent process — every change goes through identical gates; no "special releases" with skipped steps
- Fast, precise feedback — a broken build points at the commit and author within minutes
- Reduced manual error — the 2 a.m. console-typo class of outage disappears
- Confidence to experiment — cheap, reversible deployments make it rational to test ideas in production
The DORA research framing to add: deployment frequency, lead time, change failure rate, and recovery time move together — teams that pipeline well improve all four simultaneously.
How does a canary deployment actually work, end to end?
- Deploy alongside — new version runs next to the stable one (separate pods/environment), receiving no traffic
- Shift a slice — route 1–5% of real traffic to the new version (load balancer weights, service mesh, or an Argo Rollouts/Flagger controller)
- Analyze against the baseline — compare error rate, latency, and saturation of canary vs stable over a bake window
- Decide automatically — metrics healthy → widen (25% → 50% → 100%); regression → automatic rollback to the stable version
The critical component is the analysis: queries that define "healthy" (per-version error deltas), a bake window long enough to see real behavior, and rollback wired to the result. A canary without metric gates is just a slow way to break things for 5% of users.
Which monitoring tools fit which layer?
- Metrics — Prometheus (pull-based, Kubernetes standard) + Grafana (dashboards); managed equivalents: CloudWatch, Azure Monitor, Datadog
- Logs — ELK/OpenSearch, Loki, or cloud-native (CloudWatch Logs); collectors like Fluent Bit ship and structure them
- Traces — Jaeger, Tempo, Zipkin — with OpenTelemetry as the vendor-neutral instrumentation standard to mention
- Alerting/routing — Alertmanager, PagerDuty, Opsgenie
The architecture pattern to name: collect via OTel → store per signal type → visualize/alert on user-facing symptoms (error rate, latency) rather than machine symptoms alone (CPU spikes that nobody needs to be paged for).
What is configuration management, and where does it fit today?
Configuration management keeps hosts in a defined, auditable state automatically:
- Declarative tools — Ansible (agentless, push over SSH), Puppet/Chef (agent-based, pull model): you declare desired state, the tool reconciles
- Idempotency — running twice yields the same result; only drift gets corrected
- Where it fits now — with containers and immutable infrastructure, much config moved into image building (Dockerfiles, Packer). Ansible-style config management remains the answer for long-lived VMs, network devices, and legacy estates
The layered answer: images for what you bake in, config management for what you must maintain in place, and IaC for the infrastructure around both.
What is GitOps, and how is it different from "IaC in Git"?
GitOps adds a reconciliation controller on top of IaC-in-Git: Git holds the desired state, and an operator (Argo CD, Flux) continuously pulls that state and corrects the live system when they differ:
codeWhat the controller adds: drift detection and auto-revert (manual kubectl/console changes get corrected), pull-based delivery (no CI credentials on the cluster), rollback as
git revert, and a continuously verifiable claim that "what's running matches what's reviewed". Tools: Argo CD and Flux for Kubernetes; Atlantis/Terraform Cloud for the Terraform side.How do you handle secrets management across environments?
- Central secret stores — HashiCorp Vault, AWS Secrets Manager, Azure Key Vault; Kubernetes Secrets (with etcd encryption + RBAC) inside clusters
- No secrets in Git or images — a committed secret is compromised regardless of deletion (history retains it) — rotate, don't hide
- Runtime injection — CI injects into the pipeline environment; platforms inject into apps via env vars or mounted files; External Secrets Operator syncs from vaults into clusters
- Short-lived credentials — dynamic database credentials and OIDC federation make long-lived keys unnecessary; rotation becomes automatic
- Operational discipline — masking in logs, scoped access per service, audited reads, and rotation schedules with tested revocation
The maturity question worth anticipating: "can you revoke every secret in an hour without downtime?" — teams with vaults and dynamic credentials can; teams with static keys in env files can't.
What is chaos engineering, and how is an experiment structured?
Chaos engineering deliberately injects failures to prove resilience mechanisms actually work — before real outages prove they don't. The scientific structure:
- Steady state — define the metrics that mean "healthy" (success rate, p99 latency)
- Hypothesis — "killing this pod will not break checkout because of redundancy"
- Blast radius — start tiny: one instance, staging or a canary slice
- Execute and observe — inject the fault (AWS FIS, Litmus, Gremlin); watch steady-state metrics
- Learn — a violated hypothesis is a found weakness, converted to a filed fix
The discipline line to deliver: without a hypothesis and measurable steady state, you're not doing chaos engineering — you're just breaking production.
What is a service mesh, and when do you actually need one?
A service mesh is a dedicated infrastructure layer for service-to-service traffic: sidecar (or eBPF) proxies intercept every request, giving the platform control over traffic, security, and observability without touching application code:
- What it provides — mTLS identity between services, retries/timeouts/circuit breaking as config, precise traffic splitting for canaries, per-hop metrics for free
- When it earns its cost — hundreds of services, hard zero-trust/mTLS requirements, sophisticated canary needs
- When it doesn't — small estates get the same wins from Ingress + NetworkPolicies; a mesh adds real operational weight (control plane, upgrades, resource tax)
Tools: Istio (full-featured), Linkerd (lightweight), Consul. The maturity marker: answering "do we need it yet?" with a concrete service count and security requirement, not a default yes.
What is an API gateway, and how is it different from a service mesh?
An API gateway is the north-south entry point for external clients; a mesh handles east-west traffic between internal services:
- Gateway responsibilities — routing public URLs to services, client authentication (API keys/JWT), rate limiting, TLS termination, request shaping
- Why it exists — external clients shouldn't know your internal topology, and cross-cutting concerns (auth, quotas) shouldn't be re-implemented in every service
Tools: NGINX, AWS API Gateway, Kong, Envoy Gateway. The distinction interviewers test: gateway = edge/clients; mesh = internal service identity, retries, and canary traffic. Large platforms run both — the gateway fronts the mesh, and each solves the failure modes of its own traffic direction.
How do you optimize a CI/CD pipeline?
Optimize by measuring first, then attacking the bottleneck:
- Cache aggressively but correctly — dependencies keyed by lockfile hash, Docker layer caching, remote build caches (Gradle/Bazel/Turborepo)
- Parallelize and shard — independent stages concurrently; split slow test suites across runners
- Skip intelligently — path filters (docs changes don't trigger full builds), affected-module builds in monorepos
- Right-size runners — bigger machines for compile-heavy stages, more small machines for parallel tests
- Fix flaky tests — reruns are hidden duration and eroded trust; quarantine + track flake rate
The target to state: PR feedback under ~10 minutes — pipelines slower than that get bypassed, and a bypassed pipeline is worse than none.
What is hybrid cloud in a DevOps context?
Hybrid cloud runs workloads across on-premises/private cloud and public cloud as one estate:
- Why organizations land there — existing data-center investment, data-residency rules, latency-sensitive systems, gradual migration
- What makes it work — one IaC pipeline (Terraform), unified identity (SSO/IAM federation), consistent networking (VPN/dedicated interconnect), central observability, Kubernetes as a common runtime where possible (Anthos, Azure Arc, EKS Anywhere)
- The honest cost — doubled operational surface: two security models, two networking stacks; the management-plane investment is the whole game
The pattern to name: hybrid is usually a transition state or a regulatory necessity — architect it as one estate with guardrails, not two islands.
What is the difference between observability and monitoring?
- Monitoring — watching predetermined metrics and thresholds to detect known failure modes ("is CPU above 90%? is the endpoint down?") — dashboards and alerts for questions you thought to ask in advance
- Observability — the system property that lets you ask novel questions about arbitrary failures from the emitted data (metrics + logs + traces) — debugging what you never anticipated in a distributed system
The relationship: monitoring is a subset activity built on top of observability. The line that lands: monitoring tells you that something is wrong; observability lets you figure out why — including for the failures nobody predicted. The three pillars (metrics, logs, traces) plus correlation IDs are what make novel debugging possible.
What are Helm charts, and how do they fit into Kubernetes delivery?
Helm is the package manager for Kubernetes: a chart packages an application's manifests as templates with values, so one chart deploys many configurations:
bash- What templates solve — the same manifest with different values per environment (dev/staging/prod); no more copy-pasted YAML drifting apart
- Release semantics — Helm tracks releases and revisions, enabling
helm rollback - In CI/CD — pipelines run
helm upgrade --install(or better: GitOps tools render charts — Argo CD/Flux support Helm sources), with--atomicfor automatic rollback on failed deploys - Best practices — pin chart versions, version your own charts, validate with
helm template/lint in CI, and keep values per environment in Git
What is A/B testing in a DevOps context?
A/B testing runs two (or more) versions simultaneously for real users and decides the winner on measured product outcomes — not just technical health:
- The mechanics — traffic/user split (feature flags, service-mesh weights, or the CDN), consistent assignment per user (sticky hashing), separate metrics per cohort (conversion, engagement), statistical significance checks
- vs canary deployments — canary asks "is v2 safe?" (error rate, latency); A/B asks "is v2 better?" (business metrics). A canary that fails technically never becomes an A/B test; a healthy A/B can still lose and be removed
- The infrastructure requirement — reliable cohort splitting, per-variant telemetry, and enough traffic/time for significance
The DevOps tie-in: feature-flag platforms (LaunchDarkly, Unleash) typically provide the assignment engine, which is why experimentation and progressive delivery live in the same tooling ecosystem.
How do you handle database schema changes in CI/CD?
Schema changes are the hardest CI/CD problem — the database is shared state with no instant undo:
- Versioned migration tools — Flyway, Liquibase, Alembic: ordered, committed migration files applied by the pipeline (
flyway migratebefore the new app starts) - Expand/contract pattern — (1) expand: additive, backward-compatible change (add column, backfill), (2) deploy code using it, (3) contract: remove the old structure only after the old code is fully gone — usually several releases later
- Guardrails — validate migrations against a production-scale copy, snapshot before applying, never couple destructive changes to an app deploy, prevent concurrent migration runs
The one-liner that shows seniority: "code rolls back instantly; data doesn't — so every schema change must be compatible with the previous version of the application."
- Versioned migration tools — Flyway, Liquibase, Alembic: ordered, committed migration files applied by the pipeline (
What is autoscaling in cloud environments, and what are its pitfalls?
Autoscaling adjusts capacity automatically to match demand — horizontal (add/remove instances) and vertical (resize), triggered by metrics or schedules:
- Healthy pattern — scale on a user-facing signal (requests per target, queue depth), set min/max bounds, use stabilization windows to prevent thrashing, and drain gracefully on scale-in
- The pitfalls — scale oscillation from reactive thresholds; instances terminated mid-task; scaling the app tier while the database (the real bottleneck) stays static; CPU as a misleading metric for IO-bound workloads
- Where it's configured — cloud auto-scaling groups, Kubernetes HPA (and VPA/Cluster Autoscaler), scheduled scaling for predictable peaks
The architecture insight: autoscaling only helps if every tier scales — stateless app tiers scale naturally only after state is pushed out to databases, caches, and object storage.
Contribute & Stay Updated
Want to contribute? We welcome contributions! If you have insights, new tools, or improvements, feel free to submit a pull request.
How to Contribute?
- Read the CONTRIBUTING.md guide.
- Fix errors, add missing topics, or suggest improvements.
- Submit a pull request with your updates.
Community & Support
GitHub: @NotHarshhaa Blog: ProDevOpsGuy Telegram Community: Join Here