An application that copes all day and falls over at peak has almost always run out of a finite resource that only high concurrency uses up: database connections, application server threads, memory, or time spent waiting on an external service. To prove which one, you first measure the real peak, minute by minute, in your logs. A test then replays that peak on an environment close to production while every layer is measured on the same clock, which lets you name the first resource to saturate instead of guessing.
The hour your application goes down is usually the hour it was meant to earn the most: the promotion evening, the month-end close, payday. Lost sales don't always come back the next day, and while the call centre absorbs the customers' anger, development blames the hosting and the host blames the code. Someone then doubles the servers, which changes nothing when the limit is a pool setting or a slow supplier. Slowness that persists off-peak is a different diagnosis, covered in our guide to slow websites.
Which log file should you ask operations for today?
Ask for the access logs from the web server or load balancer for the last day the application failed. A short script or a spreadsheet will count requests per minute, and the whole exercise fits in a morning.
Note four numbers: the busiest minute, the daily average, the time of the first 5xx errors, and the response time just before those errors. The gap between peak and average usually surprises people, since dashboards show hourly averages that flatten the spikes. If those logs aren't kept, your first decision is to extend their retention before the next peak.
Why does an application that's fine in the morning crash in the evening?
A system answers at roughly the same speed as long as none of its resources is full. Once one of them saturates, requests queue and response time shoots up. Little's Law explains the mechanism: the average number of requests in progress equals the arrival rate multiplied by the average time each one spends in the system (L = λW). An application receiving 30 requests per second, each taking one second, handles 30 at once on average. If response time goes to four seconds because a supplier slows down, the same traffic means 120 requests in flight. Threads and connections fill up, and the waiting makes response time longer still.
Several defaults set these ceilings without anyone choosing them. HikariCP, the connection pool Spring Boot picks whenever it is available, opens at most 10 connections and makes a request wait up to 30 seconds before returning an error. PostgreSQL typically accepts 100 simultaneous connections by default. These values are fine for getting started, but nobody resizes them without knowing they exist.
How do you derive the target load from your own logs?
Start from the busiest day of the year, count requests per minute on that day and keep the highest minute. Then split that minute by user journey: search, browsing, login, booking, payment. A test that only replays the home page mostly measures the cache. The target load is the observed peak multiplied by a margin, a commercial call the executive committee makes according to expected growth and planned campaigns.
How do you build a load profile that looks like your users?
A good profile reproduces the journey mix, the arrival rate and the variety of data. Your customers don't wait for the server to respond before they show up. A test built on a fixed number of virtual users, each waiting for a reply before trying again, slows down along with the system and hides the saturation. Configure an arrival rate per second instead, which the tool keeps up whatever happens.
A thousand identical searches for Paris on the same date land in the cache and flatter the result; draw destinations, dates and customer accounts from a real, anonymised sample. The payment gateway and partner APIs can't be load tested without their owners' agreement, so replace them with a stub set to the delay in your peak-hour logs, not the one in their documentation.
Load, stress, soak: which test answers which question?
The k6 documentation describes six test types, including stress tests (load above the expected average level) and soak tests (over extended periods). For an executive audience, four are enough.
| Test | Question | Load shape | What it shows |
|---|---|---|---|
| Load | Do we hold the target peak? | Ramp up, then hold at target load | Response times and errors at the level you need |
| Stress | Where and how do we break? | Increasing steps beyond the target | The first resource to saturate, and recovery afterwards |
| Soak | Do we last? | Peak load for several hours | Memory leaks, connections never released |
| Spike | Do we survive a sudden rush? | Jump from low load to peak | Instance start-up, load shedding |
k6 (AGPL-3.0 licence, JavaScript scripts), Apache JMeter (open source, graphical interface) and Gatling (Community Edition under Apache 2.0) can all do the job. Pick the one your team can read, because the test will come back for every major release. Watch the CPU of the machine generating load too, so it doesn't become the bottleneck, and warn your host or network team before the run, or a web application firewall may block the test.
Where is the bottleneck: database, pools, memory or external calls?
The bottleneck is whatever saturates first. The database saturates through slow queries, locks or a missing index. Pools give themselves away through time spent waiting for a free connection or thread. Each setting can look reasonable on its own while six application instances with a pool of 20 connections each ask for 120 connections from a database that may accept 100, and the limit hits exactly when you add servers to survive the peak.
Memory problems only show over time. Usage that climbs without coming down, or garbage collection pauses that keep getting longer, point to a leak that only a soak test will catch. An external call with no timeout holds a thread for as long as the other side takes to answer, which is why every outgoing call needs a timeout, a fallback response and its own measurement. If the bottleneck lies outside the application (network, hosting, integrations), a digital audit looks at the rest of the system.
How do you prove the cause instead of assuming it?
A cause is proven when you can trigger it and make it go away. First reproduce the outage in test, at the load observed on the day of the incident, with the same signature (same saturated resource, same errors). Then change one setting, replay the same profile and compare the curves. Keep every run with its date, version and graphs, because that record settles arguments between development, the host and the software vendor.
What load test plan should be signed before you start?
The plan fits on one page and is signed before the first run. The thresholds in the right-hand column are parameters for IT and the business owner to agree between them.
| Section | What to write | Parameter to agree |
|---|---|---|
| Scope | Application, version, test date | Version frozen for the whole campaign |
| Environment | Differences from production (size, data, network) | Accepted gaps and who owns them |
| Scenarios | Journeys replayed and the weight of each, taken from logs | Split as a % of the observed peak |
| Target load | Observed peak per minute multiplied by the margin | Margin multiplier |
| Tests and durations | Load, stress, soak, spike | Length of each step and of the soak |
| Success criteria | 95th percentile response time per journey, error rate, sustained throughput | Threshold per journey (payment stricter than search) |
| Resources | CPU, pools, connections under a ceiling; memory stable during the soak | Ceiling per resource, drift allowed |
| Metrics to capture | Per layer: load balancer, application, pools, database, outgoing calls, load generator | Sampling interval (second or minute) |
| Data and stubs | Anonymised data set, delays for external stubs | Delays taken from peak-hour logs |
| Stop and safety | Stop criteria, time window, people notified | Immediate stop threshold |
| Sign-off | Runs it: test team. Analyses: architect. Signs: CIO and business owner | Decision: go, go with conditions, no go |
The business owner signs the criteria because they know how long a customer will wait at payment; the CIO signs the conclusion. A UAT sign-off works the same way, with its criteria also fixed before the test.
Why does an online travel platform go down on promotion nights?
An online travel agency sells holidays and flights from Casablanca. The company and its figures are invented for illustration. On an ordinary day the platform receives 180,000 requests, an average of 125 per minute. On the evening of its last promotion, the logs show 2,400 requests per minute at 9 p.m., and the first 5xx errors appear three minutes later.
The peak minute breaks down into 1,680 searches (70%), 480 offer views (20%), 192 booking steps (8%) and 48 payments (2%), which makes 2,400. Every search queries a partner's availability API, which answers in 1.5 seconds on a normal day and took 8 seconds that evening, since every agency was pushing offers at the same time. The application runs on two instances with 100 threads each, 200 threads in all.
1,680 searches a minute is 28 a second. By Little's Law, 28 × 1.5 means 42 busy threads on a normal day, and 28 × 8 means 224 on promotion night, more than the 200 available. Payments end up queuing behind searches, and the test confirms it. At 2,400 requests per minute with a stub set to 1.5 seconds, the platform holds; with the same stub set to 8 seconds, all 200 threads are taken in under three minutes and the errors return. Only the partner's delay changed between the two runs.
The team sets a 3-second timeout on the partner call, with a fallback: past that, the search shows the last cached availability, marked "to be confirmed". The committee picks a margin of 1.5, giving a target of 3,600 requests per minute. At that level, 2,520 searches a minute is 42 a second, and 42 × 3 occupies at most 126 threads, with the stub still set to 8 seconds. The load test passes, with fallback answers counted as successes under the signed criterion. The stress test then finds the breaking point at around 5,500 requests per minute, about 2.3 times the observed peak. Finally, a four-hour soak at 2,400 requests per minute shows memory on one instance climbing from 1.2 to 3.1 GB and never coming down, caused by a session cache with no expiry, which is fixed before the next promotion.
FAQ
- Can we run the test directly in production?
It's possible at night, on an empty platform, with stubs instead of payments and your host's written agreement. Most teams test on a pre-production environment with the same architecture, then check in production, under light load, that the settings they found are actually applied.
- Our host says we just need more servers. Are they wrong?
More servers help when the saturated resource is the instances' CPU or memory. If the limit is in the database, a connection pool or a slow partner, extra servers don't move it, and they can make things worse by multiplying connections to the database. Ask for a test result before you pay the invoice.
- How often should we repeat a load test?
Before every major release, before every known peak (promotion, close, season) and after any change of infrastructure or partner. If the scripts are versioned with the code, a reduced run can go out with every release and catch a performance regression before customers do.
Sources
- Grafana k6, load test types
- John D. C. Little, A Proof for the Queuing Formula L = λW, Operations Research, 1961
- HikariCP, default settings
- Spring Boot, connection pool selection
- PostgreSQL, max_connections setting
- k6 repository (licence), Apache JMeter, Gatling repository (licence)
Last verified: 2 November 2026.
Our free audit can go through the logs from your last peak-hour incident with you and draft the test plan before anyone orders more servers. The fix itself falls under custom development. By default, HikariCP opens only 10 connections per pool, a value worth checking in your configuration before the next peak.





