[{"data":1,"prerenderedAt":78},["ShallowReactive",2],{"term-d\u002Fdistributed-lease":3,"related-d\u002Fdistributed-lease":60},{"id":4,"title":5,"acronym":6,"body":7,"category":40,"description":41,"difficulty":42,"extension":43,"letter":44,"meta":45,"navigation":46,"path":47,"related":48,"seo":54,"sitemap":55,"stem":58,"subcategory":6,"__hash__":59},"terms\u002Fterms\u002Fd\u002Fdistributed-lease.md","Distributed Lease",null,{"type":8,"value":9,"toc":33},"minimark",[10,15,19,23,26,30],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 - The Vibe Check",[16,17,18],"p",{},"A distributed lease is a time-limited 'I've got this' claim that one node takes out on a resource or a role, like being the leader, so everyone else knows to back off, but only for a set period. If the lease holder doesn't renew it in time, maybe because it crashed or froze, the lease expires and someone else can safely take over. It's like a library due date: you get exclusive access, but only until the clock runs out.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"A distributed lease grants a node time-bounded exclusive ownership of a role or resource, backed by a coordination service such as ZooKeeper, etcd, or Consul, requiring periodic renewal before expiry to retain ownership. Leases enable safe leader election and mutual exclusion without permanent locks that could deadlock a cluster if the holder dies, but they're vulnerable to clock skew and process pauses (like a long garbage collection pause) that can cause a node to believe it still holds a lease after it has actually expired.",[11,27,29],{"id":28},"when-youll-hear-this","When You'll Hear This",[16,31,32],{},"\"The leader lease expired during the GC pause, and for a moment we had no elected leader at all.\" \u002F \"We renew the lease every 5 seconds with a 15-second TTL to survive brief network blips.\"",{"title":34,"searchDepth":35,"depth":35,"links":36},"",2,[37,38,39],{"id":13,"depth":35,"text":14},{"id":21,"depth":35,"text":22},{"id":28,"depth":35,"text":29},"architecture","A distributed lease is a time-limited 'I've got this' claim that one node takes out on a resource or a role, like being the leader, so everyone else knows...","advanced","md","d",{},true,"\u002Fterms\u002Fd\u002Fdistributed-lease",[49,50,51,52,53],"Fencing Token","Split Brain","Clock Skew","Consensus Algorithm","Quorum",{"title":5,"description":41},{"changefreq":56,"priority":57},"weekly",0.7,"terms\u002Fd\u002Fdistributed-lease","hgwpPVHgEc5FteyVOchgjfz2jYkSterXFJlXxkNlqzY",[61,65,69,72,75],{"title":51,"path":62,"acronym":6,"category":40,"difficulty":63,"description":64},"\u002Fterms\u002Fc\u002Fclock-skew","intermediate","Every server has its own clock, and those clocks drift apart from each other over time, sometimes by milliseconds, sometimes by embarrassingly more if NTP...",{"title":52,"path":66,"acronym":6,"category":67,"difficulty":42,"description":68},"\u002Fterms\u002Fc\u002Fconsensus-algorithm","database","A consensus algorithm is how a group of servers democratically agree on something even when some of them are flaky or unreachable.",{"title":49,"path":70,"acronym":6,"category":40,"difficulty":42,"description":71},"\u002Fterms\u002Ff\u002Ffencing-token","Say a node holds a lease, but then it freezes for a while, its lease quietly expires, and a new leader takes over, and THEN the frozen node wakes back up...",{"title":53,"path":73,"acronym":6,"category":40,"difficulty":42,"description":74},"\u002Fterms\u002Fq\u002Fquorum","A quorum is the minimum number of nodes that must agree before a distributed system trusts a decision, whether that's electing a leader or confirming a wri...",{"title":50,"path":76,"acronym":6,"category":40,"difficulty":42,"description":77},"\u002Fterms\u002Fs\u002Fsplit-brain","Split brain is when a network hiccup cuts a cluster of servers in half, and both halves, unable to talk to each other, each decide they're the boss and kee...",1792528079865]