अनुग्रहनिरोधधर्मः। मापनकार्डिनैलिट्यां (१२ नव) लेबलाः। अत्र कथं म्रियते सेवा। SIGTERM, drain, readiness। न सहसा वधः; निरोधधर्मः

English (minimizable)

After metrics cardinality (12 Nov), this post covers graceful shutdown: ordered SIGTERM steps, readiness before death, bounded drains, mesh and LB coordination, worker nack or checkpoint, stateful flush, aligned grace timers and drain metrics.

पूर्ण-शीर्षकम् / Full title

अनुग्रहनिरोधधर्मः: A Metrical Codification of Graceful Shutdown (with English glosses)

English · overview and topics (minimizable)

What this post is about

Graceful shutdown is the ordered exit path that stops new work, drains in-flight requests and hands off jobs before process death.

Topics covered

  1. Why sudden death hurts
  2. Ordered SIGTERM handling
  3. Readiness before liveness kill
  4. Bounded drain and cancel
  5. Mesh and LB drain
  6. Worker checkpoint or nack
  7. Stateful flush
  8. preStop vs grace alignment
  9. In-flight drain metrics
  10. Shed vs shutdown vs WAL

Sanskrit title

अनुग्रहनिरोधधर्मः = anugraha-nirodha-dharmaḥ “dharma of gracious stopping”.

English

Minimizable; Sanskrit-first.

परम्परा-सन्धिः / Series links
पूर्वं / Prior अत्र / Adds न पुनः / Does not repeat
मापनकार्डिनैलिटीधर्मः (१२ नव) metrics prior day
स्वास्थ्यप्रबोधः (११ अक्टो) probes ready vs live
भारत्यागधर्मः (५ नव) shed overload contrast
लेखनाग्रधर्मः (२७ अक्टो) WAL flush on exit
इदम् graceful drain exit -
ग्राह्य-त्याज्य-विवेकः / Keep and avoid

ग्राह्यम् / Keep

१. not-ready first: then close listen
२. bound drain time: then cancel clear
३. coordinate LB/mesh drain: with app
४. nack/checkpoint jobs: no ack-then-die
५. flush stateful journals: in grace
६. align hooks and gracePeriod: with slack
७. metric inflight during drain: prove safety

त्याज्यम् / Avoid

  • kill ready pods without draining
  • ack queue messages then exit immediately
  • preStop longer than terminationGracePeriod always
अध्याय-योजना / Chapter plan
प्रकरणम् विषयः छन्दः श्लोकाः
मङ्गलं बीजं च / Opening अनुष्टुभ्
मूलतत्त्वानि / Core अनुष्टुभ्
मुख्यविधिः / Method उपजाति
रक्षा · विधिः / Guards अनुष्टुभ्
विवेक · सीमा / Judgment अनुष्टुभ्
पूर्वसन्धिः / Series links उपजाति
उपसंहारः / Close अनुष्टुभ्
पारिभाषिक-कोशः / Glossary
Modern English संस्कृतम् Note
graceful shutdown अनुग्रहनिरोधः  
drain रिक्तीकरणम् / drain  
SIGTERM समाप्तिसंकेतः  
readiness तत्परता  
liveness जीवन्तता  
preStop पूर्वनिरोधहुक  
terminationGracePeriod अनुग्रहकालः  
in-flight मध्यगतम्  
connection draining सम्बन्धरिक्तिः  
nack अस्वीकारः / nack  

श्लोकः १ (अनुष्टुभ्)

सेवा यदि सहसा म्रियते तदा मध्यगता अनुरोधाः नश्यन्ति ।
अनुग्रहनिरोधधर्मस्तस्माद् क्रमशः रिक्तिः ॥१॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
सेवा यदि सहसा म्रियते तदा मध्यगता अनुरोधाः नश्यन्ति । अनुग्रहनिरोधधर्मस्तस्माद् क्रमशः रिक्तिः ॥१॥

Word-for-word

संस्कृतपदम् Word-for-word English
सेवा service
सहसा suddenly
म्रियते dies
मध्यगताः in-flight
अनुरोधाः requests
नश्यन्ति perish
अनुग्रहनिरोधधर्मः graceful-stop dharma
क्रमशः stepwise
रिक्तिः emptying

Gloss table

पदम् अर्थः / sense
अनुग्रहनिरोधधर्मः graceful-shutdown dharma
क्रमशः रिक्तिः ordered drain

English sense
Graceful shutdown stops new admissions, drains in-flight work and then exits so deploys and scale-in do not chop live requests.

Context / topic
Topic: why drain. Distinct from crash recovery and from load shed under overload.

