Benchmarking HTTPScout: Rails Performance That Surprises

| Shey Sewani | Toronto

I recently ran a load test against HTTPScout, my Rails7-based uptime monitor, and the results were unexpected– p99 latency under 35ms for the landing page which included a call to the database to load the pricing plans.

The Setup

HTTPScout runs on a VPS with 2 vCPUs at 3.79 GHz. Puma is set up with 2 workers and 2 threads per worker, and Nginx is configured with 2 workers. I’m using Ruby 3.2 with YJIT enabled and jemalloc for memory optimization. The app uses PostgreSQL 15 for its database, and everything runs on the same server.

Load Test Results

With Vegeta, I ran a load test at 70 requests per second for 60 seconds from my local machine. Rails processed 4200 requests to the landing page, with a mean latency of 12.5ms with p99 of 33.9ms!

Vegeta Load-test Results

Host Metrics

htop

During the test overall CPU utilization remained around 25%– there’s spare CPU for more traffic.

Final Thoughts

I’m excited by the results. A p99 latency under 35ms means that Rails is performant and a good option for a server-side web framework. For HTTPScout itself, it’s time to deprioritze performance work.