Top 30 Microservices Interview Questions and Answers
30 multiple-choice questions on Microservices, drawn from 30 bites out of the 51 tagged Microservices on Tezvyn. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
Why does the card suggest evaluating Vercel Connect against your current secret management strategy?
Show the answer
Answer: a · Because it replaces long-lived environment tokens with temporary scoped credentials
The card states that Vercel Connect introduces temporary scoped credentials for agent-to-service authentication, eliminating long-lived environment tokens, which directly addresses secret management and token rotation struggles. Option C confuses Connect with Marketplace database integrations, while B and D describe other distinct products in the Agent Stack.
Read the full bite: Vercel Ship 2026: agent stack, eve framework, and microservices
Question 2 of 30
Which scenario best illustrates a fundamental CI/CD difference between monoliths and microservices regarding blast radius and artifact indivisibility?
Show the answer
Answer: a · A microservice team deploys a signed container side-by-side with the previous version, while a monolith rollback requires reverting the entire application
This captures the core idea that monoliths produce a single indivisible artifact requiring full rollback, while microservices support independent side-by-side deployments with signed images. Option C reverses these architectures and promotes the shared-pipeline anti-pattern the card explicitly warns destroys team autonomy.
Read the full bite: How does your CI/CD strategy differ between monoliths and microservices?
Question 3 of 30
An upstream service breaches its SLO solely because a downstream dependency had an outage. How should a well-designed error budget policy handle the burn?
Show the answer
Answer: c · Attribute the burn to the downstream service that caused the failure
Correct attribution charges the responsible downstream team, creating proper incentives and shielding the upstream victim. Charging the upstream team, splitting blindly, or ignoring it all distort accountability.
Read the full bite: Error budget policy across dependent microservices?
Question 4 of 30
What is the primary purpose of a health check endpoint, distinguishing it from merely confirming a service process is running?
Show the answer
Answer: d · To allow external systems to detect if the service can perform its core functions and route traffic accordingly.
The card explicitly states that a health check answers 'Can you do your job?', enabling load balancers and orchestrators to stop routing traffic to sick instances. Options A and D are incorrect because health checks provide a binary signal, not detailed metrics or comprehensive logs. Option A is a distractor because while orchestrators may restart services based on health checks, the health check itself provides the signal of functional impairment, not the direct trigger for a restart based solely on resource thresholds.
Read the full bite: Health Checks: Is Your Service Alive or Just Running?
Question 5 of 30
A startup that has not yet found product-market fit targets a winner-take-all market and asks whether to use microservices. Which response best aligns architecture with its business risk profile?
Show the answer
Answer: c · Start with a monolith to validate hypotheses cheaply and preserve speed, extracting services only after bounded contexts hit concrete scaling or team-size pain.
The card frames a monolith as cheap optionality under uncertainty and warns that microservices before product-market fit impose a scaling tax; in winner-take-all markets, speed is existential. Option A is tempting because engineers often fear rewriting, but it treats microservices as a universal best practice and ignores the operational overhead and business risk profile described in the card.
Read the full bite: How do you frame monolith vs microservices trade-offs under market uncertainty?
Question 6 of 30
Which design ensures a payment database update and its analytics event are atomic without using distributed transactions?
Show the answer
Answer: b · Write the event to an outbox table in the same database transaction as the business update, then relay it to analytics.
Writing the event to an outbox table in the same local database transaction atomically binds the state change to the event record, and a separate relay publishes to analytics. The HTTP POST distractor is unsafe because a crash between the database commit and the network call permanently loses the event.
Read the full bite: How do you guarantee at-least-once event delivery for a financial transaction?
Question 7 of 30
Across three microservices handling one request, what value is identical on every span, and what value distinguishes each operation within that request?
Show the answer
Answer: a · Trace ID is shared; span ID distinguishes each operation
The trace ID is generated once and carried by every span to group them, while each operation gets its own span ID. Sharing span IDs or minting new trace IDs per hop would break correlation entirely.
Question 8 of 30
A platform running dozens of simultaneous A/B tests must scale from ten thousand to one million users without cascading failures or corrupted results. Which architectural choice best achieves both goals?
Show the answer
Answer: d · Use independent event-driven services connected by an event bus, feed the metrics pipeline via change data capture, and resolve user segments from a low-latency cache at assignment time.
Asynchronous event-driven services with change data capture isolate production load while keeping assignments and metrics perfectly aligned; the tempting distractor suggesting separate database replicas introduces replication lag that corrupts experiment results by misattributing events to variants.
Read the full bite: How would you architect a system for rapid experimentation and validation?
Question 9 of 30
You need to trace how a deprecated field in an upstream microservice affects downstream dashboards without slowing production APIs. Which strategy best achieves this?
Show the answer
Answer: d · Emit metadata asynchronously at service boundaries and store column-level relationships in a central graph catalog.
Capturing metadata asynchronously at service boundaries records provenance where data originates without adding latency, while a graph catalog enables fast column-level impact analysis. Option A is tempting but wrong because synchronous instrumentation would introduce crippling latency to production APIs.
Read the full bite: How would you implement data lineage for microservices analytics?
Question 10 of 30
When competing against a monolithic competitor with slow release trains, which strategy best leverages microservices as a business weapon?
Show the answer
Answer: d · Organize teams around business domains with independent release pipelines so you can experiment and ship features in days rather than months
Independent deployability organized by domain is what turns architecture into faster time-to-market and asymmetric competitive pressure. The big-bang rewrite in option A is a classic red flag because it delays value delivery and carries massive risk.
Read the full bite: How would you leverage microservices to out-maneuver a monolithic competitor?
Question 11 of 30
When a Spark-generated revenue report is off by 2% for only the last three days, what is the correct first step?
Show the answer
Answer: d · Identify the affected cells and anomaly window to contain the blast radius before tracing lineage
The card emphasizes that structured debugging must begin by containing the blast radius—pinpointing exactly which cells are wrong and when the anomaly started—before tracing lineage backward. Option A is tempting because lineage tracing is essential, but performing it without first isolating the scope skips the critical containment step and leads to unfocused investigation.
Read the full bite: How do you root-cause bad data across microservices and Spark?
Question 12 of 30
What does the W3C traceparent header primarily carry to enable cross-service correlation?
Show the answer
Answer: c · The trace ID, parent span ID, and trace flags such as the sampled bit
The traceparent header carries the shared trace ID, the caller's span ID as parent, and flags like the sampled bit, so the receiver can create a correctly linked child span. Generating a new trace ID per hop would break correlation, and logs or cookies are not its role.
Read the full bite: Trace context and propagation across services
Question 13 of 30
What design choice most directly enables rotating database credentials without restarting the microservices?
Show the answer
Answer: a · Fetching short-lived leased credentials at runtime and refreshing the pool before expiry
Runtime-fetched, leased credentials that the client refreshes and swaps into the connection pool rotate without a restart. Static env-var or image-baked passwords can only change by restarting or redeploying.
Read the full bite: Dynamic database credential rotation for microservices
Question 14 of 30
Which strategy best standardizes a new CI/CD stage across hundreds of microservices while avoiding per-repository pipeline edits and uncontrolled blast radius?
Show the answer
Answer: d · Publish a new versioned template and progressively enroll services after canary validation against a subset
Versioned templates with progressive canary enrollment decouple updates from service repos and limit blast radius, whereas forcing consumption of the latest tag risks breaking every build simultaneously without validation.
Question 15 of 30
What is a key benefit of using gRPC for internal microservice communication compared to REST/JSON?
Show the answer
Answer: a · It enforces a strict, language-agnostic contract, leading to higher performance and fewer integration issues.
The card highlights that gRPC enforces a strict contract via Protocol Buffers, which prevents data mismatch errors and, combined with efficient binary transport, leads to high performance. Options A and D describe attributes that are either benefits of REST/JSON or scenarios where gRPC is not recommended.
Read the full bite: gRPC: High-Performance RPC with Contracts
Question 16 of 30
Which approach to A/B test bucketing maintains proper separation between the Copy Service and the experimentation platform?
Show the answer
Answer: b · The service passes the experiment_id to the external platform and maps the returned bucket to the correct CopyVersion
The card specifies that the Copy Service must never compute random assignment itself; it delegates bucketing to the external platform and only stores the variant-to-copy mapping. Option A is a tempting distractor because embedding randomization logic inside the service is explicitly listed as a common wrong answer that couples two domains that should evolve independently.
Read the full bite: Design a centralized Copy Service with versioning, segmentation, and experiments
Question 17 of 30
When designing a low-latency entitlement system, how should the hot path handle plan validation and quota checks?
Show the answer
Answer: c · Issue signed edge tokens for plan validation and stream quota usage to an async pipeline
The correct approach separates the user-facing hot path from background policy work by validating signed edge tokens locally and streaming quota events asynchronously, keeping latency under five milliseconds. A synchronous database lookup per request is a common red flag because it couples the hot path to a remote dependency and creates a scaling bottleneck.
Read the full bite: Propose a scalable entitlement architecture for complex rules
Question 18 of 30
Why is contract testing especially important in a microservice-based ML system?
Show the answer
Answer: d · Services evolve independently, so verifying interface and data-schema expectations catches breaking changes before integration
Independent release cadences make interface and schema drift the main risk; consumer-driven contract tests catch breaks in the producer's pipeline early. It complements, not replaces, unit tests and versioning.
Question 19 of 30
What guarantee does a Saga provide that distinguishes it from a true multi-document ACID transaction?
Show the answer
Answer: b · It provides atomicity via compensating transactions but not isolation, so partial states can be observed
A Saga achieves all-or-nothing through compensations but cannot isolate intermediate steps, so partial results are visible. Locking all participants describes two-phase commit, and Sagas yield eventual, not instant strong, consistency.
Read the full bite: How do you keep consistency without multi-document transactions?
Question 20 of 30
When claiming a microservices migration improves velocity, why is it risky to report only deployment frequency and lead time for changes?
Show the answer
Answer: a · They must be balanced with stability guardrails such as change failure rate and time to restore
The card states that every speed metric must be paired with a stability guardrail so leadership does not perceive velocity-at-all-costs behavior. Leading indicators complement DORA metrics but do not replace them, and DORA metrics are measured from the baseline rather than only after six months.
Read the full bite: Design quantifiable proxy metrics for a microservices velocity claim
Question 21 of 30
In a tiered entitlement cache, how should temporary grants be modeled to avoid degrading cache hit rates?
Show the answer
Answer: d · Append them to an event-sourced log and cache with a TTL matching their explicit expiration
Temporary grants are high-churn, time-bound state that pollutes the cache if handled like static features; event-sourced append-only logs with precise TTLs keep them off the hot path without overwhelming the database. Querying the primary store directly for every check would recreate the exact bottleneck a multi-tier cache is designed to prevent.
Read the full bite: Design a highly available entitlements service with caching
Question 22 of 30
Across five stateless Express instances behind a load balancer, what is the main operational cost of choosing session-based auth over JWTs?
Show the answer
Answer: a · You need a shared session store so any instance can resolve the session
Session state must be reachable by whichever instance handles a request, so a shared store like Redis is required. JWTs avoid that by being self-contained and locally verifiable; sessions absolutely can scale, just with shared storage.
Read the full bite: Session-based versus token-based authentication
Question 23 of 30
When developing a FastAPI application, which scenario would make app.mount() an inappropriate choice?
Show the answer
Answer: c · Ensuring all sub-components consistently apply a shared dependency injection pattern and global middleware.
The card explicitly states, "Don't use mounting if you need to share dependencies, middleware, or configuration between application components." Mounting isolates sub-applications, preventing them from inheriting the main app's shared concerns.
Read the full bite: FastAPI: Mounting Independent Sub-Applications
Question 24 of 30
An engineer needs to add log forwarding to an application without modifying its container image. Which approach matches the sidecar pattern?
Show the answer
Answer: a · Run a Fluent Bit container in the same Pod, sharing a volume and network namespace
A sidecar runs concurrently in the same Pod, sharing volumes and network namespaces so infrastructure like log forwarding can be added without modifying the main image. While a DaemonSet is a valid log-collection pattern, it is not a sidecar because it runs in separate node-level Pods rather than co-located with the application container.
Read the full bite: Explain the concept of a sidecar container in Kubernetes
Question 25 of 30
In a zero-downtime rolling update, what is the primary purpose of configuring a preStop sleep hook?
Show the answer
Answer: a · It delays SIGTERM briefly so endpoint removal can propagate before draining starts
The preStop hook sleeps before SIGTERM to allow the Service endpoints controller and load balancers to stop sending new traffic to the pod before it begins draining. Distractor A describes terminationGracePeriodSeconds, which governs the SIGTERM-to-SIGKILL window, not the endpoint propagation delay.
Question 26 of 30
What is essential for tracing a single user's request across many microservices in a centralized logging system?
Show the answer
Answer: c · Propagating a shared correlation or trace ID on every log line across all hops
A correlation ID propagated through every service lets you filter all logs for one request. Per-host storage prevents central search, and retention or uniform log levels do not link logs across services.
Read the full bite: Centralized logging across microservices
Question 27 of 30
Which strategy is most effective for decomposing a monolithic application to support scaled agile teams, specifically addressing data consistency, API contracts, and team autonomy?
Show the answer
Answer: c · Identify business capabilities as bounded contexts, define schema-first versioned APIs, and use asynchronous, event-driven patterns for independent data ownership.
The correct strategy involves identifying bounded contexts for service boundaries, defining clear, versioned APIs, and using event-driven patterns for data consistency, with each service owning its data. Option A describes a 'distributed monolith' due to the shared database, which is a major red flag, while options B and C propose anti-patterns like big-bang rewrites, tight coupling via shared libraries, or complex two-phase commit protocols.
Read the full bite: Decomposing a monolith for scaled agile teams
Question 28 of 30
When extracting a new service from a monolith, what is the recommended strategy for it to access data that is still owned by the legacy system?
Show the answer
Answer: a · The monolith publishes domain events, which the new service consumes to maintain its own local data store.
The correct approach is event-driven, allowing the new service to maintain its own data and operate independently. Synchronous API calls are a tempting but flawed alternative as they create tight runtime coupling, reducing system resilience.
Read the full bite: Decomposing a Monolith: Technical Strategy
Question 29 of 30
When incrementally decomposing a monolith for scaled agile teams, which approach best preserves team autonomy while still allowing controlled code reuse?
Show the answer
Answer: b · Treat shared libraries as versioned internal products with independent release cycles and semantic versioning
Correct answer C treats shared libraries as versioned internal products, aligning architecture with team autonomy by letting teams consume upgrades independently. D is tempting because the card mentions preferring duplication over hidden coupling, but duplicating everything is an impractical extreme; the card explicitly recommends versioned SDKs when reuse is necessary, while A and B create coupling via shared data or distributed transactions.
Read the full bite: Decompose a monolith for scaled agile teams
Question 30 of 30
When beginning a multi-year monolith decomposition, which capability should be extracted first to validate delivery and operational practices without taking on the monolith's riskiest dependencies?
Show the answer
Answer: b · A simple, fairly decoupled capability used to validate the delivery pipeline and team topology
The strategy explicitly begins with a low-risk, decoupled warm-up extraction to validate the pipeline and observability before fighting the monolith's hardest dependencies. Choosing the highest-value, fastest-changing domain is tempting, but that is a later priority after the team has built operational muscle through a safer initial extraction.
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.