GCP- Interview questions
What is Compute?
Compute is the processing power used to run applications and perform tasks.
Compute = CPU + Memory (RAM) used to run your workloads
What is SAAS, IAAS, PAAS?
SaaS (Software as a Service) is a cloud service model where ready-to-use software is delivered over the internet, and users can access it without managing or installing anything, such as Google Gmail.
PaaS (Platform as a Service) is a cloud service model that provides a platform and environment for developers to build, run, and deploy applications without managing the underlying infrastructure, such as Google Cloud Platform App Engine.
IaaS (Infrastructure as a Service) is a cloud service model that provides virtualized computing resources such as servers, storage, and networking over the internet, where users manage the operating system and applications, such as Amazon Web Services EC2.
What is GCP?
Google Cloud Platform is a cloud computing platform provided by Google.
It offers services like compute, storage, networking, and monitoring to build scalable and highly available applications.
It follows a pay-as-you-go model and supports modern architectures like microservices and containers.
What is Compute Engine?
Compute Engine is an Infrastructure-as-a-Service offering in GCP that allows us to create and manage virtual machines.
It provides full control over the operating system, CPU, memory, and storage.
It is typically used for hosting applications, running services, or setting up custom environments.
What is a VPC?
A VPC, or Virtual Private Cloud, is a logically isolated network in GCP where we deploy our resources.
It allows secure communication between services and provides control using subnets, routes, and firewall rules.
One key feature is that GCP VPC is global, unlike some other cloud providers.
Difference between Region and Zone?
A region is a geographical area, such as Mumbai or London.
Each region contains multiple zones, which are individual data centers.
Zones are used for deployment, and using multiple zones improves high availability.
Note: A Zone is a single data center
What is IAM?
IAM stands for Identity and Access Management.
It is used to control who can access which resources in GCP.
Access is managed using roles such as Viewer, Editor, and Owner, or through custom roles.
How do you design a highly available application?
To design a highly available application:
- Deploy resources across multiple zones
- Use a load balancer to distribute traffic
- Use managed instance groups for auto-scaling and self-healing
VM has no internet access, what will you check?
would check three main things:
- Firewall rules to ensure outbound traffic is allowed
- Routes, specifically if a default route (0.0.0.0/0) exists
- Whether the VM has an external IP or Cloud NAT configured
How do you monitor GCP resources?
GCP provides Cloud Monitoring for tracking metrics like CPU, memory, and uptime.
We can also configure alerting policies based on thresholds.
Additionally, external tools like Zabbix can be integrated using APIs or agents for centralized monitoring.
What is Cloud Storage?
Cloud Storage is an object storage service in GCP used to store unstructured data in buckets.
It is highly scalable and durable, making it suitable for backups, logs, and media files.
What are different storage classes in Cloud Storage?
Storage classes define how your data is stored, accessed, and priced based on usage frequency.
GCP provides four main storage classes:
- Standard – for frequently accessed data
- Nearline – for data accessed once a month
- Coldline – for rare access (once a year)
- Archive – for long-term storage and backup
Note:
What is a Bucket?
A bucket is a container in Cloud Storage where objects (files) are stored.
Each bucket has a globally unique name and belongs to a specific location.
What is an Object in Cloud Storage?
An object is the actual file stored inside a bucket.
It consists of data and metadata like name, size, and content type.
What is Persistent Disk?
Persistent Disk is block storage in GCP used with virtual machines.
It provides high performance and can be attached to Compute Engine instances.
It is commonly used for OS disks and application data.
Note: Persistent means data remains stored and available even after system restarts or failures.
Types of Persistent Disk?
- Standard (HDD) – cost-effective
- SSD – high performance
- Balanced – mix of cost and performance
What is a Service Account?
A service account is a special type of account used by applications or virtual machines to interact with GCP services.
Instead of using user credentials, applications use service accounts for secure and controlled access.
Permissions are assigned using IAM roles.
What is Auto Scaling?
Auto scaling automatically increases or decreases the number of VM instances based on load.
It helps maintain performance during high traffic and reduces cost during low usage.
It is commonly used with managed instance groups.
What is a Managed Instance Group (MIG)?
A Managed Instance Group is a group of identical VMs managed as a single unit.
It supports auto scaling, auto healing, and load balancing.
It ensures high availability by automatically replacing unhealthy instances.
What is Load Balancing in GCP?
Load balancing distributes incoming traffic across multiple backend instances.
It improves availability and performance.
GCP provides global load balancing, which can route traffic to the nearest healthy instance.
What is Cloud NAT?
Cloud NAT allows private VMs to access the internet without assigning them public IP addresses.
It improves security by keeping instances private while still allowing outbound connectivity.
What is the difference between Public and Private IP?
A public IP is accessible over the internet, while a private IP is used for internal communication within a VPC.
Public IPs are used for external access, whereas private IPs enhance security for internal services.
What is a Subnet?
A subnet is a subdivision of a VPC network that defines a range of IP addresses.
In GCP, subnets are regional, meaning each subnet belongs to a specific region.
What is Preemptible VM?
A preemptible VM is a low-cost VM that can be terminated by GCP at any time, usually within 24 hours.
It is used for fault-tolerant and batch processing workloads.
What is Snapshot?
A snapshot is a backup of a disk at a specific point in time.
It is used for data recovery, migration, and backup purposes.
What is Cloud SQL?
Cloud SQL is a fully managed relational database service in GCP.
It supports MySQL, PostgreSQL, and SQL Server.
It handles backups, patching, and scaling automatically.
What is the difference between Cloud SQL and self-managed DB on VM?
In Cloud SQL, GCP manages backups, updates, and availability.
In a self-managed DB on a VM, we are responsible for maintenance, patching, and scaling.
Cloud SQL reduces operational overhead.
What is Pub/Sub?
Pub/Sub is a messaging service used for asynchronous communication between services.
It follows a publisher-subscriber model, where messages are sent to topics and consumed by subscribers.
What is Cloud Logging?
Cloud Logging is used to collect and analyze logs from GCP services and applications.
It helps in troubleshooting and monitoring system behavior.
What is CIDR?
CIDR (Classless Inter-Domain Routing) is a method for defining IP ranges.
For example, 10.0.0.0/24 means 256 IP addresses.
It is used in subnetting and network planning.
Difference between Stateful and Stateless apps?
Stateless applications do not store session data and can scale easily.
Stateful applications store session data and require careful handling for scaling and failover.
Comments
Post a Comment