mirror of
https://github.com/actix/actix-website
synced 2025-06-27 23:49:02 +02:00
Architecture diagrams of HttpServer and Connection lifecycle (#148)
* add arch diagrams and menu * fix colors for arch diagrams * refine architecture diagrams, ready for review * capitalize titles and add mmdc instruction * apply code review requested changes * Add links to accept, worker and dispatcher too
This commit is contained in:
committed by
Yuki Okushi
parent
53214f4727
commit
c1a8103cbc
34
static/img/diagrams/connection_overview.mmd
Normal file
34
static/img/diagrams/connection_overview.mmd
Normal file
@ -0,0 +1,34 @@
|
||||
sequenceDiagram
|
||||
|
||||
participant ServerBuilder
|
||||
participant Accept
|
||||
participant WorkerClient
|
||||
participant Worker
|
||||
participant Dispatcher
|
||||
|
||||
ServerBuilder->>Accept: start(socks, workers)
|
||||
|
||||
Note over Accept: accept Connections
|
||||
loop poll connections on sockets
|
||||
activate Accept
|
||||
Accept-->>Accept: poll() --> Conn
|
||||
Note over Accept: backpressure logic
|
||||
Accept->>WorkerClient: send(Conn)
|
||||
end
|
||||
deactivate Accept
|
||||
|
||||
Note over Worker: process Connections
|
||||
loop Worker as Future::poll
|
||||
activate Worker
|
||||
Worker->>WorkerClient: rx.poll_next()
|
||||
Note over Worker: Service factories
|
||||
Worker-->>Dispatcher: new(stream)
|
||||
end
|
||||
deactivate Worker
|
||||
|
||||
Note over Dispatcher: process Requests
|
||||
loop Dispatcher::poll
|
||||
activate Dispatcher
|
||||
Dispatcher-->>Dispatcher: Dispatch requests
|
||||
end
|
||||
deactivate Dispatcher
|
Reference in New Issue
Block a user