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 46–60 of 91 questions

46.What is the difference between an ALB and an NLB?MidAWS

An Application Load Balancer works at layer 7, understands HTTP, and routes by path or host. A Network Load Balancer works at layer 4, is very fast, and keeps a fixed IP address.

47.How does Auto Scaling decide to add servers?MidAWS

A scaling policy watches a metric, such as average CPU or requests per target. Target tracking adds or removes instances to hold the metric near your target, within the minimum and maximum you set.

48.What does CloudTrail record, and how is it different from CloudWatch?MidAWS

CloudTrail records who called which AWS API and when. CloudWatch collects metrics and logs about how things are running. Use CloudTrail to audit, CloudWatch to watch health.

49.How do you reach a server without opening SSH?MidAWS

Use Systems Manager Session Manager. The instance has a role and the SSM agent, and you get a shell through AWS with IAM control and logging, with no inbound port open.

50.ECS or EKS?MidAWS

ECS is simpler and AWS-only, so it is a good start. EKS runs Kubernetes, which is more work but more portable and has a bigger ecosystem. With Fargate, neither needs you to manage servers.

51.When should you use SQS and when SNS?MidAWS

SQS is a queue: one consumer takes each message, and the queue holds it until it is handled. SNS is publish and subscribe: one message goes to many subscribers. They are often combined, with SNS sending to several SQS queues.

52.What is the difference between a task role and a task execution role in ECS?MidAWS

The execution role lets ECS pull the image and write logs. The task role is what your own code uses to call AWS services, such as reading an S3 bucket.

53.How can you get a shell on an EC2 instance without opening port 22?MidAWS

Use Systems Manager Session Manager. The instance needs the SSM Agent and an IAM role with SSM permissions. The session goes over outbound HTTPS and is logged.

54.How is a VPC in GCP different from other clouds?MidGoogle Cloud (GCP)

A VPC is global. One network spans all regions, and only subnets are regional.

55.Two firewall rules conflict. Which wins?MidGoogle Cloud (GCP)

The one with the lower priority number. By default incoming traffic is denied and outgoing is allowed, and rules are stateful.

56.How can an admin SSH to a VM that has no public IP?MidGoogle Cloud (GCP)

With Identity-Aware Proxy TCP forwarding (gcloud compute ssh --tunnel-through-iap), with a firewall rule for the IAP range and the right IAM role.

57.How does a private VM reach the internet or download updates?MidGoogle Cloud (GCP)

Through Cloud NAT. Private Google Access covers calls to Google APIs.

58.When do you pick Spanner, Bigtable or Firestore instead of Cloud SQL?MidGoogle Cloud (GCP)

Spanner for global SQL with strong consistency, Bigtable for huge key-based or time-series data, Firestore for flexible documents in web and mobile apps. Otherwise start with Cloud SQL.

59.What makes Cloud SQL highly available, and what does a read replica do?MidGoogle Cloud (GCP)

The REGIONAL availability type keeps a standby in another zone for failover. A read replica only serves reads and is for performance.

60.How do you decide on a load balancer type?MidGoogle Cloud (GCP)

By layer and scope. A public website uses the global external Application Load Balancer. TCP or UDP traffic that must keep the client IP uses a passthrough Network Load Balancer. Internal HTTP uses the internal Application Load Balancer.