Google Interview Questions
Strong emphasis on distributed systems, scalability, and Java concurrency. System design interviews are particularly in-depth.
#1Explain the SOLID principles.
#2How does HashMap work internally?
#3What is the difference between HashMap and ConcurrentHashMap?
#4Explain Java Memory Model: Heap, Stack, and Metaspace.
#5What is the volatile keyword in Java?
#6What is the difference between synchronized and ReentrantLock?
#7What is a deadlock and how do you prevent it?
#8Explain the Stream API and intermediate vs terminal operations.
#9What is garbage collection? How does G1 differ from ZGC?
#10What is the Java ClassLoader hierarchy?
#11What are Java records (Java 16+)?
#12What is the Executor framework and when would you use it over raw Threads?
#13What is the difference between composition and inheritance?
#14What is a marker interface? Give examples.
#15What are the design patterns most commonly asked in Java interviews?
#16How do you implement a Singleton in Java correctly?
#17What is the contract between equals() and hashCode()?
#18What is the difference between fail-fast and fail-safe iterators?
#19What is CopyOnWriteArrayList and when should you use it?
#20How does PriorityQueue work and when would you use it?
#21What is the happens-before relationship in Java Memory Model?
#22What is the difference between sleep(), wait(), and yield()?
#23What are atomic classes (AtomicInteger, AtomicReference)? How do they work?
#24What is a CountDownLatch vs CyclicBarrier?
#25What is a ThreadLocal and what are its dangers?
#26What is a CompletableFuture and how does it improve async programming?
#27What are virtual threads (Project Loom, Java 21)?
#28How does the JIT (Just-In-Time) compiler work?
#29What is the difference between minor GC, major GC, and full GC?
#30What tools do you use to diagnose JVM memory issues?
#31What is the String pool and how does string interning work?
#32What is type erasure in Java generics?
#33What is the difference between <? extends T> and <? super T>?
#34What are sealed classes (Java 17)?
#35What is pattern matching for instanceof (Java 16)?
#36What is the difference between map() and flatMap() in streams?
#37What is the difference between Comparable and Comparator?
#38What is Stream.collect() and what are common Collectors?
#39What is try-with-resources and how does it work?
#40What is exception chaining and why is it important?
#41What is the difference between Java IO and NIO?
#42What is Java Serialization and what are its pitfalls?
#43What is reflection in Java and when is it used?
#44What is the difference between deep copy and shallow copy?
#45What is autoboxing and unboxing? What are the performance implications?
#46What are enums in Java and what advanced features do they support?
#47What is the difference between static and instance initializer blocks?
#48What are Java modules (Java 9 — JPMS)?
#49What is the difference between an inner class, static nested class, and anonymous class?
#50What are the new switch expressions (Java 14)?
#51What is the difference between Runnable, Callable, and Future?
#52How do you handle NullPointerException in Java?
#53What is the difference between Deque and Queue?
#54What is a WeakHashMap and when would you use it?
#55What is the difference between checked and unchecked exceptions — best practices for APIs?
#56What is the difference between interface default methods and abstract class methods?
#57What are the best practices for writing clean Java code?
#58What is a race condition and how do you prevent it?
#59What is the difference between HashMap.computeIfAbsent() and getOrDefault()?
#60What is the purpose of the transient keyword?
#61What is method hiding in Java?
#62What are the Java 8 Date/Time APIs and why were they introduced?
#63What is the difference between HashMap.put() and HashMap.putIfAbsent()?
#64What is an immutable class and how do you create one?
#65What is the covariant return type in Java?
#66What is the difference between Predicate.and(), Predicate.or(), and Predicate.negate()?
#67What is the Observer pattern and how is it implemented in Java?
#68What is the Strategy pattern in Java?
#69What is String.intern() and when should you use it?
#70What are the key differences between Java 8, 11, 17, and 21?
#71Explain the CAP theorem.
#72What is consistent hashing and why is it used?
#73What is database sharding and how does it work?
#74Explain cache invalidation strategies.
#75How would you design a URL shortener (like bit.ly)?
#76What is the Saga pattern in microservices?
#77What is CQRS and when should you use it?
#78What are rate limiting algorithms?
#79What is the Circuit Breaker pattern?
#80How do you design for high availability?
#81What is eventual consistency?
#82What is a message queue and when should you use one?
#83What is the difference between SQL and NoSQL databases?
#84How do you handle distributed transactions without 2PC?
#85How would you design a notification system (push, email, SMS)?
#86What is the difference between REST and gRPC?
#87What is the Outbox Pattern?
#88How do you design a distributed cache layer?
#89What is the difference between synchronous and asynchronous communication in microservices?
#90How do you design a notification system that sends 100M notifications per day?
#91What are the different types of database indexes and when do you use each?
#92How would you design a URL shortener like bit.ly?
#93What is eventual consistency and how do you handle it in practice?
#94How do you design a search system at scale?
#95What is the difference between optimistic and pessimistic locking?
#96How would you design a real-time leaderboard?
#97What is a write-ahead log (WAL) and how is it used?
#98How do you handle distributed transactions across microservices?
#99How do you design a chat application like WhatsApp?
#100What is a service mesh and when should you use one?
#101How would you design a video streaming platform like YouTube?
#102What is the difference between a load balancer and an API gateway?
#103How do you prevent and handle cascading failures in distributed systems?
#104What is the difference between a message queue and a message broker?
#105How do you design a rate limiter for an API?
#106What is the difference between replication and partitioning in databases?
#107How would you design Twitter's news feed?
#108What is observability and what are its three pillars?
#109How do you implement idempotency in APIs?
#110How would you design a distributed job scheduler?
#111What is the Saga pattern vs 2PC for distributed transactions?
#112How do you design a file storage system like Dropbox?
#113What are the trade-offs of microservices vs monolithic architecture?
#114How does DNS work and how is it used in load balancing?
#115What is the strangler fig pattern?
#116How do you design an e-commerce inventory system that handles flash sales?
#117What is the difference between push and pull architectures for data?
#118How do you design a fraud detection system?
#119What is event sourcing and how does it differ from CRUD?
#120How would you design a geospatial service like Uber's nearby driver system?
#121What is API versioning and what are the different strategies?
#122What is a Bloom filter and where is it used in system design?
#123How do you implement zero-downtime deployments?
#124What is the two-generals problem and what does it tell us about distributed systems?
#125How do you design a payment processing system?
#126How would you design an autocomplete system?
#127What is backpressure and how do you handle it?
#128What is a time-series database and when should you use one?
#129What is a circuit breaker and how do you implement it?
#130How do you handle database migrations safely in production?
#131What is the CQRS pattern?
#132How do you secure an API at the architecture level?
#133What is the difference between synchronous replication and asynchronous replication?
#134How do you design a system for billions of events per day (analytics pipeline)?
#135What is chaos engineering and how do you implement it?
#136What is the database connection pool and how do you tune it?
#137How do you design an access control system?
#138How would you design an online code execution system like LeetCode?
#139How does the request flow work in a typical microservices architecture?
#140What is a hot partition problem and how do you solve it?
#141How do you design a multi-tenant SaaS architecture?
#142What is tail latency and why does it matter?
#143How do you design a global, low-latency key-value store?
#144What is the N+1 query problem and how do you fix it?
#145How would you design a booking system like Airbnb?
#146How do you design a recommendation system?
#147What is the read-your-own-writes consistency guarantee?
#148How do you design a search-as-you-type / typeahead feature?
#149What is the difference between gRPC unary, server streaming, client streaming, and bidirectional streaming?
#150How do you handle large file uploads efficiently?
#151What are the key considerations when designing for high write throughput?
#152What is the difference between monolithic and microservices deployment strategies?
#153How do you design for disaster recovery?
#154What is the thundering herd problem?
#155What is a vector clock and how does it work?
#156What is the difference between a monorepo and polyrepo?
#157How do you ensure data consistency across microservices?
#158What is the difference between a batch job and a stream processing job?
#159How do you design an API for mobile clients vs web clients?
#160What is the role of a message broker in event-driven architecture?
#161How do you approach capacity planning for a new system?
#162What is a consumer group and how does it enable parallelism?
#163Explain Kafka delivery semantics: at-most-once, at-least-once, and exactly-once.
#164How does Kafka ensure message ordering?
#165What are producer acknowledgment settings (acks)?
#166What is log compaction in Kafka?
#167What is Kafka Streams and when would you use it?
#168What is consumer lag and how do you monitor it?
#169How does Kafka differ from RabbitMQ?
#170What is the role of ZooKeeper / KRaft in Kafka?
#171How do you handle large messages in Kafka?
#172What is Kafka Connect?
#173How does Kafka replication work?
#174What is Schema Registry and why is it important?
#175What is the difference between Kafka and RabbitMQ?
#176How do you handle consumer group rebalancing?
#177What is Kafka Streams?
#178What are Kafka transactions and how do they work?
#179What is the difference between at-most-once, at-least-once, and exactly-once delivery?
#180How do you choose the right number of partitions for a Kafka topic?
#181What is KRaft mode in Kafka?
#182What is log compaction in Kafka?
#183How does Kafka handle backpressure?
#184What is the role of the Kafka controller?
#185What is the difference between Kafka producer acks=0, acks=1, and acks=all?
#186How do you monitor Kafka in production?
#187What is a Kafka consumer poll loop?
#188What are Kafka headers and how are they used?
#189What is the consumer group coordinator?
#190How do you implement idempotent consumers with Kafka?
#191What is Kafka's storage architecture?
#192What is consumer lag and how do you manage it?
#193What is the Kafka retention policy and how does it work?
#194How do you handle poison pill messages in Kafka?
#195What is Kafka MirrorMaker 2 and when do you use it?
#196How does Kafka achieve high throughput?
#197What is Kafka's ISR (In-Sync Replicas) and how does it affect durability?
#198What are Kafka Streams stateful operations?
#199What is the difference between Kafka Streams and Apache Flink?
#200How does Kafka handle message ordering?
#201What is Kafka's __consumer_offsets topic?
#202How do you implement a CDC pipeline with Kafka and Debezium?
#203What is the difference between push and pull in Kafka?
#204How do you perform a Kafka cluster rolling restart?
#205What is Kafka consumer group offset management?
#206What is Kafka's batch processing capability?
#207What is the relationship between Kafka partitions and consumers?
#208What is the Kafka producer buffer and how does it affect performance?
#209How does Kafka support exactly-once semantics end to end?
#210What is Kafka's message format / record format?
#211How does Kafka handle broker failure and partition recovery?
#212What is Kafka's wire protocol?
#213What are Kafka consumer interceptors?
#214How do you secure a Kafka cluster?
#215What is Kafka's log segment management?
#216How do you increase the throughput of a Kafka producer?
#217What is the Kafka AdminClient API?
#218What is tiered storage in Kafka?
#219How does Kafka handle time and event-time processing?
#220What is Kafka's producer idempotence?
#221What are the different Kafka message delivery patterns?
#222How do you tune Kafka for low latency?
#223What is Kafka's producer partitioner?
#224What is the Kafka Broker Rack Awareness?
#225How do you handle schema migrations in a Kafka event stream?
#226What are Kafka quotas and how do they work?
#227What is a Kafka topic compaction tombstone?
#228How do you implement a Kafka consumer with Spring Boot?
#229What is the Kafka offset commit semantics?
#230How do you benchmark a Kafka cluster?
#231What is the difference between Kafka and Apache Pulsar?
#232How do you implement a Kafka producer with Spring Boot?
#233What is a Kafka connector and how does it work?
#234What is the Kafka consumer fetch protocol?
#235What is Kafka consumer group rebalance protocol and incremental cooperative rebalancing?
#236What is the Kafka log cleaner and how does compaction work internally?
#237How do you debug Kafka consumer issues?
#238What is Kafka's min.insync.replicas and how does it interact with acks?
#239What is Apache Kafka's role in the data lakehouse architecture?
#240What is the Kafka log flush policy and how does it affect durability?
#241How do you implement a Saga with Kafka?
#242What is the difference between Kafka topic partitions and consumer group partitions?
#243What is Confluent's ksqlDB?
#244What is Kafka's message size limit and how do you handle large messages?
#245What are Kafka producer callbacks and how are they used?
#246How do you implement a Kafka multi-datacenter setup?
#247What is Kafka's leader epoch?
#248What is the high watermark in Kafka?
#249What is a Kafka consumer group's session timeout vs heartbeat interval?
#250What is a Kafka changelog topic in Kafka Streams?
#251What happens when a Kafka broker runs out of disk space?
#252What is Kafka's dynamic configuration and how do you update it?
#253What is the Kafka consumer seek API?
#254What is the difference between a Deployment and a StatefulSet?
#255What are the types of Kubernetes Services?
#256What are liveness and readiness probes?
#257How does Kubernetes autoscaling work?
#258What is RBAC in Kubernetes?
#259How does a rolling update work in Kubernetes?
#260What is a DaemonSet?
#261Explain PersistentVolume and PersistentVolumeClaim.
#262What is a Helm chart?
#263What is an Ingress and how does it differ from a LoadBalancer Service?
#264What are resource requests and limits in Kubernetes?
#265What are the Kubernetes control plane components?
#266What is etcd and why is it critical to Kubernetes?
#267How does the Kubernetes scheduler work?
#268What is a Kubernetes controller and the control loop?
#269What is kubelet and how does it work?
#270What is a CNI plugin and how does pod networking work?
#271What are Kubernetes Network Policies?
#272What are taints and tolerations in Kubernetes?
#273What is node affinity and pod affinity/anti-affinity?
#274What are Kubernetes Jobs and CronJobs?
#275What is a ServiceAccount and how is it used in Kubernetes?
#276What are admission controllers and admission webhooks?
#277What is a Custom Resource Definition (CRD)?
#278What is the Kubernetes Operator pattern?
#279What are Pod Security Standards?
#280How do you encrypt Kubernetes Secrets at rest?
#281What is cert-manager?
#282What is Istio service mesh and how does it work?
#283What is the Kubernetes Gateway API?
#284What is a PodDisruptionBudget (PDB)?
#285What are ResourceQuota and LimitRange?
#286How does Kubernetes DNS work?
#287What is KEDA (Kubernetes Event-Driven Autoscaling)?
#288How do you debug a pod in Pending state?
#289How do you debug a pod in CrashLoopBackOff?
#290What is the Cluster Autoscaler and how does it work?
#291What are init containers and sidecar containers?
#292What is GitOps and how does ArgoCD implement it?
#293What is a PriorityClass in Kubernetes?
#294How do you implement zero-downtime deployments in Kubernetes?
#295What is the Kubernetes API and how does kubectl work?
#296What are pod topology spread constraints?
#297How does Kubernetes persistent volume binding work?
#298What is the Container Storage Interface (CSI)?
#299How does kube-proxy implement service networking?
#300How do you scale with custom metrics using HPA?
#301How do you manage multi-environment Kubernetes configurations?
#302What are OPA Gatekeeper and Kyverno for Kubernetes policy?
#303What is pod preemption and priority scheduling?
#304How do you implement canary deployments in Kubernetes?
#305What is Flux for GitOps?
#306How does etcd backup and restore work?
#307What is the Kubernetes Vertical Pod Autoscaler (VPA)?
#308How do you implement multi-tenancy in Kubernetes?
#309What is the Kubernetes watch mechanism and informers?
#310What is eBPF and how does Cilium use it in Kubernetes?
#311How do you implement mTLS between services in Kubernetes?
#312What is Velero and how do you use it for Kubernetes backup?
#313How do you manage Kubernetes cluster upgrades?
#314What is Kubernetes workload identity (IRSA and Workload Identity)?
#315How do you set up Kubernetes observability with Prometheus Operator?
#316What is the External Secrets Operator?
#317How do you troubleshoot Kubernetes networking issues?
#318How does Kubernetes handle node pressure and pod eviction?
#319What are ephemeral containers in Kubernetes?
#320How do you implement Kubernetes network policies for zero-trust networking?
#321What is the Kubernetes Scheduler framework?
#322How do you implement secret rotation in Kubernetes?
#323What is the Kubernetes API aggregation layer?
#324How do you secure Kubernetes API server access?
#325What is a headless service and when do you use it?
#326What is a ValidatingWebhookConfiguration vs MutatingWebhookConfiguration?
#327How do you implement GitOps with multi-environment promotion?
#328How do you implement Kubernetes cluster-level logging?
#329What is a Kubernetes service account token projection?
#330How do you handle database connection pooling from Kubernetes pods?
#331What are advanced kubectl commands for debugging and operations?
#332What is multi-cluster Kubernetes management?
#333What is Kustomize and how does it work?
#334What is a Kubernetes Ingress controller and which one should you choose?
#335What is a Kubernetes StatefulSet in depth?
#336What is Kubernetes Cluster API?
#337What are Kubernetes finalizers and owner references?
#338How does Kubernetes implement resource quotas across teams?
#339What is a service topology and topology-aware routing?
#340What is Argo Workflows and how does it differ from CronJobs?
#341How do you implement cost optimization for Kubernetes clusters?
#342What is Kubernetes pod topology and high availability design?
#343What is Karpenter and how does it improve node provisioning?
#344How do you debug Kubernetes RBAC issues?
#345What is Progressive Delivery with Argo Rollouts?
#346What is a Kubernetes Service Mesh and do you always need one?
#347What are Kubernetes production best practices?