HACKER Q&A
📣 Alifatisk

What do you use to stress test your web application?


I've had my eyes on wrk2 [1]

1. https://github.com/giltene/wrk2

But I am curious, what does HN use? Any tips?


  👤 LinuxBender Accepted Answer ✓
One thing I have seen done in the past with some success is to have a page that only your monitoring tools have access to that iterates through your stack, hitting everything from the least to most expensive tasks, displays timing metrics and queue sizes. When hit with no parameters, just gives simple statistics that a monitoring tool can log. With parameters, gets more detailed stats.

The simple view can be used by load balancers to determine a better distribution of load and keep new traffic off nodes that are about to be in trouble until their queues clear out. The more complex views can be used to help DevOps people find bottlenecks and do capacity planning.

It would be up to your developers to create either a simple HTML interface for this, or an API, whichever fits your workflow needs. The data could then be ingested by tools like Grafana or Prometheus.

Once all those metrics and load tuning are in place then simple tools like "ab" Apache Bench could be used to hit the monitoring page with parameters that trigger a bigger load. Use your graph tools to see which parts of the stack get into trouble first. This methodology is potentially also useful to rinse-and-repeat from Dev to QA to Staging to Production to see if "one of these things is not like the other" and if so, the team must play the song.


👤 gtirloni

👤 contextnavidad

👤 cebert
Running multiple Playwright tests has worked well if you want to simulate actual web clients. Alternatively, if your focus is more on the API Artillery.io is great too.

👤 breckenedge
Apache’s ab and make sure you give a heads up to your hosting provider

👤 stefanos82
I use both wrk and siege to stress test my demos, if that helps.