Performance and load testing
Performance testing measures how much load a system can take and which part gives way first. We write k6 scenarios based on real usage, run them against an environment close to production and read the results next to the metrics and traces. Each bottleneck we find comes with a proposed fix, and the scenarios stay in the repository so the test can be run again.
Performance and load testing: an overview
A system that runs well on a quiet weekday can fall over on the morning a campaign goes out, and the part that fails is rarely the one people expect. Performance and load testing replaces guesses with measurements: how many requests per second the API serves within an acceptable response time, where latency starts to climb, and which component gives up first.
The scenarios are written in k6, in JavaScript, and kept in the repository next to the code. A scenario follows real usage: browse the catalog, search, add to cart, pay, with pauses between steps and a mix of visitors that matches your analytics. A test that hammers one endpoint says little about how an online store behaves on a sale day.
Load is only half of the picture. During each run we watch the application metrics and OpenTelemetry traces in Grafana, the slow query log of the database and the CPU and memory of each container. A report that says latency went up is not enough: the goal is to name the bottleneck and propose a fix for it.
What the service covers
Load scenarios in k6
JavaScript scenarios that reproduce real usage, with pauses, mixed user types and realistic data. They live in your repository and can be run again whenever you need.
Choice of test types
Load, stress, spike and soak tests, picked according to the question you need answered. Each is run separately and reported on its own.
Environment and data
A staging environment sized like production and filled with data in realistic volumes. A nearly empty database hides the slow queries that a full one exposes.
Observability during runs
Metrics, traces and logs from Prometheus, Grafana and OpenTelemetry, collected while the test runs. They tie each slowdown to a component.
Bottleneck analysis and fixes
Each limit is explained: a missing index, an N+1 query, a lock, a connection pool, an undersized container. Fixes are proposed and, if you want, implemented and retested.
Front-end performance
Lighthouse on the key pages and Core Web Vitals from real visitors. Server speed and browser speed are measured separately, because they fail for different reasons.
When it is the right call
- 01
You expect a peak, a launch, a campaign or a seasonal sale, and do not know whether the system will hold.
- 02
Pages get slow at certain hours and nobody has found out why.
- 03
You are about to change the database, the hosting or the architecture and want a baseline to compare against.
- 04
A large customer asks what load your platform has been tested for.
What you get
k6 load scenarios modeled on real user flows
Load, stress and soak tests against a production-like environment
Bottleneck analysis across the application, the database and the infrastructure
Performance thresholds checked in CI
How we work on it
Step 1
Define the targets
We agree on the expected traffic, the acceptable response times and the flows to test, based on your analytics and plans. Targets are written as thresholds you choose, so each run has a clear pass or fail.
Step 2
Prepare the environment
Tests run against a staging environment sized like production, with realistic data volumes. Production is touched only in an agreed window.
Step 3
Write the scenarios
k6 scenarios are written from your analytics and reviewed with you before the first run. Accounts, products and other test data are generated in advance.
Step 4
Run and observe
We run load, stress, spike and soak tests while watching metrics, traces and database activity. Each run is recorded with its settings so it can be compared later.
Step 5
Report and retest
A written report gives each bottleneck, its cause and a proposed fix. Once a fix is in, the same scenario runs again to confirm it.
Load, stress, spike and soak tests answer different questions
A load test checks the traffic you expect and whether the system stays within its response-time targets at the planned peak. A stress test keeps raising the load until something fails, to find the limit and see what happens past it: a gradual slowdown, or a wall of errors. A spike test sends a sudden burst, the kind a push notification to all users creates, and shows whether autoscaling reacts in time.
A soak test holds a moderate load over a long period. It finds what short tests miss: a memory leak, a connection pool that slowly runs dry, logs that fill a disk. The mix depends on your situation, and a business tool with steady daytime usage needs a soak test more than a spike test.
Performance thresholds in CI catch regressions early
A one-off load test is a snapshot. To keep its value, we turn the main targets into k6 thresholds, such as a limit on the 95th percentile response time and on the error rate, and run a short version of the scenario in CI. A pull request that adds a query without an index then fails a check before it reaches production.
On the front end, Lighthouse runs in the pipeline on the key pages and reports the Core Web Vitals: largest contentful paint, interaction to next paint and cumulative layout shift. Field data from real visitors completes the picture, because a fast CI machine does not see what a mid-range phone on a mobile network sees.
Common bottlenecks in the database, the code and the infrastructure
In many web applications the database gives way before the servers do. The usual causes are queries without a suitable index, N+1 patterns where a page runs one query per item in a list, long transactions that hold locks, and a connection pool smaller than the number of workers trying to use it. PostgreSQL and MySQL both report slow queries and lock waits, and reading them during a load test often points straight at the problem.
Above the database, the suspects are synchronous calls to slow third-party APIs, work that belongs in a background queue, caches that all expire at the same moment, and containers with CPU or memory limits set too low. Sometimes the fix is in the infrastructure, such as more replicas or a read replica for reports. Often it is a change in the code, which costs less to run than extra servers.
Tools and methods
- Playwright
- k6
- Test pyramid
- Contract testing
- GitHub Actions
- Lighthouse
- axe-core
- Sentry
How you can work with us
Fixed-scope project
The scope of the first version is written down, split into milestones and priced per milestone. It suits a product or a feature with a clear outline.
Dedicated team
A team works on your product over the long run, with its own planning and release cadence. It suits a product that keeps changing.
Team extension
One or more of our engineers join your team and work with your tools and routines. It suits a company that knows where it is going but lacks people or a specific skill.
Monthly support
A monthly retainer covers maintenance, updates and small changes, with an agreed response time. It suits a product in production that needs upkeep more than new features.
Questions about Performance and load testing
Is it safe to run a load test against production?
Sometimes, with care. We prefer a staging environment sized like production, because a stress test is designed to push the system until it fails. When only production gives a realistic answer, we agree on a quiet window, keep real payments and emails out of the scenario, and stop at the first sign of impact on real users.
What drives the cost of a performance test?
Mainly the number of flows to model, the work needed to build a realistic environment and data set, and how much analysis and fixing follows. A single API with a clear target is quick to test, while a platform with many services and third-party dependencies needs more preparation. Fixes are estimated separately, once the bottlenecks are known.
Why k6 rather than JMeter?
k6 scenarios are plain JavaScript files that live in the repository, get reviewed in pull requests and run in CI like any other test. JMeter is capable, but its XML test plans are hard to review and maintain next to the code. If your team already has JMeter plans that work, we can run them and compare.
How often should we run load tests?
Run a full test before an expected peak and after a large change to the architecture, the database or the hosting. Between those, a short scenario with thresholds in CI catches the regressions that a single pull request introduces. Running a full stress test on every commit costs time and money for little new information.
Can you load test a mobile app?
Yes, by testing the API the app calls, which is where the load lands. We reproduce the calls the app makes at launch, on each screen and in the background, including the burst that follows a push notification sent to many devices at once. The app itself is measured separately, for startup time and responsiveness on real devices. The server and the phone are different problems with different fixes.
What happens if the system cannot handle the expected traffic?
You get the list of bottlenecks ordered by impact, each with a proposed fix and a rough estimate of the effort. Some fixes are small, such as an index or a cache, while others need a design change, such as moving work to a queue. We can implement them, or your team can, and the same scenario runs again afterward.
In the same service area
Design, build and ship your project
Describe it in three lines. We reply with specific questions and a first take on how to proceed.