एकधाउड्डयनधर्मः। कनारीवितरणे (२ नव) मितभोगः। अत्र शतपृच्छा एककार्यम्। singleflight, stampede, soft TTL। न unique write; एकधाधर्मः।
English (minimizable)
After canary (2 Nov), this post covers singleflight request coalescing: key design, thundering herds, error fanout, per-waiter timeouts, safe read-only uses, multi-instance leases, cancel policy and how it sits beside cache and backpressure.
पूर्ण-शीर्षकम् / Full title
एकधाउड्डयनधर्मः: A Metrical Codification of Singleflight Coalescing (with English glosses)
English · overview and topics (minimizable)
What this post is about
Singleflight ensures concurrent callers for the same expensive work share one in-flight execution.
Topics covered
- Coalesce identical work
- Key identity design
- Thundering herd and soft TTL
- Shared error policy
- Per-waiter timeouts
- Reads not unique writes
- Suppression metrics
- Multi-instance leases
- Cancel versus remaining waiters
- Cache backpressure links
Sanskrit title
एकधाउड्डयनधर्मः = ekadhā-uḍḍayana-dharmaḥ “dharma of single flight”.
English
Minimizable; Sanskrit-first.
परम्परा-सन्धिः / Series links
| पूर्वं / Prior | अत्र / Adds | न पुनः / Does not repeat |
|---|---|---|
| सञ्चयधर्मः (७ सितम्बे) | cache | warm path |
| प्रतिदाबधर्मः (७ अक्टो) | backpressure | admission |
| सूत्रपूलन्यायः (१७ अक्टो) | pools | related concurrency |
| कनारीवितरणधर्मः (२ नव) | canary | prior day |
| इदम् | singleflight coalesce | - |
ग्राह्य-त्याज्य-विवेकः / Keep and avoid
ग्राह्यम् / Keep
१. key by logical work: not too coarse
२. pair with soft TTL: on cache fill
३. define error stickiness: for waiters
४. independent waiter deadlines: always
५. reads and pure compute only: no distinct writes
६. measure suppressions: prove value
७. plan multi-pod herd: lease or edge
त्याज्यम् / Avoid
- singleflight distinct checkout posts
- no per-waiter timeout on hung leader
- local-only coalesce with 500 pods and no lease
अध्याय-योजना / Chapter plan
| प्रकरणम् | विषयः | छन्दः | श्लोकाः |
|---|---|---|---|
| १ | मङ्गलं बीजं च / Opening | अनुष्टुभ् | २ |
| २ | मूलतत्त्वानि / Core | अनुष्टुभ् | २ |
| ३ | मुख्यविधिः / Method | उपजाति | १ |
| ४ | रक्षा · विधिः / Guards | अनुष्टुभ् | २ |
| ५ | विवेक · सीमा / Judgment | अनुष्टुभ् | २ |
| ६ | पूर्वसन्धिः / Series links | उपजाति | १ |
| ७ | उपसंहारः / Close | अनुष्टुभ् | २ |
पारिभाषिक-कोशः / Glossary
| Modern English | संस्कृतम् | Note |
|---|---|---|
| singleflight | एकधाउड्डयनम् | |
| request coalescing | अनुरोधसंघातनम् | |
| thundering herd | गर्जनयूथम् | |
| soft TTL | मृदुसमाप्तिः | |
| stale-while-revalidate | जीर्णपुनःप्रमाणम् | |
| in-flight | उड्डयने | |
| waiter | प्रतीक्षकः | |
| negative cache | नकारात्मकसञ्चयः | |
| lease | पट्टः / lease | |
| suppression count | निग्रहगणना |
श्लोकः १ (अनुष्टुभ्)
एकधाउड्डयनधर्मस्तस्माद् संघातपठनम् ॥१॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
एकमेव दुःसाध्यं कार्यं यदि शतं युगपत् पृच्छन्ति ।
एकधाउड्डयनधर्मस्तस्माद् संघातपठनम् ॥१॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| एकमेव | only one |
| दुःसाध्यम् | hard |
| कार्यम् | work |
| शतम् | hundred |
| युगपत् | at once |
| पृच्छन्ति | ask |
| एकधाउड्डयनधर्मः | singleflight dharma |
| संघातपठनम् | joined reading |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| एकधाउड्डयनधर्मः | singleflight dharma |
| संघातपठनम् | coalesced read |
English sense
Singleflight coalesces concurrent identical in-flight work into one execution and shares the result with all waiters.
Context / topic
Topic: why singleflight. Distinct from cache which may already be cold for all.
वृत्तमिति: ८-८-८-८।
श्लोकः २ (अनुष्टुभ्)
coarse key stampede residual ॥२॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
key = logical operation identity ।
coarse key stampede residual ॥२॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| key | key |
| logical | logical |
| operation | operation |
| identity | identity |
| coarse | coarse |
| key | key |
| stampede | stampede |
| residual | residual |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| logical identity | same work key |
| coarse key | over-merge |
English sense
Choose keys that mean the same expensive work. Too coarse merges unrelated calls; too fine stops helping.
Context / topic
Topic: key design.
वृत्तमिति: ८-८-८-८।
श्लोकः ३ (अनुष्टुभ्)
singleflight + soft TTL ॥३॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
thundering herd on expiry ।
singleflight + soft TTL ॥३॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| thundering | thundering |
| herd | herd |
| expiry | expiry |
| singleflight | singleflight |
| soft | soft |
| TTL | TTL |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| thundering herd | mass recompute |
| soft TTL | stale while revalidate |
English sense
Cache expiry often stampedes origin. Combine singleflight with stale-while-revalidate patterns.
Context / topic
Topic: herd control.
वृत्तमिति: ८-८-८-८।
श्लोकः ४ (अनुष्टुभ्)
poison one fails all briefly ॥४॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
errors shared to waiters carefully ।
poison one fails all briefly ॥४॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| errors | errors |
| shared | shared |
| waiters | waiters |
| poison | poison |
| one | one |
| fails | fails |
| all | all |
| briefly | briefly |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| shared errors | fanout failure |
| poison | bad result cache |
English sense
Decide whether failures fan out to waiters and how long a negative result is sticky.
Context / topic
Topic: error fanout.
वृत्तमिति: ८-८-८-८।
श्लोकः ५ (उपजाति)
पृथक् ।
leader hang
सर्वान् मा बध्नातु ॥५॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
timeouts per waiter
पृथक् ।
leader hang
सर्वान् मा बध्नातु ॥५॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| timeouts | timeouts |
| per | per |
| waiter | waiter |
| पृथक् | separate |
| leader | leader |
| hang | hang |
| सर्वान् | all |
| मा बध्नातु | must not bind |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| per waiter timeout | independent cancel |
| leader hang | one slow does all |
English sense
Each waiter needs its own deadline. One hung leader must not pin every client forever.
Context / topic
Topic: waiter deadlines.
वृत्तमिति: एकादशाक्षराः पादाः।
श्लोकः ६ (अनुष्टुभ्)
coalesce reads and pure compute ॥६॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
not for unique user writes ।
coalesce reads and pure compute ॥६॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| not | not |
| unique | unique |
| user | user |
| writes | writes |
| coalesce | coalesce |
| reads | reads |
| pure | pure |
| compute | compute |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| unique writes | must not merge |
| pure compute | safe class |
English sense
Do not singleflight distinct mutating requests. Coalesce cache fills and idempotent pure compute.
Context / topic
Topic: safe use cases.
वृत्तमिति: ८-८-८-८।
श्लोकः ७ (अनुष्टुभ्)
invisible savings अन्धता ॥७॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
metrics: in-flight shared suppressed ।
invisible savings अन्धता ॥७॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| metrics | metrics |
| in-flight | in-flight |
| shared | shared |
| suppressed | suppressed |
| invisible | invisible |
| savings | savings |
| अन्धता | blindness |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| suppressed | coalesced away |
| invisible savings | no metric |
English sense
Count how many calls were suppressed. Without that number you cannot prove the pattern earns its complexity.
Context / topic
Topic: observability.
वृत्तमिति: ८-८-८-८।
श्लोकः ८ (अनुष्टुभ्)
local-only multi-pod residual herd ॥८॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
distributed singleflight needs lease ।
local-only multi-pod residual herd ॥८॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| distributed | distributed |
| singleflight | singleflight |
| lease | lease |
| local-only | local only |
| multi-pod | multi-pod |
| residual | residual |
| herd | herd |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| distributed lease | cross-instance lock |
| local-only | per process |
English sense
Process-local singleflight still herds across pods. Use a short lease or edge coalesce when N is large.
Context / topic
Topic: multi-instance.
वृत्तमिति: ८-८-८-८।
श्लोकः ९ (अनुष्टुभ्)
policy स्पष्टा ॥९॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
context cancel: leader may finish for others ।
policy स्पष्टा ॥९॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| context | context |
| cancel | cancel |
| leader | leader |
| finish | finish |
| others | others |
| policy | policy |
| स्पष्टा | clear |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| cancel policy | leader vs waiters |
| finish for others | detached work |
English sense
If the first caller cancels, decide whether work continues for remaining waiters or aborts for all.
Context / topic
Topic: cancellation policy.
वृत्तमिति: ८-८-८-८।
श्लोकः १० (उपजाति)
एकधा cold stampede ।
प्रतिदाबः
प्रवेश द्वारम् ॥१०॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
सञ्चयः warm hit
एकधा cold stampede ।
प्रतिदाबः
प्रवेश द्वारम् ॥१०॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| सञ्चयः | cache |
| warm | warm |
| hit | hit |
| एकधा | singleflight |
| cold | cold |
| stampede | stampede |
| प्रतिदाबः | backpressure |
| प्रवेश | entry |
| द्वारम् | gate |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| सञ्चयः | cache |
| प्रतिदाबः | backpressure |
English sense
Caches serve warm hits; singleflight collapses cold stampedes; backpressure still gates total admission when everything is cold.
Context / topic
Topic: series distinctions.
सन्धिः: सञ्चय उष्ण; एकधा शीतसंघातः; दाब द्वार।
वृत्तमिति: एकादशाक्षराः पादाः।
श्लोकः ११ (अनुष्टुभ्)
एभिरेकधाउड्डयनधर्मः संघातपठनसमन्वितः ॥११॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
key herd error-timeout multi-instance metrics पञ्चकम् ।
एभिरेकधाउड्डयनधर्मः संघातपठनसमन्वितः ॥११॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| key | key |
| herd | herd |
| error-timeout | error-timeout |
| multi-instance | multi-instance |
| metrics | metrics |
| पञ्चकम् | five-set |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| पञ्चकम् | key herd error-timeout multi-instance metrics |
English sense
Five limbs: precise keys, herd control with soft TTL, clear error and cancel policy, multi-instance plan and suppression metrics.
Context / topic
Topic: checklist.
वृत्तमिति: ८-८-८-८।
श्लोकः १२ (अनुष्टुभ्)
मितमेककार्यं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
पदच्छेदः · Word-for-word · English (minimizable)
पदच्छेदः
इत्येकधाउड्डयनधर्मसारः संघातपठनसमन्वितः ।
मितमेककार्यं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
Word-for-word
| संस्कृतपदम् | Word-for-word English |
|---|---|
| इति | thus |
| एकधाउड्डयनधर्मसारः | singleflight essence |
| संघातपठनम् | coalesced read |
| मितम् | measured |
| एककार्यम् | one task |
| क्रियायोग्यम् | operable |
| तन्त्रधर्मः | system dharma |
Gloss table
| पदम् | अर्थः / sense |
|---|---|
| मितमेककार्यम् | measured one work |
| तन्त्रधर्मः | platform dharma |
English sense
Closing: one flight for identical work, many waiters and honest timeouts.
Context / topic
Topic: close.
उपसंहारन्यायः: एकं कुरु; बहून् पायय; कालं पृथक् रक्ष।
वृत्तमिति: ८-८-८-८।
श्लोकसूची / Verse index
१. Why SF
२. Keys
३. Herd
४. Errors
५. Timeouts
६. Safe cases
७. Metrics
८. Multi-instance
९. Cancel
१०. Series
११. Five limbs
१२. Close
सन्दर्भाः / References
- Prior: cache 2026-09-07; backpressure 2026-10-07; canary 2026-11-02.
- Domain: singleflight coalescing.
- English minimizable; Sanskrit-first.
- Style: no em dash; no Oxford comma in English clauses.