दूरसञ्चयधर्मः। पार्श्वयाने (२२ अक्टो) सहयानम्। अत्र साझस्मृतिः दूरे। Redis-वर्गः, TTL, stampede। न स्रोतसत्यम्; दूरसञ्चयः।
English (minimizable)
After sidecars (22 Oct), this post covers remote shared caches: aside/read-through, TTL jitter and stampede control, serialization, memory caps, hot keys, HA expectations, tenant prefixes and metrics.
पूर्ण-शीर्षकम् / Full title
दूरसञ्चयधर्मः: A Metrical Codification of Remote Shared Caches (with English glosses)
English · overview and topics (minimizable)
What this post is about
A remote cache (Redis-class) is a shared in-memory tier in front of databases for hot keys across many app instances.
Topics covered
- Shared hot set vs per-process cache
- aside / read-through / write-through
- TTL jitter and singleflight
- Versioned serialization
- maxmemory eviction
- Hot keys and large values
- HA vs source of truth
- Multi-tenant key prefixes
- Hit ratio and eviction metrics
- Tier map: app / remote / edge
Sanskrit title
दूरसञ्चयधर्मः = dūra-sañcaya-dharmaḥ “dharma of the remote cache”.
English
Minimizable; Sanskrit-first.
परम्परा-सन्धिः / Series links
| पूर्वं / Prior | अत्र / Adds | न पुनः / Does not repeat |
|---|---|---|
| सञ्चयधर्मः (७ सितम्बे) | general caching | remote tier deep dive |
| समरूपहैशः (१० अक्टो) | ring placement | optional shard |
| बहुकिरायविवेकः (८ सितम्बे) | tenancy | key prefixes |
| प्रतिदाबधर्मः (७ अक्टो) | herds | stampede on miss |
| इदम् | remote cache stampede tenancy | - |
ग्राह्य-त्याज्य-विवेकः / Keep and avoid
ग्राह्यम् / Keep
१. one pattern per resource: documented
२. TTL+jitter+singleflight: miss storms
३. maxmemory+eviction: always
४. tenant prefix: mandatory multi-tenant
५. versioned codec: rolling safe
६. rebuild plan: DB is SoT
७. hit/evict metrics: paged when sick
त्याज्यम् / Avoid
- cache as only DB
- no memory cap
- keys without tenant prefix in SaaS
अध्याय-योजना / Chapter plan
| प्रकरणम् | विषयः | छन्दः | श्लोकाः |
|---|---|---|---|
| १ | मङ्गलं बीजं च / Opening | अनुष्टुभ् | २ |
| २ | मूलतत्त्वानि / Core | अनुष्टुभ् | २ |
| ३ | मुख्यविधिः / Method | उपजाति | १ |
| ४ | रक्षा · विधिः / Guards | अनुष्टुभ् | २ |
| ५ | विवेक · सीमा / Judgment | अनुष्टुभ् | २ |
| ६ | पूर्वसन्धिः / Series links | उपजाति | १ |
| ७ | उपसंहारः / Close | अनुष्टुभ् | २ |
पारिभाषिक-कोशः / Glossary
| Modern English | संस्कृतम् | Note |
|---|---|---|
| remote cache | दूरसञ्चयः / साझकैशः | |
| cache-aside | पार्श्वसञ्चयः | |
| TTL | जीविकालः | |
| singleflight | एक उड्डयनम् | |
| eviction | निष्कासनम् | |
| hot key | उष्णकुञ्चिका | |
| Redis | Redis-वर्गः | pattern not brand lock |
| hit ratio | हिटअनुपातः | |
| write-through | लेखनसहसञ्चयः | |
| stampede | समूहप्रहारः |
श्लोकः १ (अनुष्टुभ्)
दूरसञ्चयधर्मस्तस्माद् साझकैशः ॥१॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
दूरस्मृतिः यदि मूलं रक्षति तदा विलम्बो मितः ।
दूरसञ्चयधर्मस्तस्माद् साझकैशः ॥१॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| दूरस्मृतिः | remote memory |
| मूलम् | origin |
| रक्षति | protects |
| विलम्बः | latency |
| मितः | measured |
| दूरसञ्चयधर्मः | remote-cache dharma |
| साझकैशः | shared cache |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| दूरस्मृतिः | remote cache |
| साझकैशः | shared cache |
English sense
A remote cache (Redis-class) stores hot data outside the app process so many instances share one hot set and spare the database.
Context / topic
Topic: why remote cache. Deepens general cache dharma (7 Sep).
वृत्तमिति: ८-८-८-८।
श्लोकः २ (अनुष्टुभ्)
नीतिः एका स्पशा ॥२॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
aside vs read-through vs write-through ।
नीतिः एका स्पशा ॥२॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| aside | aside |
| vs | vs |
| read-through | read-through |
| write-through | write-through |
| नीतिः | policy |
| एका | one |
| स्पशा | clear |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| aside | cache-aside |
| read-through | library loads |
English sense
Pick a single caching pattern per resource. Mixing aside and write-through without docs causes double writes and ghosts.
Context / topic
Topic: access patterns.
वृत्तमिति: ८-८-८-८।
श्लोकः ३ (अनुष्टुभ्)
समसमयसमाप्तिः मूलं हन्ति ॥३॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
TTL + jitter stampede रोधः ।
समसमयसमाप्तिः मूलं हन्ति ॥३॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| TTL | TTL |
| jitter | jitter |
| stampede | stampede |
| रोधः | block |
| समसमयसमाप्तिः | same-time expiry |
| मूलम् | origin |
| हन्ति | kills |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| jitter | TTL jitter |
| stampede | thundering herd on expiry |
English sense
Expire with jittered TTLs and singleflight/locks on miss so all pods do not stampede the DB together.
Context / topic
Topic: stampede control. Links to backpressure/retry herd.
वृत्तमिति: ८-८-८-८।
श्लोकः ४ (अनुष्टुभ्)
schema drift भूतः ॥४॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
serialization format versioned ।
schema drift भूतः ॥४॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| serialization | serialization |
| format | format |
| versioned | versioned |
| schema | schema |
| drift | drift |
| भूतः | ghost |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| serialization | payload codec |
| schema drift | incompatible blobs |
English sense
Version cached payloads. Rolling deploys with incompatible serializers create poison values.
Context / topic
Topic: value format.
वृत्तमिति: ८-८-८-८।
श्लोकः ५ (उपजाति)
LRU etc ।
अनन्तset
OOM ॥५॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
eviction maxmemory नीतिः
LRU etc ।
अनन्तset
OOM ॥५॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| eviction | eviction |
| maxmemory | maxmemory |
| नीतिः | policy |
| LRU | LRU |
| अनन्तset | endless set |
| OOM | OOM |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| maxmemory | memory cap |
| LRU | eviction policy |
English sense
Always set a memory ceiling and eviction policy. Infinite growth is not a cache it is a leak.
Context / topic
Topic: memory bounds.
वृत्तमिति: एकादशाक्षराः पादाः।
श्लोकः ६ (अनुष्टुभ्)
एकkey cluster hotspot ॥६॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
hot key + big value पृथक् उपायः ।
एकkey cluster hotspot ॥६॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| hot | hot |
| key | key |
| big | big |
| value | value |
| पृथक् | separate |
| उपायः | remedy |
| एकkey | one key |
| cluster | cluster |
| hotspot | hotspot |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| hot key | popular key |
| big value | oversized blob |
English sense
Split hot keys, compress large values or do not cache huge blobs remote. Consistent hashing hotspots apply here too.
Context / topic
Topic: hot keys. Links to consistent hash.
वृत्तमिति: ८-८-८-८।
श्लोकः ७ (अनुष्टुभ्)
cache as source-of-truth मा ॥७॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
HA: replication + failover runbook ।
cache as source-of-truth मा ॥७॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| HA | HA |
| replication | replication |
| failover | failover |
| runbook | runbook |
| cache | cache |
| source-of-truth | source of truth |
| मा | not |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| source-of-truth | system of record |
| failover | promote replica |
English sense
Remote cache can be HA but must not become the only copy of business truth. Rebuild from DB after total loss.
Context / topic
Topic: durability expectations.
वृत्तमिति: ८-८-८-८।
श्लोकः ८ (अनुष्टुभ्)
स्रावः कुटुम्बयोः ॥८॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
multi-tenant key prefix mandatory ।
स्रावः कुटुम्बयोः ॥८॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| multi-tenant | multi-tenant |
| key | key |
| prefix | prefix |
| mandatory | mandatory |
| स्रावः | leak |
| कुटुम्बयोः | of two tenants |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| key prefix | tenant prefix |
| स्रावः | cross-tenant leak |
English sense
Prefix keys with tenant (and env). A missing prefix is a privacy incident.
Context / topic
Topic: tenancy. Links to multi-tenant.
वृत्तमिति: ८-८-८-८।
श्लोकः ९ (अनुष्टुभ्)
अदृश्यकैश मिथ्याजयः ॥९॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
metrics hit ratio evictions latency OOM ।
अदृश्यकैश मिथ्याजयः ॥९॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| metrics | metrics |
| hit | hit |
| ratio | ratio |
| evictions | evictions |
| latency | latency |
| OOM | OOM |
| अदृश्यकैश | unseen cache |
| मिथ्याजयः | false win |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| hit ratio | cache effectiveness |
| evictions | eviction rate |
English sense
Operate on hit ratio eviction storms and command latency not vibes.
Context / topic
Topic: cache ops metrics.
वृत्तमिति: ८-८-८-८।
श्लोकः १० (उपजाति)
दूरसञ्चयः साझः ।
सिमान्तः
HTTP ॥१०॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
सञ्चयधर्मः सामान्यः
दूरसञ्चयः साझः ।
सिमान्तः
HTTP ॥१०॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| सञ्चयधर्मः | cache treatise |
| सामान्यः | general |
| दूरसञ्चयः | remote cache |
| साझः | shared |
| सिमान्तः | edge |
| HTTP | HTTP |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| सञ्चयधर्मः | general cache |
| सिमान्तः | edge |
English sense
General cache dharma covers patterns; remote cache is the shared in-memory tier; edge cache is HTTP at the CDN.
Context / topic
Topic: three cache tiers.
सन्धिः: सञ्चयः जातिः; दूरं साझम्; सिमान्तः HTTP।
वृत्तमिति: एकादशाक्षराः पादाः।
श्लोकः ११ (अनुष्टुभ्)
एभिर्दूरसञ्चयः साझसत्यसमन्वितः ॥११॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
pattern TTL memory hotkey tenancy measure पञ्चकम् ।
एभिर्दूरसञ्चयः साझसत्यसमन्वितः ॥११॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| pattern | pattern |
| TTL | TTL |
| memory | memory |
| hotkey | hotkey |
| tenancy | tenancy |
| measure | measure |
| पञ्चकम् | five-set |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| पञ्चकम् | pattern TTL memory hotkey tenancy+metrics |
English sense
Five limbs: clear access pattern, jittered TTL/singleflight, memory ceiling, hot-key plan and tenant prefixes with metrics.
Context / topic
Topic: checklist.
वृत्तमिति: ८-८-८-८।
श्लोकः १२ (अनुष्टुभ्)
मितं स्मरणं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
इति दूरसञ्चयधर्मसारः साझसत्यसमन्वितः ।
मितं स्मरणं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| इति | thus |
| दूरसञ्चयधर्मसारः | remote-cache essence |
| साझसत्यम् | shared truth tier |
| मितम् | measured |
| स्मरणम् | memory |
| क्रियायोग्यम् | operable |
| तन्त्रधर्मः | system dharma |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| मितं स्मरणम् | measured shared memory |
| तन्त्रधर्मः | platform dharma |
English sense
Closing: share hot memory carefully; never confuse it with the system of record.
Context / topic
Topic: close.
उपसंहारन्यायः: साझं स्मर; TTL दोलय; मूलं सत्यं रक्ष।
वृत्तमिति: ८-८-८-८।
श्लोकसूची / Verse index
१. Why remote cache
२. Patterns
३. Stampede
४. Codec
५. Memory
६. Hot keys
७. HA/SoT
८. Tenancy
९. Metrics
१०. Tier map
११. Five limbs
१२. Close
सन्दर्भाः / References
- Prior: cache 2026-09-07; hashing 2026-10-10; tenancy 2026-09-08; backpressure 2026-10-07.
- Domain: Redis-class shared caches.
- English minimizable; Sanskrit-first.
- Style: no em dash; no Oxford comma in English clauses.