How many HTTP requests/second can a Single Machine handle?

https://news.ycombinator.com/rss Hits: 2
Summary

When designing systems and deciding on the architecture, I often hear justifying the use of microservices and other complex solutions because of the predicted performance and scalability needs. Out of curiosity then, let's test the limits of an extremely simple approach, the simplest possible one. Let's test a single instance of an application, with a single instance of a database, deployed to a single machine, and answer the question: How many HTTP requests per second can a Single Machine handle? Tests setupTo resemble real-world use cases as much as possible, we have the following: Java 21-based REST API built with Spring Boot 3 and using Virtual Threads PostgreSQL as a database, loaded with over one million rows of data External volume for the database - it does not write to the local file system (we use DigitalOcean Block Storage) Realistic load characteristics: tests consist primarily of read requests with approximately 20% of writes. They call our REST API which makes use of the PostgreSQL database with a reasonable amount of data (over one million rows) Single Machine in a few versions: 1 CPU, 2 GB of memory 2 CPUs, 4 GB of memory 4 CPUs, 8 GB of memory Single LoadTest.java file as a testing tool - we run it on 4 test machines, in parallel, since we usually have many http clients, not just one Everything built and running in Docker DigitalOcean as our infrastructure provider Whole infrastructure setup is automated by one Python script; it is extremely easy to run: bash setup_python_env.bash source venv/bin/activate export DO_API_TOKEN=<your DigitalOcean API token> export SSH_KEY_FINGERPRINT=<your ssh key fingerprint uploaded to DigitalOcean; it gives access to created machines> python3 prepare_infra.py <machine size: small, medium, large> In the database, we have one table with the following schema: CREATE TABLE account ( id UUID PRIMARY KEY, name TEXT NOT NULL, email TEXT UNIQUE, created_at TIMESTAMP NOT NULL DEFAULT NOW(), version BIGINT NOT NULL ); CREATE ...

First seen: 2025-08-31 18:45

Last seen: 2025-08-31 19:45