20 Must‑Know Interview Questions Covering 95% of Microservice Scenarios
The article analyzes why candidates fail by relying on raw question banks, presents three deep‑dive topics—auto‑configuration, distributed transaction management, and microservice componentization—with concrete case studies, and offers a curated list of 20 essential interview questions and answer strategies to help candidates demonstrate real‑world risk‑aware thinking.
Auto‑configuration
In large‑scale cloud platforms (e.g., Fujian government cloud) automatic configuration can fail during traffic spikes, collapsing faster than manual settings. An interview candidate was asked why manual intervention is needed for Spring Boot auto‑configuration. The correct answer highlighted resource‑contention scenarios , such as the Zhejiang emergency broadcast service where a sudden surge caused auto‑configuration to trigger a cascade failure. The cited solution from Huawei Cloud operations guidelines is manual throttling + priority configuration . A real‑world failure case: an e‑commerce platform suffered a three‑hour outage because auto‑configuration time‑outs lacked a safety net.
Pitfall: When multiple microservices compete for the same resource (e.g., a database connection pool), a manual fallback must be kept.
Transaction management
Microservice‑based freight‑transport platforms (China Railway) expose the limits of traditional ACID transactions when payment and dispatch cross service boundaries. An interview scenario asked about Seata TCC callback failures; answering only with a retry mechanism was rejected. The expected response emphasized an audit‑log mindset : nuclear‑power system migrations require full‑chain logs (date, operator, result) so that, upon callback failure, the audit log can pinpoint the conflict instead of blindly retrying and creating dirty data. The underlying principle is trust‑chain management , as required by automotive‑industry safety specifications.
Key insight: Distributed transactions must record “who did what, when” for every critical operation.
Microservice componentization
Splitting a system into microservices can improve performance (e.g., an agrifood traceability system) but excessive granularity can cripple operations. A medical platform experienced chaotic backend configuration because “generic query” and “data‑push” components were tightly coupled. When asked how to control component permissions, a candidate’s RBAC answer was insufficient; the interview highlighted the need for least‑privilege configuration defined in industrial‑internet specifications (e.g., a configuration center can read configs but never touch the database), which is ten times more effective than strict user‑permission guards. Samsung’s 5G architecture demonstrates that components may be split (mobile management vs. session management) yet share a single state database because some functions must remain “connected”; otherwise communication overhead would consume half the performance.
Representative interview checklist (partial)
Auto‑configuration : Expect questions on dynamic update vs. static configuration conflicts. Recommended answer direction – use configuration‑center version rollback + environment isolation.
Transaction management : Expect questions on distributed‑transaction log tracing. Recommended answer direction – audit‑log pinpointing + asynchronous compensation.
Service circuit‑breaker : Expect questions on avoiding avalanche after a breaker trips. Recommended answer direction – auto‑scale instance count + service‑degradation template.
Security authentication : Expect questions on preventing component‑level credential leakage. Recommended answer direction – dynamic token + transport encryption.
Container orchestration : Expect questions on Kubernetes cluster resource contention. Recommended answer direction – Raspberry‑Pi experiment revealing hard CPU‑quota limits.
Component communication : Expect questions on service call timeout under high concurrency. Recommended answer direction – railway‑system asynchronous message‑queue solution.
Configuration management : Expect questions on storing sensitive configs (e.g., passwords). Recommended answer direction – Huawei Cloud secure‑parameter hosting solution.
Service discovery : Expect questions on traffic residue after a service goes offline. Recommended answer direction – Zhejiang emergency broadcast real‑time perception mechanism.
Key observations
Interviewers prioritize risk‑aware thinking over rote memorization. Scenarios that expose contradictions—such as microservice‑driven efficiency gains in railway logistics versus increased operational complexity in nuclear‑power system migrations—are common. Demonstrating concrete data (e.g., QPS‑peak‑based component count) and real‑world analogies (e.g., comparing a message bus to a parcel‑sorting center that keeps latency under 200 ms) helps translate technical knowledge into practical, value‑adding solutions.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
