A REST API is an HTTP-based interface that exposes operations through web endpoints and produces HTTP responses. A minimal server can register a GET /hello route, dispatch it to a handler, and return data obtained from a database. section 3.5
REST APIs also provide a useful boundary for measuring system latency. The placement of the database relative to the API server can dominate performance: embedding SQLite removes network access, while PostgreSQL introduces client-server communication. section 3.5 section 3.6
A database-backed greeting endpoint
A GET request to /hello invokes say_hello. The PostgreSQL version obtains a pooled connection and executes SELECT 'hello world'; the SQLite version locks an embedded connection and executes the equivalent query. In the reported benchmarks, PostgreSQL averaged 8.06 ms and 1,460 requests per second, while SQLite averaged 97.66 microseconds and 188,469 requests per second.





















