Skip to content
$ lynuxpro

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 61–75 of 91 questions

61.What is the safest way to store and use secrets?MidGoogle Cloud (GCP)

Keep them in Secret Manager, give each service account access to only its own secrets, and inject them at run time. Never store them in code, Git or images.

62.What does Pub/Sub guarantee, and what must your code do about it?MidGoogle Cloud (GCP)

It delivers at least once, so a message can arrive twice. Handlers must be idempotent. Use a dead-letter topic so a failing message does not block work.

63.How do you keep BigQuery costs low?MidGoogle Cloud (GCP)

Select only needed columns, filter on the partition column, cluster tables, use dry runs and set a maximum bytes billed.

64.What does rate() do?MidMonitoring with Prometheus, Grafana & Datadog

It turns a counter into growth per second over a time window, such as rate(x[5m]). Use it on counters, not gauges.

65.How do you get a latency percentile in PromQL?MidMonitoring with Prometheus, Grafana & Datadog

Use a histogram metric: histogram_quantile(0.95, sum by (le) (rate(x_bucket[5m]))). Do not average percentiles from different servers.

66.What is an exporter?MidMonitoring with Prometheus, Grafana & Datadog

A small program that reads data from software you cannot change, such as a database or Linux, and exposes it as a /metrics page for Prometheus.

67.What is the job of Alertmanager?MidMonitoring with Prometheus, Grafana & Datadog

Prometheus decides when an alert fires. Alertmanager groups alerts, mutes silenced ones, and routes them to Slack, email or a pager.

68.What makes a good alert?MidMonitoring with Prometheus, Grafana & Datadog

It reports a symptom users feel, needs a human to act, has a for: duration to avoid spikes, and links to a runbook. Alerts that nobody acts on should be fixed or removed.

69.How is Loki different from Elasticsearch?MidMonitoring with Prometheus, Grafana & Datadog

Loki indexes only labels, so it is cheap and works well with Prometheus-style labels. Elasticsearch indexes all the text, so full-text search is rich but costs more storage and memory.

70.What is a trace and a span?MidMonitoring with Prometheus, Grafana & Datadog

A trace is the full journey of one request. A span is one step inside it, with a start time and duration. Spans nest to show who called whom.

71.How do you monitor an app on Kubernetes?MidMonitoring with Prometheus, Grafana & Datadog

Install kube-prometheus-stack, expose a /metrics port on the app, and create a ServiceMonitor that selects its Service. Prometheus then scrapes the pods as they come and go.

72.Why is Prometheus pull-based, and when do you push instead?MidMonitoring with Prometheus, Grafana & Datadog

Pulling lets Prometheus see at once when a target is down, because the scrape fails, and you do not have to configure each app with the server address. Push is only for short-lived batch jobs that end before a scrape, using the Pushgateway.

73.What is a recording rule?MidMonitoring with Prometheus, Grafana & Datadog

A rule that Prometheus evaluates on a schedule and stores as a new metric. Use it for heavy queries that you use often, so dashboards load fast and alerts stay simple.

74.A Grafana panel shows no data. How do you debug it?MidMonitoring with Prometheus, Grafana & Datadog

Check the time range and data source, run the same query in Prometheus or Explore, see if the target is up on the Targets page, check that the metric and label names are spelled right, and look at the query's rate window against the scrape interval.

75.How do you avoid a huge Datadog bill?MidMonitoring with Prometheus, Grafana & Datadog

Control the three big drivers: custom metrics (avoid high-cardinality tags like user IDs), indexed logs (exclusion filters, sampling, archives in cheap storage) and APM (sampling, keep errors). Review Plan & Usage monthly and tag everything with team so costs can be traced.