Software:Vegeta

From HandWiki
Revision as of 16:17, 27 June 2023 by Wikisleeper (talk | contribs) (change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: HTTP load testing tool
Vegeta
Vegeta attack example.png
Vegeta's reported results after being run to attack a server running on http://localhost:8000 for five seconds
Original author(s)Tomás Senart[1]
Initial releaseAugust 13, 2013; 11 years ago (2013-08-13)[2]
Stable release
v12.8.4 / October 11, 2020; 4 years ago (2020-10-11)[1]
Repositorygithub.com/tsenart/vegeta
Written inGo[3]
Operating systemLinux, Microsoft Windows, macOS[1]
TypeHTTP Load testing
LicenseMIT License[1]
Websitepkg.go.dev/github.com/tsenart/vegeta/lib

Vegeta is an HTTP load testing tool written in Go that can be used as a command in a command-line interface or as a library.[3] The program tests how an HTTP-based application behaves when multiple users access it at the same time[3] by generating a background load of GET requests.[4] Vegeta is used to generate a sustained, constant number of requests per second in order to discover how long a service can sustain a peak load before dropping in performance.[5]

In addition to preemptive load testing, the program can also be used for shadow testing,[6] where traffic from a live version of an application is mirrored onto a test version to determine how it handles the same traffic load, without causing potential disruption to the live version of the application.[7] Shadow testing is done in this way in order to analyze anticipated server performance.[8]

Vegeta is provided for use by web hosting services such as Scaleway[3] to use varied and multiple requests to stress test client HTTP services.[9] It is also used with dedicated load-testing platform services such as BlazeMeter.[10]

Usage

The command-line usage is in the format of vegeta [global flags] <command> [command flags]. The three global flags are -cpus int which specifies the number of CPUs to use, -profile string which enables profiling, and -version which prints the software version and then terminates the program.[1]

The commands available are attack, encode, plot, and report, each with its own various command flag options, and both attack input and report output can be done in an optional JSON format when specified with the appropriate flag.[1]

Vegeta can specify targets as URLs in a separate file with optional custom headers and requests, which can then be used as an input option on the command line.[11]

Example

An example usage would be to issue echo "GET http://localhost/" | vegeta attack -duration=5s | tee results.bin | vegeta report from the command-line.[1] This example uses the echo command to output GET http://localhost/, and then executes the attack command for that output for five seconds. After that, it uses the tee command to write results to a file called results.bin, and runs the report command to display the output of the attack results.

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 Senart, Tomás (October 11, 2020). "GitHub - tsenart/vegeta: HTTP load testing tool and library. It's over 9000!". https://github.com/tsenart/vegeta. 
  2. Senart, Tomás (August 13, 2013). "Initial commit". https://github.com/tsenart/vegeta/commit/40deb7a1f44b1d281eaedea32b75f49e7150169a. 
  3. 3.0 3.1 3.2 3.3 "Load Testing with Vegeta". May 26, 2022. https://www.scaleway.com/en/docs/tutorials/load-testing-vegeta/. 
  4. Eiermann, Andreas; Renner, Mathias; Großmann, Marcel; Krieger, Udo R. (2017). "On a Fog Computing Platform Built on ARM Architectures". in Eichler, Gerald. Innovations for community services : 17th International Conference, I4CS 2017, Darmstadt, Germany, June 26-28, 2017, Proceedings. Cham, Switzerland. pp. 83. ISBN 978-3-319-60447-3. OCLC 990058133. https://www.worldcat.org/oclc/990058133. 
  5. De, Brajesh (2017). API management : an architect's guide to developing and managing APIs for your organization (First ed.). New York. pp. 161. ISBN 978-1-4842-1305-6. OCLC 978273106. https://www.worldcat.org/oclc/978273106. Retrieved August 27, 2022. 
  6. Welch, Nat (2018). Real-world SRE : the survival guide for responding to a system outage and maximizing uptime. Birmingham, UK: Packt. pp. 137. ISBN 978-1-78862-644-6. OCLC 1056157467. https://www.worldcat.org/oclc/1056157467. 
  7. "Application deployment and testing strategies". February 5, 2020. https://cloud.google.com/architecture/application-deployment-and-testing-strategies#shadow_test_pattern. 
  8. Qi, Lin; Qiao, Zhihong; Zhang, Aowei; Qi, Hui; Ren, Weiwu; Di, Xiaoqiang; Wang, Rui (2020). "Performance Analysis of QUIC-UDP Protocol Under High Load". in Tang, Dalai. Mobile wireless middleware, operating systems and applications : 9th EAI International Conference, MOBILWARE 2020, Hohhot, China, July 11, 2020, Proceedings. Cham, Switzerland. pp. 70. ISBN 978-3-030-62205-3. OCLC 1225562925. https://www.worldcat.org/oclc/1225562925. Retrieved August 27, 2022. 
  9. Dumitrescu, Sorin (July 10, 2020). "Black Friday. 0 downtime. How Bunnyshell & Vegeta & UiPath can help". https://www.bunnyshell.com/blog/black-friday-zero-downtime-deployments. 
  10. Levental, Alla (August 26, 2021). "Vegeta Load Testing". https://www.blazemeter.com/blog/vegeta-load-testing. 
  11. Osman, Paul (2018). Microservices development cookbook : design and build independently deployable, modular services. Birmingham, UK: Packt. pp. 210. ISBN 978-1-78847-636-2. OCLC 1055162428. https://www.worldcat.org/oclc/1055162428. Retrieved August 27, 2022.