[{"data":1,"prerenderedAt":326},["ShallowReactive",2],{"learn-concept-/learn/single-source-of-truth":3},{"id":4,"title":5,"body":6,"cardImage":262,"cardImageAlt":263,"date":264,"description":265,"domain":266,"domainKey":267,"extension":268,"featured":269,"fullName":5,"interaction":12,"maturity":270,"mentalModel":271,"meta":272,"navigation":273,"neighbors":274,"ogImage":301,"path":302,"published":273,"robots":301,"seo":303,"shortName":304,"sitemap":305,"socialImage":301,"socialImageAlt":301,"sources":306,"stem":319,"tags":320,"translationKey":12,"updated":264,"__hash__":325},"learnEn/learn/single-source-of-truth.md","Single Source of Truth",{"type":7,"value":8,"toc":250},"minimal",[9,13,21,24,29,32,43,50,53,69,73,76,91,94,101,105,111,114,120,127,131,134,137,143,147,150,153,157,160,180,183,187,219,223,226,229,233],[10,11,5],"h1",{"id":12},"single-source-of-truth",[14,15,16,17],"p",{},"A Single Source of Truth (SSOT) solves the question hidden inside every duplicated fact: ",[18,19,20],"strong",{},"when copies disagree, which one has the authority to decide what is true now?",[14,22,23],{},"Its answer is not “delete every copy.” Caches, search indexes, reports, replicas, translated packages, and deployed pages are all useful. The pattern gives one bounded fact one authoritative owner and makes every other representation a traceable derivative.",[25,26,28],"h2",{"id":27},"the-failure-it-prevents-drift","The failure it prevents: drift",[14,30,31],{},"Imagine one article exists in four places:",[33,34,40],"pre",{"className":35,"code":37,"language":38,"meta":39},[36],"language-text","source.md       version 3\npublic package  version 3\nblog copy       version 4\nproduction      version 3 + a manual hotfix\n","text","",[41,42,37],"code",{"__ignoreMap":39},[14,44,45,46,49],{},"All four look plausible. A future sync might erase the best edit because nobody knows which direction updates should flow. This is ",[18,47,48],{},"drift",": representations that were meant to agree quietly diverge.",[14,51,52],{},"An SSOT establishes an authority contract:",[54,55,56,60,63,66],"ol",{},[57,58,59],"li",{},"Who may define this fact?",[57,61,62],{},"Which direction do updates flow?",[57,64,65],{},"How stale may a derived copy become?",[57,67,68],{},"How is it rebuilt or reconciled after divergence?",[25,70,72],{"id":71},"one-fact-one-owner-not-one-database-for-everything","One fact, one owner — not one database for everything",[14,74,75],{},"Authority should be scoped to a fact or domain:",[77,78,79,82,85,88],"ul",{},[57,80,81],{},"an order service owns the order lifecycle;",[57,83,84],{},"an identity system owns a legal customer name;",[57,86,87],{},"a source Markdown file owns an article's meaning;",[57,89,90],{},"a committed main revision owns the production release.",[14,92,93],{},"These facts do not need to live in one physical store. In fact, forcing unrelated domains into one giant database can blur ownership instead of clarifying it.",[14,95,96,97,100],{},"A useful test is: ",[18,98,99],{},"which system is allowed to originate a correction?"," Other systems may read, subscribe, cache, index, translate, or project the fact, but they do not silently become a second independent writer.",[25,102,104],{"id":103},"a-practical-pipeline","A practical pipeline",[33,106,109],{"className":107,"code":108,"language":38,"meta":39},[36],"authoritative source ──► public package ──► site copy ──► deployment\n        write here           derived          derived        evidence\n",[41,110,108],{"__ignoreMap":39},[14,112,113],{},"A healthy derivative carries enough lineage to explain itself:",[33,115,118],{"className":116,"code":117,"language":38,"meta":39},[36],"derived_from   = source identifier\nsource_version = commit, offset, or version\ngenerated_at   = timestamp\nrefresh_policy = on commit / every five minutes / nightly\nrebuild_path   = deterministic command or procedure\n",[41,119,117],{"__ignoreMap":39},[14,121,122,123,126],{},"The safest default is one-way, repeatable generation. Circular synchronization — ",[41,124,125],{},"A ⇄ B ⇄ C ⇄ A"," — turns every participant into a potential authority and demands much harder conflict semantics.",[25,128,130],{"id":129},"a-service-example","A service example",[14,132,133],{},"Suppose an Order Service owns order status. It publishes updates that feed a search index, an analytics table, and a recommendation system.",[14,135,136],{},"Those copies may be optimized for different queries and may be eventually consistent. A refund still goes through the Order Service because it owns the complete transaction history. A fast, nearby copy does not become authoritative merely because it is convenient.",[14,138,139,140],{},"This is why an SSOT can coexist with replication and high read scale: ",[18,141,142],{},"physical multiplicity is allowed; ambiguous authority is not.",[25,144,146],{"id":145},"authority-is-not-correctness","Authority is not correctness",[14,148,149],{},"The authoritative source can still contain a bug, a bad human entry, or an outdated rule. SSOT does not make its owner infallible. It makes correction directional: fix the owner, then regenerate or reconcile every derivative.",[14,151,152],{},"Without that direction, teams patch many copies independently and can never be sure the repair is complete.",[25,154,156],{"id":155},"recovering-from-a-split-truth","Recovering from a split truth",[14,158,159],{},"When two copies have both received valid-looking edits:",[54,161,162,165,168,171,174,177],{},[57,163,164],{},"Pause the writes or releases that would widen the split.",[57,166,167],{},"Name the exact fact in conflict.",[57,169,170],{},"Choose authority using ownership, completeness, timeline, and audit evidence.",[57,172,173],{},"Reconcile any valid downstream-only changes back into that source.",[57,175,176],{},"Regenerate all derivatives.",[57,178,179],{},"Add lineage, diff checks, write permissions, or a one-way publishing path.",[14,181,182],{},"The order matters: restore authority before restoring consistency. Synchronizing without first choosing a judge is just an arbitrary overwrite.",[25,184,186],{"id":185},"what-it-is-not","What it is not",[77,188,189,195,201,207,213],{},[57,190,191,194],{},[18,192,193],{},"Not one giant database."," SSOT is about bounded authority, not physical centralization.",[57,196,197,200],{},[18,198,199],{},"Not a ban on copies."," Caches, replicas, materialized views, and reports are expected.",[57,202,203,206],{},[18,204,205],{},"Not automatically correct."," It identifies where a correction belongs.",[57,208,209,212],{},[18,210,211],{},"Not Event Sourcing."," An event log can implement an SSOT, but it is one implementation pattern.",[57,214,215,218],{},[18,216,217],{},"Not Single Version of Truth."," SVOT emphasizes consumers agreeing on one definition or result; SSOT emphasizes where authority originates.",[25,220,222],{"id":221},"where-it-becomes-difficult","Where it becomes difficult",[14,224,225],{},"The simple one-writer model strains under offline-first collaboration, active-active multi-region writes, network partitions, or facts that genuinely require multiple independent authors.",[14,227,228],{},"Those systems still need explicit authority and conflict semantics, but may distribute them through leaders, quorums, merge rules, or Conflict-free Replicated Data Types (CRDTs). “We have multiple writers” is not a reason to leave disagreement undefined.",[25,230,232],{"id":231},"five-things-to-keep","Five things to keep",[54,234,235,238,241,244,247],{},[57,236,237],{},"A fact may have many copies, but it needs one named authority.",[57,239,240],{},"Every derivative should expose its source, version, freshness, and rebuild path.",[57,242,243],{},"Prefer one-way, idempotent generation when the domain does not require multiple writers.",[57,245,246],{},"Correct the source, then regenerate downstream; editing a projection creates drift.",[57,248,249],{},"SSOT makes errors repairable and auditable, not impossible.",{"title":39,"searchDepth":251,"depth":251,"links":252},2,[253,254,255,256,257,258,259,260,261],{"id":27,"depth":251,"text":28},{"id":71,"depth":251,"text":72},{"id":103,"depth":251,"text":104},{"id":129,"depth":251,"text":130},{"id":145,"depth":251,"text":146},{"id":155,"depth":251,"text":156},{"id":185,"depth":251,"text":186},{"id":221,"depth":251,"text":222},{"id":231,"depth":251,"text":232},"/learn-img/single-source-of-truth/card-4x5.jpg","One paper master record on a dark pedestal branches into a dashboard, report, and cache, showing one authority feeding many derived views.","2026-07-16","Give each fact one authoritative owner; treat every other copy as a traceable, rebuildable projection.","Information systems","information-systems","md",false,"growing","A fact may have many copies, but only one place is authorized to answer what it is now.",{},true,[275,279,283,287,291,296],{"name":276,"fullName":276,"category":277,"summary":278},"Canonical Source","authority mechanism","The concrete file, store, or log formally chosen to represent an authoritative fact.",{"name":280,"fullName":280,"category":281,"summary":282},"Data Lineage","provenance","Records where data came from, which transformations it passed through, and which source version produced it.",{"name":284,"fullName":284,"category":285,"summary":286},"Materialized View","derived projection","A stored, query-friendly representation that can lag and should be reproducible from its source.",{"name":288,"fullName":288,"category":289,"summary":290},"Event Sourcing","implementation pattern","Uses an ordered event log as the authoritative record and rebuilds current state by replaying it.",{"name":292,"fullName":293,"category":294,"summary":295},"CQRS","Command Query Responsibility Segregation","architecture pattern","Separates authoritative commands from read-optimized projections, introducing an explicit synchronization boundary.",{"name":297,"fullName":298,"category":299,"summary":300},"SVOT","Single Version of Truth","consumption agreement","Aligns consumers on one definition or result; related to, but different from, locating authority.",null,"/learn/single-source-of-truth",{"title":5,"description":265},"SSOT",{"loc":302},[307,310,313,316],{"title":308,"url":309},"Microsoft · Data considerations for microservices","https://learn.microsoft.com/en-us/azure/architecture/microservices/design/data-considerations",{"title":311,"url":312},"Microsoft · CQRS pattern","https://learn.microsoft.com/en-us/azure/architecture/patterns/cqrs",{"title":314,"url":315},"HashiCorp · Purpose of Terraform State","https://developer.hashicorp.com/terraform/language/state/purpose",{"title":317,"url":318},"Kubernetes · Declarative object configuration","https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/","learn/single-source-of-truth",[321,322,323,324],"authority","data-lineage","synchronization","knowledge-systems","S8mKTw8ht-7eqGWjtbKL44GC5KCHXO943zlxtu_PFVU",1785418434186]