Actix Web is a Rust framework for building HTTP services. It provides an HTTP server and application router, where resources such as /hello are connected to asynchronous request handlers. section 3.5
A typical service creates shared application state, registers routes, binds an HttpServer, and runs it asynchronously. Database access can be placed in handlers through shared connection pools or synchronized connections. section 3.5
The framework appears in two related systems-programming contexts:
- Supports actor-based concurrency through Actix: actors encapsulate state, receive messages, and avoid explicit state synchronization because the runtime schedules handlers without concurrent access. section 9.2.6
- Builds REST endpoints backed by PostgreSQL or SQLite, allowing database choice and connection strategy to affect observed latency. section 3.5
- Introduces asynchronous execution and distributed communication benefits alongside nonlinear message flow and debugging challenges. section 9.2.6
A minimal database-backed endpoint
A service can register /hello, obtain a PostgreSQL connection from a pool, execute SELECT 'hello world', and return the resulting string. A wrk run using two threads and ten connections measured 1,460.66 requests per second, 8.06 ms average latency, and 33.75 ms latency at the 99th percentile. The SQLite variant reached 188,469.82 requests per second with 41 microseconds median latency, while its tail remained near 15 milliseconds versus roughly 60 milliseconds for PostgreSQL in the latency distribution comparison. section 3.5
Listing 3.1 REST API server scaffolding with PostgreSQL
The scaffold shows the operational shape of an Actix Web service: create shared state, register a resource and route, bind the server, and await its run future. section 3.5

