VOOZH about

URL: https://thenewstack.io/sidecars-are-changing-the-kubernetes-load-testing-landscape/

⇱ Sidecars are Changing the Kubernetes Load-Testing Landscape - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-10-24 10:00:06
Sidecars are Changing the Kubernetes Load-Testing Landscape
contributed,
Kubernetes / Networking / Observability

Sidecars are Changing the Kubernetes Load-Testing Landscape

Sidecars don't just capture traffic. They can replay it as well. They can also transform any metadata, like timestamps, before it sends it to your application.
Oct 24th, 2022 10:00am by Kasper Siig
👁 Featued image for: Sidecars are Changing the Kubernetes Load-Testing Landscape
Image via Pixabay.

As your infrastructure is scaling and you start to get more traffic, it’s important to make sure everything works as expected. This is most commonly done through testing, with load testing being the optimal way of verifying the resilience of your services.

Traditionally, load testing has been accomplished via standalone clients, like GoReplay and JMeter. However, as the world of infrastructure has gotten more modern, and organizations are using tools like Kubernetes, it’s important to have a modern toolset as well.

With traditional load testing, you’ll commonly run into one of three major issues:

  • Scripting load tests takes a lot of time
  • Load tests typically run in large, complex, end-to-end environments, that are difficult to provision, as well as being expensive for production-scale infrastructure
  • Data and realistic use cases are impossible to mirror one-to-one, unless you have production data

A more modern approach is to integrate your load-testing tools directly into your infrastructure. If you’re using Kubernetes, that can be accomplished via something like an Operator. This will give you the benefit of having less infrastructure to manage, and being able to use infrastructure-specific features like autoscaling Pods.

However, the biggest advantage you get from integrating your tool into Kubernetes directly is that you can use sidecars.

You Need to Focus on Traffic Capture

There are two main components of any proper load-testing setup: traffic capture and traffic replay. This is how most load-testing tools have worked for decades, and still holds true. However, there are many ways to capture traffic.

The next section will dive deeper into how sidecars specifically help with this. But first, it’s important to understand why there’s even an issue with traditional load testing.

First, how do you record the traffic? The most common approach is to record your own traffic. You open up a browser that’s configured to capture traffic, and you start emulating how your users would be using your service.

While this can certainly be helpful in many areas, it does mean you are relying on your own perception of how your application is being used. For a simple application, this may not be an issue but if your product is a Saas platform, there are likely many ways your application can be used.

Second, you’re missing out on important metadata. Again, perhaps not an issue for a simple application, but something that gets increasingly important as your application scales.

If you’re the one creating the traffic, you will only be getting the headers that your specific environment produces, meaning your load tests will only be testing one specific scenario. A better approach is to capture production traffic and use that in your replays, as you will be getting a range of different requests.

Third, you need to think about your dependencies. If you are load testing your entire infrastructure it likely won’t be an issue. But, if you want to do a load test on a single service, i.e. when testing is a part of your CI/CD pipeline, you want to make sure that any outgoing requests go to a mock service.

With traditional load-testing tools, you’re not going to get this. Either you’ll have to set up a new service to act as a mock, or you’ll have to change the code of your application.

Fourth, you are adding more infrastructure to manage. In a modern DevOps world, you don’t want load tests to be run from a developer’s laptop. It should be executed from a service running inside your infrastructure. So, with most tools you will have to add additional services that you need to manage.

Using Sidecars to Capture Traffic

Now that you know why traditional load testing doesn’t fit into a modern infrastructure, let’s touch on the previous points, exploring how sidecars are going to solve the problems.

In Kubernetes, it’s very easy to add a sidecar and make it act as a proxy. Already you’ve solved the issue of how to capture traffic. This sidecar will be capturing all inbound requests, and sending it to another system that can store the recorded requests.

With this approach it’s easy to implement shadowing, which is the practice of capturing production traffic and replaying it in your development environment.

Because you’re recording production data directly, you will also know for sure that you’ll be getting all the metadata from every request. You may be seeing issues with this already though. What about authentication, tokens, or sensitive information?

Well, sidecars won’t just be capturing traffic. It will take care of replaying it as well. And, because the sidecar is an application in itself, it’s easy to transform any metadata, like timestamps, before it sends it to your application.

As for sensitive data, the sidecar can easily filter that out from the metadata before it gets sent to storage.

At this point, you’ve already solved the issue of managing extra infrastructure, as sidecars can be added via a few simple lines to a manifest file. You’ve also solved the issue of missing metadata, as the proxy will capture everything, unless specifically configured to do otherwise.

Then there’s still the issue of mocking dependencies. The sidecar is still acting as a proxy, both for ingoing and outgoing requests. Because of this, you can tell the sidecar that you’re executing a load test, and it will recognize the outgoing requests. Instead of forwarding the request, it will simply respond with the data it got when the request was initially recorded.

If you want to see a specific example of how sidecars can be used to perform load tests, take a look at this example from Speedscale.

Sidecars Aren’t the Only Way to Capture Traffic

At this point, it should be clear how sidecars can be used to change the way you approach load testing. However, it’s also important to mention that sidecars are just one of many ways to improve traffic capture.

With how the industry is changing, it’s very likely that traffic capture will become commoditized, and the best tool will be the one that does the best job of replaying traffic.

Postman is used by many developers to test their APIs, and have created extensive collections with various different request definitions. While this does go somewhat against the points of not creating traffic manually, there is still value to be gained from being able to test specific use cases.

Service meshes are a popular way to manage communication between services, especially microservices. Most service meshes will enable you to have some kind of observability. Through this, you’ll gain a collection of production traffic, that you can then import into the load-testing tool of your choice.

Given the topic of this post, it’s important to note that some companies are working on removing sidecars from the implementation of service meshes. However, right now it’s just an option, and it’ll be exciting to see whether the future of services meshes are sidecar-less or not.

eBPF is becoming more and more used in modern infrastructure, like Kubernetes. Essentially, eBPF lets you execute applications at the kernel level, and, as such, it’s a very effective way of capturing traffic.

High-fidelity logs from a monitoring system is also a possible way to capture traffic. However, it’s important to note here that it has to be high-fidelity. To save costs and storage space, it’s very common to strip request logs of some headers that won’t be helpful in troubleshooting. If you are intending to use logs for traffic replay and reap the most benefits, you need to keep all the information.

API Gateways/Ingress controllers can possibly be a good way of capturing traffic, as it’s very common for gateways and controllers to log the traffic going through. If traffic capture truly becomes commoditized, it’s then simply a matter of importing the traffic into your load-testing tool.

Traffic Replay Is a Powerful Tool in Load Testing

Sidecars are going to change the way that load testing is done, and some companies are already embracing it. Whether it’s because you’ll be using them for capturing traffic, replaying it, or mocking the outgoing requests, there’s no doubt that you’ll be seeing an increase in the use of sidecars.

If you’re interested in testing what it’s like to load test Kubernetes using sidecars, go ahead and sign up for a free trial for Speedscale. Speedscale is a new pioneering product in Kubernetes load testing, focusing heavily on features like traffic replay, shadowing, API mocks, etc.

TRENDING STORIES
Kasper Siig is a former DevOps Engineer, handling infrastructure receiving half a billion requests per day, optimizing CI/CD workflows and Kubernetes deployments. These days, Kasper is the founder of Siig Marketing, where he works with dev-tool companies to convert developers...
Read more from Kasper Siig
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Fourth, Postman.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.