What HTTP Requests per Second Can a Single Machine Handle?

0
13
Asked By TechWhiz42 On

I'm working on system design and I'm really curious about the performance limits of a simplified architecture: how much can a single machine handle in terms of HTTP requests per second? I set up a basic environment with the following specs: a Java 21-based REST API using Spring Boot 3 and Virtual Threads, backed by a PostgreSQL database with over a million rows, all running in Docker on DigitalOcean. I tested different configurations of the machine: one with 1 CPU and 2 GB RAM, another with 2 CPUs and 4 GB RAM, and a larger setup with 4 CPUs and 8 GB RAM.

I also included realistic load characteristics, focusing on read requests with a few writes mixed in. From my testing, a lot of requests can be handled by a single machine. So, I'd love to hear your thoughts and insights on this! How many requests can a single machine actually sustain under load?

3 Answers

Answered By DevOpsDude85 On

You're spot on about the middle ground here! A well-designed shared database with caching solutions like Redis can allow you to leverage multiple instances of monolithic applications effectively. Setting up read replicas is also a game-changer if you need higher availability and performance.

CloudMasterX -

Exactly! A stateless monolith can work great until you actually need to scale the team or system, then transitioning becomes much easier.

Answered By CodeNinja_99 On

It's interesting to see how much a single machine can still handle today! Even with just 8 CPUs, which might sound small now, you can still get a lot of performance out of it for basic use cases. My laptop has 12 CPUs, and when I think ‘huge’, I expect at least hundreds of CPUs to really push limits.

GadgetGuru88 -

Yeah, the point was to showcase how even modest machines have decent capabilities. Sometimes, it’s more about the right architecture over just throwing more resources at the problem!

Answered By OldSchoolCoder On

I remember getting decent RPS even on older hardware! It sounds like there might be some overhead in your setup, especially with the database and the layers you're using. An SSD can handle a lot of reads, so it’s curious why you aren’t hitting higher numbers. What kind of database transactions are you handling?

BinaryIgor -

Good point! I'm making sure there's a mix of reads and writes on the SSD-backed storage. There's definitely some overhead with the block storage, even if it does get pretty close to the local network speeds.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.