Speedscale on a VM/EC2
Setting up local capture
speedctl install, select the
Traditional server / VM flow and subsequently the
Capture traffic and forward to Speedscale Cloud option. This will output a manifest file and a command on how to run it with something similar to
docker compose --file speedscale-docker-capture.yaml up -d .
Now you have to configure your application to use the socks
proxy running on
*:4140 on your server, and
configure it to trust the local
To test out the capture mechanism, you can make requests as you normally would but using
localhost:4143 instead of the port your app is serving on.
Setting up global capture
The steps above setup an inbound proxy on port
4143 that forwards requests to your app but so far we've only captured request explicitly going to that port. To capture all existing traffic going into your app, you'll need to edit your load balancer. For this guide, we'll use AWS's ALB but the same steps translate to other types of load balancers and cloud environments.
Create a new target group/backend
We have an existing target group going to our app which serves on port
8080. We're going to create a new one with identical settings, the only difference will be the port
Make sure to configure the health check correctly, it should be identical to the existing one.
Check the security groups
Make sure the security groups/firewall rules for the load balancer and the VM allow traffic to flow between them.
The inbound group for the EC2 should allow traffic on
The outbound group for the ALB should allow traffic out to
4143 as well
Modify the listener
We have an existing listener where HTTP traffic is forwarded to our listener called
user that hit our app directly. We're going to edit this so that the load balancer forwards traffic to our new target group.
That's it! Now all traffic will be forwarded to the Speedscale proxy and be available for analysis
You should be able to see traffic in the Speedscale UI after a few minutes and now you can using this traffic to create a snapshot.
Replaying traffic starts by creating manifests similar to the capture step
speedctl install and choose the
Traditional server/VM flow again that allows you to
replay recorded traffic. When prompted, enter the ID of the snapshot you
This will generate a report which you can find on the reports page.
speedctl install command is just a helper and environment variables like
TEST_CONFIG_ID can be modified in the manifest file without
regenerating it every time.