We look at Fortio, which is a powerful load testing tool which is free and powered by Google's Go language.
It is a rightful successor to Vegeta which is favourite among Go developers.
Updated : 16 November 2023
Installing Fortio
- Install go (golang 1.8 or later)
go get istio.io/fortio
- you can now run
fortio
(from your gopath bin/ directory)
How to run a load test using Fortio?
fortio load -qps 100 -t 30s http://example.com/api
This command will perform a load test at 100 queries per second for 30 seconds against the specified URL (http://example.com/api). You can adjust the options (-qps for queries per second, -t for duration) based on your requirements.
Docker
The following docker commands are useful when working with Fortio
docker run -p 8080:8080 -p 8079:8079 fortio/fortio server & # For the server
This runs Fortio in GUI mode (this open a web interface at http://localhost:8080/fortio)
As you can see, you can specify the percentiles for reporting, the TPS and the duration using the web interface. However, you are only supposed to use the GUI mode for developing your scripts
docker run fortio/fortio load http://www.google.com/ # For a test run
This command runs fortio without the GUI mode and is recommended for a test
The command-line gives you more options but it is not as powerful as a
Apache JMeter or Gatling . It does not support scenario based load
testing
Things I like:
Things I don't like:
Fortio is best suited for load testing where developers want to test their code locally on their desktop computers. It can also be used for simulating spikes.
Things I like:
- A simple web interface
- Ability to share report and graphs
Things I don't like:
- No support for scripts
- No support for scenario bases load testing
Fortio is best suited for load testing where developers want to test their code locally on their desktop computers. It can also be used for simulating spikes.
0 comments:
Post a Comment
What do you think?.