वृत्तमिति: ८-८-८-८।

श्लोकः २ (अनुष्टुभ्)

SIGTERM handler ordered steps ।
default kill 30s blind ॥२॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
SIGTERM handler ordered steps । default kill 30s blind ॥२॥

Word-for-word

संस्कृतपदम् Word-for-word English
SIGTERM SIGTERM
handler handler
ordered ordered
steps steps
default default
kill kill
30s 30s
blind blind

Gloss table

पदम् अर्थः / sense
ordered steps unready close drain exit
blind kill data loss

English sense
On terminate mark not-ready, close listeners, wait in-flight then exit. Relying on a hard kill alone drops work.

Context / topic
Topic: signal handling.

वृत्तमिति: ८-८-८-८।

श्लोकः ३ (अनुष्टुभ्)

fail readiness before liveness ।
kill while still ready युद्धाय ॥३॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
fail readiness before liveness । kill while still ready युद्धाय ॥३॥

Word-for-word

संस्कृतपदम् Word-for-word English
fail fail
readiness readiness
before before
liveness liveness
kill kill
while while
still still
ready ready
युद्धाय for war

Gloss table

पदम् अर्थः / sense
readiness first stop new traffic
liveness kill early chop

English sense
Leave the load balancer before you stop the process. Killing a still-ready pod invites new work into a dying body.

Context / topic
Topic: probe order.

वृत्तमिति: ८-८-८-८।

श्लोकः ४ (अनुष्टुभ्)

drain timeout + forced cancel ।
endless wait stuck deploy ॥४॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
drain timeout + forced cancel । endless wait stuck deploy ॥४॥

Word-for-word

संस्कृतपदम् Word-for-word English
drain drain
timeout timeout
forced forced
cancel cancel
endless endless
wait wait
stuck stuck
deploy deploy

Gloss table

पदम् अर्थः / sense
drain timeout bound wait
endless wait blocks rollouts

English sense
Bound drain time then cancel remaining work with clear errors. Infinite grace freezes deployments.

Context / topic
Topic: bounded drain.

वृत्तमिति: ८-८-८-८।

श्लोकः ५ (उपजाति)

mesh/LB connection draining
पूर्वम् ।
app-only close
अपूर्णम् ॥५॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
mesh/LB connection draining पूर्वम् । app-only close अपूर्णम् ॥५॥

Word-for-word

संस्कृतपदम् Word-for-word English
mesh mesh
LB LB
connection connection
draining draining
पूर्वम् first
app-only app only
close close
अपूर्णम् incomplete

Gloss table

पदम् अर्थः / sense
LB drain edge stop
app-only half story

English sense
Coordinate proxy and mesh drain with the app. App close alone still receives connections from a hot listener.

Context / topic
Topic: data plane drain.

वृत्तमिति: एकादशाक्षराः पादाः।

श्लोकः ६ (अनुष्टुभ्)

in-flight jobs checkpoint or nack ।
ack then die poison ॥६॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
in-flight jobs checkpoint or nack । ack then die poison ॥६॥

Word-for-word

संस्कृतपदम् Word-for-word English
in-flight in-flight
jobs jobs
checkpoint checkpoint
nack nack
ack ack
then then
die die
poison poison

Gloss table

पदम् अर्थः / sense
checkpoint nack safe handoff
ack then die lost work

English sense
Workers should nack or checkpoint before exit so messages redeliver instead of vanishing after ack.

Context / topic
Topic: async workers.

वृत्तमिति: ८-८-८-८।

श्लोकः ७ (अनुष्टुभ्)

stateful: flush WAL / close sessions ।
half write residual ॥७॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
stateful: flush WAL / close sessions । half write residual ॥७॥

Word-for-word

संस्कृतपदम् Word-for-word English
stateful stateful
flush flush
WAL WAL
close close
sessions sessions
half half
write write
residual residual

Gloss table

पदम् अर्थः / sense
flush close durable handoff
half write corrupt risk

English sense
Stateful nodes flush journals and close sessions cleanly within the grace window.

Context / topic
Topic: stateful drain.

वृत्तमिति: ८-८-८-८।

श्लोकः ८ (अनुष्टुभ्)

preStop hook + terminationGracePeriod aligned ।
hook > grace truncated ॥८॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
preStop hook + terminationGracePeriod aligned । hook > grace truncated ॥८॥

Word-for-word

संस्कृतपदम् Word-for-word English
preStop preStop
hook hook
terminationGracePeriod terminationGracePeriod
aligned aligned
hook hook
grace grace
truncated truncated

