<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Routing on INFINI Pizza</title><link>https://pizza.rs/tags/routing/</link><description>Recent content in Routing on INFINI Pizza</description><generator>Hugo</generator><language>en</language><atom:link href="https://pizza.rs/tags/routing/index.xml" rel="self" type="application/rss+xml"/><item><title>Relations that route — joins, FK placement, salting</title><link>https://pizza.rs/docs/highlightings/relational-routing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pizza.rs/docs/highlightings/relational-routing/</guid><description>&lt;h1 id="relations-that-route--joins-fk-placement-salting">
 Relations that route — joins, FK placement, salting
 &lt;a class="anchor" href="#relations-that-route--joins-fk-placement-salting">#&lt;/a>
&lt;/h1>
&lt;p>A fact collection can now behave like one. Declare the relationship in the
schema and the engine takes over:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="s2">&amp;#34;org_id&amp;#34;&lt;/span>&lt;span class="err">:&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;type&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;keyword&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;immutable&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="kc">true&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;references&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="p">{&lt;/span>&lt;span class="nt">&amp;#34;collection&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="s2">&amp;#34;orgs&amp;#34;&lt;/span>&lt;span class="p">},&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;routing&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="kc">true&lt;/span>&lt;span class="p">,&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nt">&amp;#34;ref&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="kc">true&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;strong>
 &lt;a href="https://pizza.rs/docs/references/search/relational/join/">Join queries&lt;/a> are live&lt;/strong> — a
semi-join over the wire: the inner query runs on the referenced
collection, its matching keys become a membership filter on the outer
side, and joins through a declared &lt;code>references&lt;/code> field resolve without a
second fan-out.&lt;/li>
&lt;li>&lt;strong>Writes place by the foreign key&amp;rsquo;s value&lt;/strong> — &lt;code>hash(org_id)&lt;/code> picks the
home partition, not the document key, so an org&amp;rsquo;s facts colocate.
Key-addressed operations take &lt;code>?routing=&amp;lt;value&amp;gt;&lt;/code>
(
 &lt;a href="https://pizza.rs/docs/references/document/fetch/">fetch&lt;/a>,

 &lt;a href="https://pizza.rs/docs/references/document/partial_update/">update&lt;/a>,

 &lt;a href="https://pizza.rs/docs/references/document/delete/">delete&lt;/a>).&lt;/li>
&lt;li>&lt;strong>Salting splits the hot org&lt;/strong> — when one routing value dominates, the

 &lt;a href="https://pizza.rs/docs/references/collection/salting/">_salting API&lt;/a> spreads its writes
across a partition SET (deterministic per key, round-robin for auto-IDs),
with a terms feed that flags candidates against your threshold.
Assignments are never auto-applied and searches stay oblivious — salting
changes placement, never visibility.&lt;/li>
&lt;/ul>
&lt;p>One declaration, three consequences:&lt;/p></description></item><item><title>Salting (salt-split routing)</title><link>https://pizza.rs/docs/references/collection/salting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://pizza.rs/docs/references/collection/salting/</guid><description>&lt;h1 id="salting-salt-split-routing">
 Salting (salt-split routing)
 &lt;a class="anchor" href="#salting-salt-split-routing">#&lt;/a>
&lt;/h1>
&lt;p>Manage salt-split assignments for a collection whose schema declares a

 &lt;a href="https://pizza.rs/docs/references/schema/field-parameters/relational/">routing field&lt;/a> (&lt;code>&amp;quot;routing&amp;quot;: true&lt;/code>).
One hot routing value — the mega tenant, the biggest org — funnels every
write into a single partition; salting splits that value across a SET of
partitions so the hot key stops being a placement bottleneck.&lt;/p>
&lt;p>The API never moves data by itself: assignments state intent, the write
path consumes them live (the very next write of an assigned value lands
inside its partition set), and migrating documents that are already placed
is a separate rehash operation. The 
 &lt;a href="https://pizza.rs/docs/tutorial/joins/">joins tutorial&lt;/a>
walks the complete sequence against a live node.&lt;/p></description></item></channel></rss>