Blog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2025 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Microservices
Microserviceshard

Distributed locks — when do you need them and what are the risks?

Tags
#distributed-lock#coordination#reliability
Back to categoryPractice quiz

Answer

You need a distributed lock when multiple instances must ensure only one performs a critical section (e.g., one scheduler job). Risks: lock leaks, split-brain, clock/network issues, and added latency; prefer idempotency and DB constraints when possible.

Related questions

Microservices
Why is synchronous fan-out (one request calling many services) risky, and how do you reduce it?
#microservices#fan-out#latency
Microservices
What is the Outbox pattern and what problem does it solve?
#outbox#events#consistency
PostgreSQL
Advisory locks: what are they and when would you use them?
#postgres#locks#advisory
Monoliths
How do you run background jobs in a monolith reliably?
#jobs#queue#worker
Architecture
What is a blameless postmortem and why is it useful?
#postmortem#incident#culture