Gloss table

पदम् अर्थः / sense
aligned timers hooks fit
hook longer killed mid-hook

English sense
Make hook duration fit inside the platform grace period with slack for final kill.

Context / topic
Topic: platform timers.

वृत्तमिति: ८-८-८-८।

श्लोकः ९ (अनुष्टुभ्)

metrics: inflight during drain zeroed ।
invisible chop अन्धता ॥९॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
metrics: inflight during drain zeroed । invisible chop अन्धता ॥९॥

Word-for-word

संस्कृतपदम् Word-for-word English
metrics metrics
inflight inflight
during during
drain drain
zeroed zeroed
invisible invisible
chop chop
अन्धता blindness

Gloss table

पदम् अर्थः / sense
inflight gauge see drain
invisible no proof

English sense
Export in-flight counts and drain duration so rollouts prove they did not chop.

Context / topic
Topic: observability.

वृत्तमिति: ८-८-८-८।

श्लोकः १० (उपजाति)

भारत्यागः overload refuse
निरोधः planned exit ।
लेखनाग्रः
flush truth ॥१०॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
भारत्यागः overload refuse निरोधः planned exit । लेखनाग्रः flush truth ॥१०॥

Word-for-word

संस्कृतपदम् Word-for-word English
भारत्यागः load shed
overload overload
refuse refuse
निरोधः shutdown
planned planned
exit exit
लेखनाग्रः WAL
flush flush
truth truth

Gloss table

पदम् अर्थः / sense
भारत्यागः load shed
लेखनाग्रः WAL

English sense
Load shed refuses under pressure; graceful stop drains on purpose; WAL flush protects durable intent during exit.

Context / topic
Topic: series distinctions.

सन्धिः: त्याग आपात; निरोध योजना; अग्र दृढता

वृत्तमिति: एकादशाक्षराः पादाः।

श्लोकः ११ (अनुष्टुभ्)

ready-first bound-drain mesh jobs timers पञ्चकम् ।
एभिरनुग्रहनिरोधधर्मः क्रमशरिक्तिसमन्वितः ॥११॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
ready-first bound-drain mesh jobs timers पञ्चकम् । एभिरनुग्रहनिरोधधर्मः क्रमशरिक्तिसमन्वितः ॥११॥

Word-for-word

संस्कृतपदम् Word-for-word English
ready-first ready-first
bound-drain bound-drain
mesh mesh
jobs jobs
timers timers
पञ्चकम् five-set

Gloss table

पदम् अर्थः / sense
पञ्चकम् ready-first bound-drain mesh jobs timers

English sense
Five limbs: not-ready before death, bounded drain with cancel, mesh and LB coordination, safe job handoff and aligned platform timers.

Context / topic
Topic: checklist.

वृत्तमिति: ८-८-८-८।

श्लोकः १२ (अनुष्टुभ्)

इत्यनुग्रहनिरोधधर्मसारः क्रमशरिक्तिसमन्वितः ।
मितं निर्गमनं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥
पदच्छेदः · Word-for-word · English (minimizable)

पदच्छेदः
इत्यनुग्रहनिरोधधर्मसारः क्रमशरिक्तिसमन्वितः । मितं निर्गमनं क्रियायोग्यं तन्त्रधर्मः स उच्यते ॥१२॥

Word-for-word

संस्कृतपदम् Word-for-word English
इति thus
अनुग्रहनिरोधधर्मसारः graceful-stop essence
क्रमशरिक्तिः ordered emptying
मितम् measured
निर्गमनम् exit
क्रियायोग्यम् operable
तन्त्रधर्मः system dharma

Gloss table

पदम् अर्थः / sense
मितं निर्गमनम् measured exit
तन्त्रधर्मः platform dharma

English sense
Closing: stop admissions, finish or requeue work and only then let the process die.

Context / topic
Topic: close.

उपसंहारन्यायः: अप्रवेशं कुरु; मध्यगं पालय; ततः म्रियस्व।

वृत्तमिति: ८-८-८-८।

श्लोकसूची / Verse index

१. Why drain
२. SIGTERM order
३. Ready first
४. Bound drain
५. Mesh/LB
६. Workers
७. Stateful
८. Timers
९. Metrics
१०. Series
११. Five limbs
१२. Close

सन्दर्भाः / References
  1. Prior: cardinality 2026-11-12; health 2026-10-11; load shed 2026-11-05; WAL 2026-10-27.
  2. Domain: graceful shutdown and drain.
  3. English minimizable; Sanskrit-first.
  4. Style: no em dash; no Oxford comma in English clauses.