Spring Boot & Microservices
Spring Boot core, dependency injection, REST APIs, JPA/Hibernate, transactions, Spring Security, and the microservices patterns — service discovery, API gateway, resilience, messaging — that hold a distributed system together.
Spring Boot Core
What is Spring Boot and how is it different from the Spring Framework?
beginnerProTests whether you know Spring Boot is an opinionated, auto-configured layer on top of Spring, not a replacement for it.
What does @SpringBootApplication do? What 3 annotations does it combine?
beginnerProTests whether you know this one annotation is really @Configuration + @EnableAutoConfiguration + @ComponentScan bundled together.
What is Spring Actuator? Name 5 important endpoints it exposes.
intermediateProTests whether you know how to expose health, metrics, and diagnostic data for a production Spring Boot application.
How does Spring Boot handle multiple environments (dev, QA, prod) using profiles?
intermediateProTests whether you know how to structure environment-specific configuration cleanly using @Profile and profile-specific property files.
HikariCP & Connection Pool
What are the key HikariCP configuration properties — maximumPoolSize, minimumIdle, connectionTimeout, idleTimeout, maxLifetime — and what happens if each is misconfigured?
advancedProTests whether you actually understand what each pool setting controls, not just that HikariCP exists.
How do you troubleshoot HikariCP connection pool exhaustion in production?
advancedProTests whether you know to check for connection leaks, undersized pools, and long-running queries holding connections.
How do you detect connection pool leaks in production before they exhaust the pool entirely?
advancedProTests whether you know HikariCP's leakDetectionThreshold setting and how to act on the warnings it logs.
What is the difference between connectionTimeout and socketTimeout in HikariCP?
advancedProTests whether you know one bounds waiting for a pooled connection and the other bounds waiting for the database itself to respond.
How do you size your database connection pool correctly for a given workload?
advancedProTests whether you know the counterintuitive rule that a smaller, correctly-sized pool often outperforms a large one.
Why should you never hold a database connection open while making an external API call?
advancedProTests whether you know a slow downstream call while holding a pooled connection can exhaust the whole pool for every other request.
Dependency Injection & Core
What is Dependency Injection? What are the 3 types in Spring?
beginnerProTests whether you know constructor, setter, and field injection, and can explain the core DI concept itself.
What is the difference between @Component, @Service, @Repository, and @Controller?
beginnerProTests whether you know these are semantically distinct despite all being stereotypes of @Component under the hood.
What is the difference between constructor injection and field injection? Which is preferred?
intermediateProTests whether you know why constructor injection is the recommended default for immutability and testability.
What is the Bean lifecycle in Spring? Explain all phases.
intermediateProTests whether you can trace a bean from instantiation through initialization callbacks to destruction.
What is circular dependency in Spring? How do you resolve it?
advancedProTests whether you understand Spring's three-level cache trick for singletons, and why constructor injection can't use it.
Spring MVC vs WebFlux vs Virtual Threads
Spring MVC vs WebFlux vs Java Virtual Threads — when would you choose each?
advancedProTests whether you understand the actual tradeoffs instead of defaulting to 'reactive is always better.'
What is the fundamental difference between the thread-per-request model and the reactive model?
advancedProTests whether you know one thread blocks per request while the other multiplexes many requests over a few threads via callbacks.
What is backpressure in reactive streams and why does it matter?
advancedProTests whether you know a fast producer can overwhelm a slow consumer without an explicit mechanism to signal capacity back upstream.
Can you mix blocking code inside a WebFlux pipeline? What happens if you do?
advancedProTests whether you know a single blocking call can stall an entire event-loop thread serving many other requests.
When should you NOT use Virtual Threads — what are their limitations?
advancedProTests whether you know CPU-bound work and code with synchronized blocks don't benefit the way I/O-bound work does.
What is Mono vs Flux in Project Reactor?
advancedProTests whether you know the distinction between a zero-or-one-element stream and a multi-element async stream.
How do you handle errors in a reactive pipeline — onErrorReturn, onErrorResume, retry?
advancedProTests whether you know when to substitute a fallback value versus swap in a whole fallback publisher versus simply retry.
REST API Development
What is the difference between @Controller and @RestController?
beginnerProTests whether you know @RestController implicitly adds @ResponseBody to every handler method.
How do you return proper HTTP status codes in Spring Boot? Explain ResponseEntity.
intermediateProTests whether you know how to control status codes, headers, and body together instead of always returning 200.
How do you handle global exceptions in Spring Boot? Explain @ControllerAdvice.
intermediateProTests whether you know how to centralize error handling instead of wrapping every controller method in try-catch.
How do you implement pagination and sorting with Spring Data JPA?
intermediateProTests whether you know Pageable and Sort, and how to avoid returning an unbounded result set from an API.
Kafka: Producer, Consumer & Idempotency
How do you achieve Kafka producer idempotency and exactly-once processing?
advancedProTests whether you know enable.idempotence alone only prevents duplicate writes at the broker, not end-to-end exactly-once.
A database update succeeds, but publishing the corresponding Kafka event fails. How do you maintain consistency?
advancedProTests whether you know this is the classic dual-write problem, and that the Outbox Pattern is the real fix, not a retry loop.
What happens if a Kafka consumer processes a message successfully but crashes before committing the offset?
advancedProTests whether you know the message will be redelivered, which is exactly why consumer-side idempotency is non-negotiable.
Kafka consumer lag suddenly spikes in production. What do you check first?
advancedProTests whether you know to check for GC pauses freezing poll(), slow downstream calls in the consumer, or an actual rebalance loop.
One Kafka partition is overloaded while others sit idle. What could cause this?
advancedProTests whether you know a poorly chosen partition key (like a low-cardinality field) creates a hot partition.
Why do Kafka consumer groups keep rebalancing every few minutes, and how do you minimize the disruption?
advancedProTests whether you know session timeouts, slow processing exceeding max.poll.interval.ms, and static membership all factor in.
You have 10 consumers in a group but only 3 Kafka partitions. How many consumers actually process messages?
intermediateProTests whether you know partition count is a hard ceiling on consumer parallelism within a group — the extra 7 sit idle.
A Kafka message reaches the Dead Letter Topic. How do you safely reprocess it after fixing the underlying issue?
advancedProTests whether you know to replay from the DLT deliberately rather than just deleting and hoping the source retries.
What is enable.auto.commit=false and why do senior engineers prefer it over the default?
advancedProTests whether you know manual commit lets you commit only after successful processing, avoiding silent message loss.
How do you implement a transactional Kafka producer in Spring Boot for exactly-once semantics?
advancedProTests whether you know transactional.id and KafkaTransactionManager, and what read_committed means for downstream consumers.
What is the significance of max.poll.records and max.poll.interval.ms in preventing consumer rebalancing?
advancedProTests whether you know a slow batch that exceeds max.poll.interval.ms triggers a rebalance even though the consumer is still alive.
A payment service's Kafka consumer lag jumps from 500 to 2 million messages in 30 minutes with unchanged producer throughput, and your SLA requires 5-second processing. How do you diagnose and fix it?
advancedProTests whether you can reason through a real high-stakes production incident, not just recite the theory around lag.
Design exactly-once semantics for a fund-transfer payment microservice — no double debit, no lost credit.
expertProTests whether you can combine idempotent producers, Kafka transactions, and a transactional outbox into one coherent design.
JPA Basics
What is JPA? How is it different from Hibernate?
beginnerProTests whether you know JPA is a specification and Hibernate is one implementation of it, among others.
What is an Entity in JPA? Explain @Entity, @Table, @Id, @Column.
beginnerProTests whether you know the basic annotations that map a Java class onto a database table.
What is JpaRepository? How does it differ from CrudRepository?
beginnerProTests whether you know the extra JPA-specific and pagination/sorting capabilities JpaRepository adds on top.
What are derived query methods in Spring Data JPA? Give 5 examples.
intermediateProTests whether you know how Spring Data JPA generates SQL just from a method name's naming convention.
JPA Relationships & Mapping
Explain @OneToOne, @OneToMany, @ManyToOne, and @ManyToMany with examples.
beginnerProTests whether you can correctly model and annotate all four core JPA relationship types.
What is the owning side of a relationship? What does mappedBy mean?
intermediateProTests whether you know which side of a bidirectional relationship actually controls the foreign key column.
How do you handle the N+1 problem in JPA?
advancedProOne of the most common Spring/JPA production bugs — tests whether you know how to spot and fix it with fetch joins or EntityGraph.
What is FetchType.LAZY vs FetchType.EAGER? Which should you prefer and why?
intermediateProTests whether you know why lazy loading is the safer default and what breaks when you get it wrong (LazyInitializationException).
Hibernate Internals
What are the different entity states in Hibernate: Transient, Persistent, Detached, Removed?
intermediateProTests whether you know how Hibernate tracks an entity's lifecycle relative to the persistence context.
What is the First-Level Cache in Hibernate? Can you disable it?
intermediateProTests whether you know the session-scoped cache is mandatory and always on, unlike the optional second-level cache.
What is the Second-Level Cache? How do you configure it with EhCache?
advancedProTests whether you know how to share cached entities across sessions and the staleness risk that comes with it.
What is dirty checking in Hibernate? How does it work automatically?
intermediateProTests whether you know Hibernate auto-detects field changes on a managed entity and flushes UPDATE statements without an explicit save call.
What is the difference between session.get() and session.load()?
intermediateProTests whether you know one returns null and the other a lazy proxy when the record doesn't exist.
Redis & Caching
How do you prevent a cache stampede when using Spring's @Cacheable annotation?
advancedProTests whether you know @Cacheable alone doesn't coalesce concurrent misses, and what actually does (locking, soft TTL).
Redis is down. Should your application also go down? How would you design the fallback?
advancedProTests whether you know caching should degrade gracefully to the database, not become a hard dependency that takes down the app.
How would you solve the cache invalidation problem when multiple service instances are running?
advancedProTests whether you know local in-memory caches need a coordination mechanism (pub/sub or shared cache) to stay consistent across instances.
What are the different Redis eviction policies and when would you choose each?
advancedProTests whether you know the tradeoffs between allkeys-lru, volatile-lru, allkeys-lfu, and the noeviction default.
How do you implement distributed locking using Redis — SETNX vs Redisson?
advancedProTests whether you know the difference between a raw atomic SETNX-with-TTL lock and a library that handles renewal and edge cases for you.
What is the problem with a distributed lock expiring before the job holding it completes?
advancedProTests whether you know a second process can acquire the 'freed' lock while the first is still working, causing double-processing.
What is a Redis pipeline and how does it improve performance?
advancedProTests whether you know batching commands avoids paying a network round trip for every single Redis call.
What is the difference between Redis Cluster and Redis Sentinel?
advancedProTests whether you know one shards data across nodes for scale while the other provides high availability via failover for a single dataset.
How do you handle cache warming after a deployment or Redis restart to avoid a cold-cache traffic spike hitting the database?
advancedProTests whether you know to proactively pre-populate hot keys instead of letting production traffic discover the cold cache.
What is cache penetration — requests for keys that don't exist, each falling through to the database? How do you fix it with a Bloom Filter?
advancedProTests whether you know a Bloom Filter can cheaply reject requests for keys that provably don't exist, before they ever reach the DB.
After enabling caching, your database load drops as expected, but memory usage keeps climbing. What might be wrong?
advancedProTests whether you know unbounded cache growth (no TTL, no max size) silently turns a cache into a memory leak.
Transactions & Concurrency
What is @Transactional? Where can you apply it — class vs method level?
beginnerProTests whether you know the basics of Spring's declarative transaction management and its annotation scope rules.
What are transaction propagation types? Explain REQUIRED, REQUIRES_NEW, NESTED.
intermediateProTests whether you know how nested @Transactional calls decide whether to join, suspend, or start a new transaction.
What is transaction isolation? Explain the 4 isolation levels.
intermediateProTests whether you know how READ_UNCOMMITTED through SERIALIZABLE trade off consistency against concurrency.
When does @Transactional NOT work? Give 3 common pitfalls.
advancedProOne of the most-asked Spring gotchas — tests whether you know self-invocation, private methods, and proxy limitations break it silently.
What is optimistic locking in JPA? How do you implement it with @Version?
advancedProTests whether you know how version-column-based conflict detection avoids holding a database lock for the whole transaction.
Spring Security
How does Spring Security's filter chain work?
intermediateProTests whether you know a request passes through an ordered chain of filters before ever reaching your controller.
What is JWT? How do you implement JWT-based authentication in Spring Boot?
intermediateProTests whether you know how a stateless, signed token replaces server-side session storage for authentication.
What is @PreAuthorize and @Secured? What is the difference?
intermediateProTests whether you know @PreAuthorize supports full SpEL expressions while @Secured only supports simple role checks.
What is CSRF protection? When should you disable it?
intermediateProTests whether you know why CSRF matters for browser sessions but is usually irrelevant for stateless token-based APIs.
Caching, AOP & Testing
What is Spring Cache? How do you enable it with @EnableCaching?
beginnerProTests whether you know the basics of Spring's caching abstraction layer over providers like EhCache or Redis.
What is the difference between @Cacheable, @CacheEvict, and @CachePut?
intermediateProTests whether you know when to read from cache, remove from cache, or always update the cache regardless of a hit.
What is AOP? What problems does it solve?
beginnerProTests whether you know how aspect-oriented programming pulls cross-cutting concerns like logging and security out of business logic.
Distributed Transactions & Saga
What is the Two-Phase Commit (2PC) protocol and why is it not recommended for microservices?
advancedProTests whether you know 2PC's blocking coordinator model doesn't scale and creates a single point of failure across services.
When would you use the Saga pattern, and how would you handle a compensation transaction that itself fails?
advancedProTests whether you've thought past the happy path — what happens when the undo step doesn't work either.
Payment succeeds, but the Order Service crashes right after. How do you recover safely without losing money or the order?
advancedProTests whether you can reason through a concrete Saga recovery scenario, not just define the pattern abstractly.
How do you achieve exactly-once business processing on top of an at-least-once messaging system?
expertProTests whether you know the trick isn't stopping duplicates from arriving — it's making processing idempotent so duplicates are harmless.
What is the dual-write problem in microservices, and how does the Outbox Pattern solve it?
advancedProTests whether you know writing to a DB and publishing an event are two separate operations that can't be made atomic without help.
How does the Transactional Outbox Pattern work with Debezium or Change Data Capture (CDC)?
advancedProTests whether you know CDC tails the database's own write-ahead log to publish outbox rows, instead of a fragile polling loop.
How do you handle outbox table growth in a high-throughput system?
advancedProTests whether you know to prune published rows and index the table correctly so it doesn't become its own bottleneck.
What is eventual consistency, and how would you explain it to a non-technical business stakeholder?
advancedProTests whether you can translate a technical consistency model into a concrete business-facing tradeoff.
How do you test distributed transactions in a microservices architecture?
advancedProTests whether you know this needs dedicated integration environments and event-assertion tooling, not just unit tests per service.
What is the difference between the Outbox Pattern and the Saga Pattern — are they complementary or competing?
advancedProTests whether you know Outbox solves reliable event publishing while Saga solves multi-step business transaction coordination — they're often used together.
How do you implement the Inbox Pattern for idempotent message consumption?
advancedProTests whether you know tracking processed message IDs in a dedicated table is the consumer-side mirror of the Outbox Pattern.
Microservices Architecture
What is microservices architecture? How does it differ from monolithic architecture?
beginnerProTests whether you can explain the tradeoffs, not just the buzzword — independent deployability versus operational simplicity.
What is the Database-per-Service pattern? Why is it important?
intermediateProTests whether you understand why sharing one database across services quietly turns microservices back into a distributed monolith.
What is the Strangler Fig pattern? How do you migrate from monolith to microservices?
intermediateProTests whether you know how to incrementally carve services out of a monolith without a risky big-bang rewrite.
Service Discovery (Eureka)
What is service discovery? Why is it needed in microservices?
beginnerProTests whether you understand why hardcoded service IPs break down once instances scale and move dynamically.
What is Eureka Server? How do microservices register with it?
beginnerProTests whether you know the registration and heartbeat mechanism behind Netflix Eureka.
What is the difference between client-side and server-side service discovery?
intermediateProTests whether you know who's responsible for load-balancing the lookup result — the calling client or an intermediary.
API Gateway
What is an API Gateway? What responsibilities does it have?
beginnerProTests whether you know the gateway's role in routing, auth, rate limiting, and shielding internal services from clients.
How do you implement rate limiting in Spring Cloud Gateway?
intermediateProTests whether you know how to configure a request-rate-limiter filter backed by Redis to throttle abusive clients.
Config Server
What is Spring Cloud Config Server? What problems does it solve?
beginnerProTests whether you know how to centralize configuration across many microservices instead of duplicating property files.
What is @RefreshScope? How does it enable dynamic config refresh without restart?
intermediateProTests whether you know how to pick up new config values live without redeploying a running service.
API Design, Performance & Resilience
An API works perfectly with 100 concurrent users but times out at 10,000, even though CPU sits at only 40%. Why?
expertProTests whether you know low CPU with high failure at scale usually points to thread pool or connection pool saturation, not compute.
Average API latency is 200ms, but p99 is 8 seconds. What is the real problem, and why does average latency hide it?
advancedProTests whether you know averages mask tail latency, and that a small fraction of very slow requests is often the actual production issue.
Retries are making an outage worse instead of better. How does a retry storm actually happen, and how do you prevent it?
advancedProTests whether you know synchronized retries without jitter can pile onto an already-struggling service and push it further down.
When would you use a Circuit Breaker, a Retry, a Timeout, and a Bulkhead pattern — and how do they combine?
advancedProTests whether you know these four resilience patterns solve different failure modes and are usually layered together, not chosen one at a time.
Where would you store an idempotency key, and how do you handle two concurrent requests arriving with the same key?
advancedProTests whether you've thought through the race condition of two identical requests landing at nearly the same instant.
The same resource is updated from two devices simultaneously. How do you prevent one update from silently overwriting the other?
advancedProTests whether you know optimistic locking (a version check) catches this cleanly without holding a lock the whole time.
Two users try to book the last available seat at the exact same moment. How do you prevent double booking?
advancedProTests whether you can pick correctly between optimistic locking, pessimistic locking, or an atomic decrement for this exact scenario.
How would you process a 5GB CSV file upload without causing an OutOfMemoryError?
advancedProTests whether you know to stream and process the file line by line instead of loading it entirely into memory first.
How would you trace one request as it flows across five microservices and millions of log entries?
advancedProTests whether you know a propagated correlation ID plus distributed tracing is what makes this actually possible.
Your API's SLA is 1 second, but a downstream dependency's timeout is set to 2 seconds. What's wrong with this design?
advancedProTests whether you know timeout budgets must cascade correctly — a downstream timeout longer than your own SLA guarantees you'll breach it.
How do you implement API versioning — URI versioning vs header versioning vs media type versioning — and what are the tradeoffs of each?
advancedProTests whether you know the practical implications each approach has for clients, caching, and backward compatibility.
Inter-Service Communication
What is OpenFeign? How does it simplify REST calls between microservices?
beginnerProTests whether you know how a declarative HTTP client interface replaces manually built RestTemplate calls.
What is WebClient? How is it better than RestTemplate for reactive calls?
intermediateProTests whether you know WebClient supports non-blocking reactive calls while RestTemplate is fundamentally blocking (and now deprecated).
Resilience Patterns (Resilience4j)
What is the Circuit Breaker pattern? Explain Open, Closed, and Half-Open states.
beginnerProTests whether you know how a circuit breaker stops hammering a failing downstream service and how it decides to retry.
How do you implement a Circuit Breaker in Spring Boot using Resilience4j?
intermediateProTests whether you can actually wire up the annotation-based Resilience4j circuit breaker with a fallback method.
What is the Bulkhead pattern? How does Resilience4j implement it?
intermediateProTests whether you know how isolating resource pools per dependency stops one slow service from starving all the others.
Messaging (Kafka & RabbitMQ)
What is Apache Kafka? How does it differ from RabbitMQ?
beginnerProTests whether you know the log-based streaming model versus traditional message-queue broker model, and when each fits.
What are Kafka Topics, Partitions, Producers, Consumers, and Consumer Groups?
beginnerProTests whether you know Kafka's core vocabulary and how partitions enable parallel consumption within a consumer group.
Distributed Tracing & Security
What is distributed tracing? Why is it important in microservices?
beginnerProTests whether you know how a trace ID follows a request across service boundaries to make debugging possible at all.
What is mutual TLS (mTLS)? How do microservices use it for service-to-service trust?
advancedProTests whether you know both sides of a connection verify each other's certificate, not just the client verifying the server.
Design Patterns for Distributed Systems
What is the SAGA pattern? Explain Choreography vs Orchestration.
intermediateProTests whether you know how to maintain consistency across services without a distributed transaction, and the two coordination styles.
What is CQRS (Command Query Responsibility Segregation)?
intermediateProTests whether you know why separating the write model from the read model can simplify a complex domain.
What is Event Sourcing? How does it differ from traditional CRUD?
intermediateProTests whether you know how storing every state-changing event (instead of just current state) enables replay and audit.
What is CAP theorem? How does it apply to distributed microservices?
advancedProTests whether you know why you can't have Consistency, Availability, and Partition tolerance all at once, and what tradeoff you'd pick.
SOLID Principles in Practice
Your PaymentService has 15 if-else branches for different payment types. Which SOLID principle is being violated, and how would you refactor it?
advancedProTests whether you can spot an Open/Closed Principle violation in real code and know Strategy pattern is the standard fix.
Can a class with only a single method still violate the Single Responsibility Principle?
advancedProTests whether you know SRP is about reasons to change, not method count — a single method can still mix multiple concerns.
When does implementing the Open/Closed Principle become over-engineering?
advancedProTests whether you know abstracting for change that will never actually happen just adds indirection with no payoff.
What happens when a child class compiles fine but returns unexpected results compared to its parent contract?
advancedProTests whether you know this is a Liskov Substitution violation even without a compile error — the contract broke silently.
What problems do 'fat interfaces' create in large systems, and how would you split one without breaking existing consumers?
advancedProTests whether you know a bloated interface forces implementers to depend on methods they don't use, and how to migrate safely.
What is the difference between Dependency Injection and Dependency Inversion? Does using @Autowired automatically guarantee DIP?
advancedProTests whether you know DI is a mechanism while DIP is a design principle, and injecting a concrete class still violates DIP.
How do SOLID principles apply at the microservice level, not just the class level — is SRP applicable to service boundaries?
advancedProTests whether you can map object-oriented design principles onto architectural decisions about service decomposition.
Looking at a 2000-line service class, which SOLID violations would you expect to find first, and how would you start refactoring it?
advancedProTests whether you have a practical, prioritized approach to untangling a real legacy God class, not just theory.
Kubernetes & Production Ops
Your Kubernetes pod keeps restarting, but application logs show no clear error. How would you debug it?
advancedProTests whether you know to check kubectl describe, previous container logs, OOMKilled status, and probe configuration.
What is the difference between liveness, readiness, and startup probes in Kubernetes, and why does confusing liveness with readiness matter for Spring Boot?
intermediateProTests whether you know a common pitfall: using the same health endpoint for both can cause unnecessary pod restarts.
What is a CrashLoopBackOff and how do you debug it?
advancedProTests whether you know Kubernetes' exponential backoff behavior for repeatedly-crashing containers and how to find the root cause fast.
What is a PodDisruptionBudget and why is it important during rolling deployments?
advancedProTests whether you know it prevents voluntary disruptions (like node drains) from taking down too many replicas at once.
How do you implement graceful shutdown in a Spring Boot microservice running in Kubernetes so in-flight requests aren't dropped?
advancedProTests whether you know server.shutdown=graceful, a SIGTERM handler, and a preStop hook all need to work together.
One pod consistently receives 80% of the traffic while the remaining pods stay nearly idle. Why might this happen?
advancedProTests whether you know client-side connection reuse or a misbehaving load-balancing algorithm can defeat even distribution.
A scheduled job runs once locally but five times after scaling to five pods. How do you prevent this duplicate execution?
advancedProTests whether you know a @Scheduled job needs a distributed lock (or ShedLock) to run exactly once across a clustered deployment.
Your Spring Boot application takes 5 minutes to start in production but only 20 seconds locally. How do you debug it?
advancedProTests whether you know to check DB connectivity latency, DNS resolution, and autoconfiguration scanning under production networking.
What is the difference between resource requests and resource limits in Kubernetes, and what happens if limits are exceeded?
advancedProTests whether you know exceeding a CPU limit throttles the pod while exceeding a memory limit gets it OOMKilled outright.
CORS & Cross-Origin Requests
What is CORS (Cross-Origin Resource Sharing), and what triggers a preflight OPTIONS request versus a simple request?
intermediateProTests whether you know only certain request types (non-simple methods, custom headers) force the browser to preflight first.
What are the key CORS HTTP headers, and how do you configure CORS correctly in a Spring Boot application?
intermediateProTests whether you know Access-Control-Allow-Origin, -Credentials, and -Methods and how to configure them without accidentally opening your API to everyone.
Pagination Strategies
What is the difference between offset-based pagination and cursor-based pagination, and why does offset pagination break under fast-changing data?
advancedProTests whether you know inserts during scrolling shift offsets and cause skipped or duplicated rows, which cursors avoid entirely.
How do you encode a pagination cursor as an opaque token so clients can't reverse-engineer your implementation details?
advancedProTests whether you know to base64-encode the actual sort key values instead of exposing raw IDs or offsets directly.
Database Migrations
What is Flyway and what is the difference between Flyway and Liquibase? When would you choose each?
intermediateProTests whether you know Flyway's plain-SQL-first philosophy versus Liquibase's changelog-based, database-agnostic approach.
How do you change a database schema without breaking the older version of your application that's still running (expand-contract pattern)?
advancedProTests whether you know to add new columns first, deploy dual-compatible code, migrate data, and only remove old columns in a later release.
How do you perform zero-downtime database migrations using Flyway when your service is deployed with rolling updates?
advancedProTests whether you know old and new pod versions run against the same schema simultaneously during a rollout, so migrations must be backward-compatible.
gRPC & Alternative Protocols
What is gRPC and when would you choose it over REST for inter-service communication?
advancedProTests whether you know gRPC's binary Protobuf format and HTTP/2 multiplexing pay off specifically for low-latency internal service calls.
What are the four types of gRPC communication — Unary, Server Streaming, Client Streaming, Bidirectional Streaming?
advancedProTests whether you know when a simple request-response isn't enough and one side (or both) needs to stream data continuously.
Server-Sent Events & Real-Time
What is the difference between Server-Sent Events (SSE), WebSocket, and polling — when should you use each?
advancedProTests whether you know SSE fits one-way server-to-client streaming, while WebSocket is needed for genuine bidirectional communication.
How does SSE scale across multiple server instances? What's the challenge and how do you solve it with Redis Pub/Sub?
advancedProTests whether you know a client's SSE connection is pinned to one server instance, so events must be fanned out to whichever instance holds that connection.
Production Logging & Observability
What is structured logging (JSON logs), and why is it better than plain text logs for production observability?
advancedProTests whether you know structured fields let log aggregation tools query and filter logs instead of grepping through text.
What is MDC (Mapped Diagnostic Context) and how do you use it to attach a request ID to every log line for a request?
advancedProTests whether you know how to thread a correlation ID through every log statement without passing it as a parameter everywhere.
What are the three pillars of observability, and how do you implement each in a Java microservice?
advancedProTests whether you can name logs, metrics, and traces and connect each to a concrete Java tool (structured logs, Micrometer, OpenTelemetry).