Skip to content

Instantly share code, notes, and snippets.

@nabinno
Created September 29, 2020 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nabinno/286a5c6e95d400e5e89997d0714bb87b to your computer and use it in GitHub Desktop.
Save nabinno/286a5c6e95d400e5e89997d0714bb87b to your computer and use it in GitHub Desktop.
AWS Lambdaの裏側をなるだけ詳しく解説してみる - https://www.keisuke69.net/entry/2020/09/29/131203
@startuml
skinparam monochrome true
skinparam backgroundColor #EEEEEE
control ALB as LB
actor "Front\nEnd" as FE
actor "Counting\nService" as CS
actor "Worker\nManager" as WM
actor Worker as W
actor "Placement\nService" as PS
actor Poller as P
actor "State Manager\nStream Tracker" as SM
actor "Leasing\nService" as LS
collections SQS as Q
group 同期実行
LB -> FE
activate LB
activate FE
FE -> WM: |Request|\n- Reserve Sandbox
deactivate FE
activate WM
alt 初回呼出
WM -> PS
deactivate WM
activate PS
PS -> W
deactivate PS
activate W
end
W -> W: |Invoke|
deactivate W
end
group 非同期実行/スケールアップ
LB -> FE
deactivate LB
activate FE
FE -> Q: |SendMessage|
deactivate FE
activate Q
group スケールアップ
SM -> Q: Workを探索
activate SM
alt 関数の同時実行数の設定が小さい場合
SM -> LS
activate LS
LS -> P: Pollerの割当を作成\n(Poller Assignment Dataに書込)
activate P
else
SM -> Q: 新たにdedicatedなキューを作成
deactivate SM
end
end
LS -> P: ヘルスチェック
deactivate LS
P -> Q: |ReceiveMessage|\n|DeleteMessage|
deactivate Q
P -> FE: |Invoke|
deactivate P
activate FE
group 非同期実行
FE -> WM: |Request|\n- Reserve Sandbox
deactivate FE
activate WM
alt 初回呼出
WM -> PS
deactivate WM
activate PS
PS -> W
deactivate PS
activate W
end
W -> W: |Invoke|
deactivate W
end
end
@enduml
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment