Microservices
51 bites tagged Microservices — interview questions with model answers, and 60-second explainers.
Session-based versus token-based authentication
Sessions store server-side state with a cookie id, tokens carry self-contained claims with no server store, weigh revocation versus scalability, especially across services. auth architecture trade-offs.
Canary a shared downstream microservice
Route a slice of traffic to the canary via mesh rules, propagate context, and use distributed tracing to measure impact on upstream callers across the full path. Mesh-based canary isolation.
Trace context and propagation across services
Trace context bundles trace ID, span ID, and flags; propagated via headers like W3C traceparent so each service extracts and continues the trace. How trace context carries correlation across services.
How does distributed tracing work?
Trace ID ties one request together, span IDs are individual operations, context propagates via headers. Whether you understand request correlation across services. Conflating traces with logs or omitting propagation entirely.
Error budget policy across dependent microservices?
Set per-service SLOs but anchor on user-facing journey SLOs, budget for dependency error via the multiplication of availabilities, attribute downstream-caused failures correctly, and use… SLO design in a dependency graph.
CI/CD for microservice-based ML systems
Independent per-service pipelines, contract testing to protect interfaces and schemas, and incremental deploys (canary, blue-green); manage data and model contracts, not just code. ML CI/CD at service granularity.
Why choose Kafka over a REST endpoint for ingestion
Kafka buffers spikes, decouples producers from consumers, replays and fans out durably. understanding async decoupling and buffering. thinking a synchronous REST call gives the same back-pressure and durability.
How do you keep consistency without multi-document transactions?
A Saga runs a sequence of local transactions, each with a compensating action to undo on failure, coordinated via choreography or orchestration. maintaining integrity across services without distributed ACID.
Explain the Strangler Fig pattern
A facade routes traffic, new services gradually replace legacy features one slice at a time, and the old system is retired when fully strangled. incremental modernization strategy.
Centralized logging across microservices
Ship structured logs from every service into a central searchable store, then propagate a correlation ID through all hops to trace one request. aggregating and correlating logs. grepping per-host files with no shared ID.
Dynamic database credential rotation for microservices
A secrets manager issues short-lived per-service credentials, services authenticate by workload identity and fetch or refresh secrets without restart, leases expire and rotate automatically. dynamic secrets and zero-downtime rotation.
Using context.Context across microservice calls in Go
Context carries cancellation, deadlines, and values; pass ctx as first arg, set one WithTimeout at the edge, attach a request ID via WithValue, thread it through downstream calls so all cancel… request-scoped context propagation.
What is distributed tracing in microservices?
A trace is a tree of spans tied by trace and span IDs, propagated via headers like W3C traceparent. observability across service boundaries. confusing tracing with plain logging or metrics.
Vercel Ship 2026: agent stack, eve framework, and microservices
Vercel Ship 2026 unveils open-source eve framework and Vercel Services for microservices July 1. Vercel is repositioning as agentic infrastructure with Connect credentials and expanded Python backends. Evaluate if your next agent deploys here instead of AWS.
How does product strategy influence architectural decisions? Provide a specific example.
This tests if you tie architecture to product outcomes like iteration speed. A strong answer picks patterns by company stage, cites a concrete tradeoff, and treats reliability as a product feature.
Propose a long-term strategy to decompose a monolith while maintaining API stability
This tests strategic prioritization and incremental migration without ecosystem breakage. Start with simple decoupled capability, go macro first then micro, split vertically by domain owning data, and use atomic steps with facades to preserve APIs.
Design quantifiable proxy metrics for a microservices velocity claim
Use DORA velocity and stability metrics plus leading indicators like build and PR cycle time. Turning vague goals into measurable engineering proxies. Using lagging KPIs like revenue that cannot be tied to the refactor.
Propose a scalable entitlement architecture for complex rules
Tests separation of hot-path reads from async policy work. Great answers: edge-cache plan tokens; stream quota usage async; isolate rules in a microservice. Red flag: doing a DB lookup or sync quota check per request.
How would you leverage microservices to out-maneuver a monolithic competitor?
Tests turning architecture into product velocity. Exploit competitor's release cycle with independent service teams shipping features in days not months via domain boundaries. Red flag: seeing microservices as purely technical or suggesting big-bang rewrite.
How would you architect a system for rapid experimentation and validation?
Tests designing decoupled experimentation infrastructure that scales past 1M users. Strong answers split assignment, flags, metrics, and analysis into independent event-driven services with change data capture isolating production.
How do you frame monolith vs microservices trade-offs under market uncertainty?
Connecting architecture to business strategy under uncertainty. Strong answers say monoliths offer cheap optionality when markets are unknown, but winner-take-all makes speed existential; microservices are a post-PMF scaling tax.
Design a highly available entitlements service with caching
This tests balancing read performance with consistency in access control. A strong answer proposes tiered caching with proactive invalidation, read-optimized hot paths, and event-sourced temporary grants.
How do you fulfill a GDPR erasure request across microservices?
Log the request, emit a durable erasure event, let each service delete or anonymize locally, then reconcile. Distributed data governance and eventual consistency.
Design a centralized Copy Service with versioning, segmentation, and experiments
This tests separation of editorial workflow from runtime delivery. A strong answer covers immutable versioned records, a resolution API evaluating segmentation rules, and delegating experiment bucketing externally.
Get Microservices bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.