Company Round Scenarios
Real production-debugging and system-behavior scenarios asked in company-specific rounds — the 'your service is doing X in production, what do you check' questions that test judgment, not textbook recall.
Performance & Memory
Your Java service suddenly hits 100% CPU usage even though request volume hasn't changed and there are no errors in the logs. How do you debug it?
advancedProTests whether you know how to use thread dumps and profilers to find a runaway loop or lock contention that logs alone won't show.
Heap usage keeps growing even after a Full GC runs. What's happening and how do you investigate?
advancedProTests whether you know this is the classic signature of a memory leak — objects still reachable that shouldn't be — and how heap dump analysis finds it.
GC pauses are long even though the heap isn't full. What could be causing this, and which GC settings would you check first?
advancedProTests whether you know GC pause time depends on more than heap occupancy — fragmentation, GC algorithm choice, and region sizing matter too.
Your app ran fine for 30 days, then crashed with OutOfMemoryError. No code changes were deployed. What happened?
advancedProTests whether you know slow leaks (unbounded caches, listener leaks, ThreadLocal misuse) take time to surface and aren't tied to a deploy.
Your executor pool has 50 threads, but requests are queuing up and latency is climbing even though CPU usage is low. What's going on?
advancedProTests whether you know low CPU with high queuing usually points to threads blocked waiting on I/O, not a CPU bottleneck.
Microservices Fundamentals (Expert Round)
What is the difference between Microservices and SOA? When would you choose one over the other?
advancedProTests whether you know these aren't synonyms — coupling, communication protocols, and team ownership all differ.
How do you define microservice boundaries using Domain-Driven Design? Explain bounded contexts and anti-corruption layers.
expertProTests whether you know DDD is the actual discipline behind 'good service boundaries,' not just a buzzword to drop.
What are the twelve-factor app principles? Which ones are most critical specifically for microservices?
advancedProTests whether you know config, backing services, and stateless processes matter more than the rest for this architecture style.
What are the trade-offs of microservices vs monolith for a startup with only 5 engineers?
advancedProTests whether you can push back on premature decomposition instead of defaulting to microservices as automatically 'better.'
Spring Cloud (Expert Round)
Explain Spring Cloud Gateway vs Zuul 1. Why was Zuul 1 effectively deprecated in favor of Gateway?
advancedProTests whether you know blocking I/O versus a reactive Netty core is the real reason Gateway replaced Zuul 1.
Explain Feign client vs RestTemplate vs WebClient. When do you use each, thinking specifically about the thread model?
advancedProTests whether you connect the choice to blocking vs non-blocking behavior, not just API ergonomics.
Consistency & Transactions
You notice the same event is processed twice in your consumer, causing duplicate side effects. How do you fix this without breaking throughput?
advancedProTests whether you know how to design idempotent processing instead of trying to guarantee exactly-once delivery, which most brokers don't offer by default.
A user double-clicks the 'Submit' button, causing two identical orders to be created. How do you prevent this at the API level?
intermediateProTests whether you know how an idempotency key on the client request prevents duplicate processing server-side.
An API returns HTTP 200 but the data shown to the user is incorrect. Where would you start debugging?
advancedProTests whether you know to separate transport-layer success from application-layer correctness — caching, replication lag, or stale reads are common culprits.
You're designing a payment API that clients might retry after a timeout. How do you make sure a retried request never charges the customer twice?
advancedProTests whether you can actually design an idempotency-key mechanism end to end, not just name the pattern.
API Design (Expert Round)
Explain gRPC vs REST vs GraphQL. When would you specifically choose gRPC for inter-service communication?
advancedProTests whether you know binary Protobuf and HTTP/2 streaming pay off for low-latency internal service calls, not public APIs.
How do you design a pagination API that's cursor-based instead of offset-based, and why is cursor-based more stable?
advancedProTests whether you know cursor pagination stays correct even as rows are inserted or deleted mid-scroll.
What is contract testing with Pact? How does it differ from full integration testing?
advancedProTests whether you know consumer-driven contracts let services deploy independently without a shared integration environment.
Microservice Design
One microservice failure is impacting others across your system, and requests everywhere are timing out. How do you isolate it and prevent cascading failure in the future?
advancedProTests whether you know circuit breakers, timeouts, and bulkheads are what actually stop one slow dependency from taking down everything downstream.
Your circuit breaker exists, but it isn't tripping fast enough and requests keep piling up before it opens. What would you check in its configuration?
advancedProTests whether you know how failure-rate threshold, sliding window size, and slow-call-duration settings actually control breaker sensitivity.
You're trying to debug a slow request that spans five microservices, but you have no way to connect the logs across services. How do you fix this going forward?
advancedProTests whether you know how a propagated correlation/trace ID and distributed tracing (Zipkin, Jaeger) turn this into a solvable problem.
Kafka & Messaging (Expert Round)
What triggers a Kafka consumer group rebalance, and how do you minimize the disruption using cooperative rebalancing or static membership?
expertProTests whether you know modern Kafka has real tools to avoid the classic stop-the-world rebalance pain.
What are RabbitMQ's exchange types? How does a topic exchange differ from a direct exchange?
advancedProTests whether you know exact-match routing versus wildcard-pattern routing versus broadcast, and when each fits.
How do you ensure message idempotency in an event-driven system using an event ID deduplication table?
advancedProTests whether you know a persisted 'already processed' record is what actually makes a handler safe to call twice.
Scale & Rate Limiting
50,000 users log in at the same second right after a popular cache key expires, and your database gets hammered. What is this called and how do you prevent it?
advancedProTests whether you know this is a cache avalanche/stampede, and can name real mitigations like jittered TTLs or request coalescing.
Your Redis cluster has plenty of overall capacity, but one specific key is overloading a single shard. How do you fix this?
advancedProTests whether you know a hot key can bottleneck a cluster regardless of total capacity, and how local caching or key splitting helps.
You need to rate-limit an API both per-user and per-IP, at scale, across multiple instances. How do you implement it?
advancedProTests whether you know why a distributed counter (like Redis-backed) is needed instead of an in-memory counter on each instance.
Deployment & Operations
Right after a deployment, your database connection pool is exhausted instantly and new requests start failing. What would you check?
advancedProTests whether you know to check for connection leaks (unclosed connections), a misconfigured pool size, or a sudden spike in concurrent traffic post-deploy.
How do you identify and fix an N+1 query problem in Hibernate that's only showing up in production, not in your local tests?
intermediateProTests whether you know how to spot N+1 via SQL logging or an APM tool, and fix it with fetch joins or EntityGraph.
Consumer lag keeps growing in your Kafka pipeline, but CPU usage on the consumer is low. What could be the bottleneck?
advancedProTests whether you know low CPU with rising lag usually points to a slow downstream call inside the consumer, not a compute-bound processing loop.
A single malformed message is crashing your Kafka consumer every time it retries and re-reads the same message. How do you handle this poison pill?
advancedProTests whether you know to route unprocessable messages to a dead-letter topic instead of blocking the whole partition indefinitely.
During a Kafka partition rebalance, you notice some messages get processed more than once. Why does this happen and how do you handle it?
advancedProTests whether you know rebalances can reassign a partition before an offset commit lands, and why consumer-side idempotency is the real fix.
After a blue-green deployment, old instances are still serving some traffic. What would cause this and how do you fix it?
advancedProTests whether you know to check load balancer deregistration delay, DNS caching, and connection draining settings.
Half your pods are running the new version and half are still on the old version, well after a rollout should have finished. What would you check?
advancedProTests whether you know to check rollout status, readiness probes, and whether the deployment is stuck on a failing pod.
How do you reload configuration in a running Spring Boot service without restarting it?
intermediateProTests whether you know about @RefreshScope and Spring Cloud Bus for propagating config changes to live instances.
Your Maven build takes 4-10 minutes in CI but is much faster locally. Why might that be, and how would you speed it up?
intermediateProTests whether you know to check for missing dependency caching, network-bound repository access, and parallel build configuration in CI.
Data Management (Expert Round)
How do you implement distributed locking across microservices using Redis, and what is a fencing token for?
expertProTests whether you know a naive lock can still let a stale, slow process act after losing the lock — fencing tokens close that gap.
How do you calculate the optimal database connection pool size for a microservice using Little's Law?
expertProTests whether you know there's an actual formula behind pool sizing, not just picking a round number and hoping.
How would you implement multi-tenancy in a microservice? Compare schema-per-tenant vs row-level isolation.
expertProTests whether you know the isolation-strength versus operational-complexity tradeoff between the two approaches.
How do you implement CQRS read model synchronization using Debezium CDC?
expertProTests whether you know CDC lets you build a denormalized read store without touching the write-side service's code at all.
How do you manage database credential rotation in microservices without any downtime?
expertProTests whether you know dual credentials and a gradual rollover are what make rotation invisible to running traffic.
Security (Expert Round)
How does JWT validation work in a Spring Security microservice? What are common JWT attack vectors like alg=none and key confusion?
expertProTests whether you know real JWT vulnerabilities beyond 'just check the signature.'
How do you prevent SSRF attacks in a microservice that fetches external URLs on a user's behalf?
expertProTests whether you know to allowlist domains and specifically block internal metadata IP ranges like 169.254.x.x.
How do you implement service-to-service mTLS in a Kubernetes cluster?
expertProTests whether you know Istio or Linkerd can automate certificate exchange and rotation instead of hand-rolling it per service.
What is the OWASP API Security Top 10? Which risks are most critical specifically for microservices?
advancedProTests whether you know Broken Object Level Authorization and Excessive Data Exposure are the two most common real-world findings.
How do you implement API key management for a public-facing microservices platform?
advancedProTests whether you know keys should be hashed at rest, prefixed for fast lookup, and support rotation and per-key rate limiting.
System Failures & Latency
Your API gateway logs show random 500s, but the backend services all report healthy. Where do you look next?
advancedProTests whether you know to check gateway-level timeouts, connection pool limits, and TLS/handshake issues that never reach the backend's own logs.
A REST API is returning inconsistent responses for the same request — how will you debug it?
advancedProTests whether you know to suspect load-balanced instances serving stale data, race conditions, or a caching layer with inconsistent state.
A query that runs fine in staging is slow in production with real data volume. How will you optimize it?
advancedProTests whether you know to check the execution plan, missing indexes, and whether staging data volume was too small to expose the problem.
A Docker container keeps crashing shortly after starting in production. How will you debug it?
advancedProTests whether you know to check container logs, exit codes, resource limits (OOMKilled), and health check configuration.
Resilience (Expert Round)
Explain the Bulkhead pattern's two implementations — thread pool isolation vs semaphore isolation. What's the tradeoff?
expertProTests whether you know thread pool isolation gives stronger isolation at higher resource cost than semaphore-based limiting.
What is retry with exponential backoff and jitter? Why is jitter specifically important?
advancedProTests whether you know jitter is what prevents every client from retrying in lockstep and re-creating the thundering herd.
What is chaos engineering, and how would you apply it to actually test resilience patterns in production?
expertProTests whether you know the point is deliberately injecting failure to verify circuit breakers and fallbacks actually work, not just exist.
What is the difference between fail-fast and fail-safe patterns in a resilient system?
advancedProTests whether you know one throws immediately (open circuit) while the other silently returns a default value — different failure philosophies.
Observability (Expert Round)
Explain the difference between the RED method and the USE method for metrics.
advancedProTests whether you know RED is request-oriented (Rate/Errors/Duration) while USE is resource-oriented (Utilization/Saturation/Errors).
What is OpenTelemetry? How does it differ from Spring Cloud Sleuth?
expertProTests whether you know OTEL is the vendor-neutral standard that replaced Sleuth starting in Spring Boot 3.
How do you set up alerting for SLO violations in a microservices system using burn-rate alerts?
expertProTests whether you know multi-window burn-rate alerting catches real problems faster than a single static threshold alert.
How do you debug a performance issue in production microservices that you cannot reproduce locally?
expertProTests whether you know async profilers, JFR, and sampled distributed traces are the real tools for this exact situation.
Kubernetes Deployment (Expert Round)
What is the difference between Deployment, StatefulSet, and DaemonSet in Kubernetes?
advancedProTests whether you know which workload shape (stateless, ordered/stable identity, one-per-node) each object type is built for.
What is HPA vs VPA vs KEDA? When would you use KEDA over standard HPA?
expertProTests whether you know KEDA scales on external event sources (like Kafka lag) that HPA's CPU/memory metrics can't see.
How do you configure resource requests and limits for a Java microservice pod, accounting for heap, off-heap, and metaspace?
expertProTests whether you know a JVM's real memory footprint is bigger than just -Xmx, and getting this wrong causes OOMKilled or CPU throttling.
How do you implement zero-downtime rolling updates for a stateful Java microservice?
expertProTests whether you know PodDisruptionBudget, readiness gates, and backward-compatible DB migrations all need to align.
Performance & Scalability (Expert Round)
Explain Virtual Threads (Project Loom) and their impact on microservice throughput.
expertProTests whether you know how eliminating the thread-per-request ceiling changes what's actually achievable at scale.
What is backpressure, and how do you implement it in a reactive Spring WebFlux service?
advancedProTests whether you know limitRate() and the onBackpressure operators exist specifically to protect a slow consumer.
How do you optimize a Spring Boot microservice's cold start time for serverless deployment?
expertProTests whether you know GraalVM native images and CRaC are the real levers, not just 'use a smaller JAR.'
Testing (Expert Round)
Explain the Test Pyramid for microservices — what types of tests live at each layer, and why avoid the 'ice cream cone' anti-pattern?
advancedProTests whether you know unit tests should dominate by volume, with fewer integration and even fewer end-to-end tests above them.
What is Testcontainers, and how do you use it for realistic database integration tests?
advancedProTests whether you know spinning up a real containerized database beats mocking the persistence layer for genuine confidence.
Explain mutation testing. How does it differ from code coverage as a quality signal?
expertProTests whether you know high coverage can still hide weak assertions, and mutation testing is what actually catches that.
Advanced System Design (Expert Round)
How would you design an audit log system for compliance across all microservices in an organization?
expertProTests whether you know an immutable, append-only store with correlation IDs is what makes an audit trail actually trustworthy.
Explain how you would migrate a shared database used by 3 services into a database-per-service architecture.
expertProTests whether you know this needs a strangler-fig approach with an anti-corruption layer, not a risky one-shot cutover.
How do you implement multi-region failover for a critical microservice — active-active vs active-passive?
expertProTests whether you know active-active needs conflict resolution while active-passive trades that complexity for slower failover.
You inherit a monolith with no tests and 500,000 lines of code. How do you start decomposing it into microservices?
expertProTests whether you know to add characterization tests and extract leaf domains first, rather than attempting a risky big-bang rewrite.
Design a distributed configuration management system for 50+ microservices.
expertProTests whether you can combine a Git-backed config server, environment overlays, and secret management into one coherent design.
Real Company Rounds
Flipkart Big Billion Day: inventory shows 1 unit left for an iPhone, and 10,000 users click Buy simultaneously. What happens, and how do you fix it with Redis DECR and Kafka buffering?
expertProA real Flipkart interview scenario testing whether you can design atomic inventory control under extreme concurrent load.
Design a Flash Sale system for 10 million users hitting Buy on one product at exactly 12:00:00 — cover overselling prevention, DB protection, and idempotency.
expertProA real Walmart interview scenario testing whether you can combine four separate fixes into one coherent architecture.
You design a Rate Limiter backed by Redis, but Redis becomes a single point of failure — if it stalls, the whole API stalls. How do you fix this, and would you fail open or fail closed?
expertProA real Walmart interview scenario testing whether you've thought through what happens when your own fix becomes the new bottleneck.
Compare cache penetration, cache breakdown (hot key expiry), and cache avalanche — three distinct ways a cache layer can fail under load.
advancedProA real Walmart interview deep-dive testing whether you can distinguish three commonly-confused caching failure modes and fix each correctly.
Your Spring Boot service works perfectly in development but crashes every night at exactly 2am in production. Walk through how you'd debug it.
expertProTests whether you connect the fixed time to a scheduled job or resource leak, and know the JVM-metrics-then-heap-dump investigation order.
PayPal SE-3 online screening: solve 'Max Tasks That Can Be Completed in a Given Budget' — a greedy/DP optimization problem.
advancedProA real PayPal coding-round question testing whether you can recognize and implement a budget-constrained optimization pattern.
Google SDE-2 phone screen: optimize a graph traversal to reduce space complexity from O(N) to O(1) while maintaining time efficiency.
expertProA real Google interview question testing whether you can trade off between recomputation and storage under a tight space constraint.
Google onsite: design a data structure that manages elements ordered by two criteria (a fixed numeric range and a temporal value) with O(1) insertion and retrieval of the minimum element.
expertProA real Google data-structure-design round testing whether you know bucket sort variations solve this cleanly.
PhonePe system design round: design a UPI-style payment service — what are the core consistency and idempotency requirements?
expertProA real PhonePe interview question testing whether you can design for financial correctness under partial failure.
Atlassian system design round: design a project management tool like Jira, covering issues, boards, and workflows.
expertProA real Atlassian interview question testing whether you can model a highly configurable, permission-heavy domain at scale.
Accenture Senior SE round: can HashMap keys be mutable? Why or why not, and what breaks if they are?
advancedProA real Accenture interview question that looks simple but tests genuine understanding of hashing internals.
TCS/Infosys/JPMorgan round: How does @Transactional actually work internally — proxy creation, self-invocation pitfall, wrong exception type, wrong propagation. Walk through all three failure modes.
expertProOne of the most commonly asked service-based-company questions — tests whether you understand the proxy mechanism, not just the annotation's existence.
Walmart Senior SE round: explain the internal difference between HashMap and ConcurrentHashMap — what specifically makes the concurrent version thread-safe without locking the whole structure?
expertProTests whether you can go beyond 'one is thread-safe' into the actual locking/CAS mechanism that makes it so.