- The first server is a simple Node.js project with a
/simpleroute that returns a JSON message.16:3616:54 - The uploader stresses that the language is not the main idea at this point; the same route shape could exist in Python, Go, Rust, Java Spring, or another backend stack.
17:11 - The local server runs on port
3001, connects to Redis and PostgreSQL, and returnsmessage: hifrom/simple.17:3317:56 - One request means the client sends bytes to the server, receives a
200response plus the body, and counts that complete round trip.17:5618:25 - AutoCannon is installed with
npm i -g autocannonand is used to simulate thousands or millions of requests against the API.18:45 - The first local benchmark uses 20 connections, 20 seconds, pipelining of 2, and a
GETrequest to/simple.19:17 - The first result is about 18,000 requests per second, 300,000 total requests over the run, no errors, and about 90 MB transferred.
20:04
Chapter notes
Getting started with a simple API benchmark
Cododev · 2:39:18 · English