update docs
This commit is contained in:
58
docs/graphs/lifecycle.dot
Normal file
58
docs/graphs/lifecycle.dot
Normal file
@@ -0,0 +1,58 @@
|
||||
digraph lifecycle {
|
||||
rankdir=TB
|
||||
bgcolor="#0a0e17"
|
||||
fontname="Helvetica"
|
||||
node [fontname="Helvetica" fontsize=11 style=filled color="#1e2a4a" fontcolor="#e8eaf0"]
|
||||
edge [fontname="Helvetica" fontsize=9 fontcolor="#8892a8" color="#4a5568"]
|
||||
|
||||
label="Lambda execution environment lifecycle"
|
||||
labelloc=t
|
||||
fontsize=16
|
||||
fontcolor="#0066ff"
|
||||
|
||||
subgraph cluster_cold {
|
||||
label="Cold start (first invocation on a fresh execution environment)"
|
||||
style=dashed
|
||||
color="#ff3d00"
|
||||
fontcolor="#ff3d00"
|
||||
|
||||
download [label="1. Download code\nzip / container layers" fillcolor="#243056" shape=box]
|
||||
bootstrap [label="2. Start runtime\nbootstrap (python3.x)" fillcolor="#243056" shape=box]
|
||||
init [label="3. Init phase\nrun module-level code\nimport boto3 / aioboto3\nbuild clients\n(billed; capped at 10 s)" fillcolor="#1a1a3a" shape=box fontcolor="#ffc107"]
|
||||
}
|
||||
|
||||
subgraph cluster_invoke {
|
||||
label="Invocation"
|
||||
style=dashed
|
||||
color="#1e2a4a"
|
||||
fontcolor="#8892a8"
|
||||
|
||||
handler [label="handler(event, context)\nyour code runs\n(billed)" fillcolor="#0d1a33" shape=box]
|
||||
respond [label="return / raise" fillcolor="#121829" shape=box]
|
||||
}
|
||||
|
||||
subgraph cluster_warm {
|
||||
label="Warm reuse (subsequent invocations on the same environment)"
|
||||
style=dashed
|
||||
color="#00c853"
|
||||
fontcolor="#00c853"
|
||||
|
||||
thaw [label="thaw\n(microseconds)" fillcolor="#1a3a1a" shape=box]
|
||||
reuse [label="globals retained:\nclients, /tmp,\nin-memory caches" fillcolor="#1a3a1a" shape=note fontcolor="#00c853"]
|
||||
}
|
||||
|
||||
freeze [label="freeze\nprocess paused\n(after handler returns)" fillcolor="#121829" shape=box]
|
||||
shutdown [label="shutdown\nidle ~5–15 min →\nenv torn down\n/tmp gone" fillcolor="#121829" shape=box fontcolor="#ff3d00"]
|
||||
|
||||
download -> bootstrap
|
||||
bootstrap -> init
|
||||
init -> handler [label="event arrives" color="#0066ff"]
|
||||
handler -> respond
|
||||
respond -> freeze
|
||||
|
||||
freeze -> thaw [label="next event" color="#00c853"]
|
||||
thaw -> handler [label="reuse env" color="#00c853"]
|
||||
reuse -> handler [style=dotted color="#00c853"]
|
||||
|
||||
freeze -> shutdown [label="idle too long" style=dashed color="#ff3d00"]
|
||||
}
|
||||
Reference in New Issue
Block a user