Home  >  Article  >  php教程  >  Http service stress testing tool Alex (comes with Web UI)

Http service stress testing tool Alex (comes with Web UI)

高洛峰
高洛峰Original
2016-11-22 16:51:321456browse

Alex main functions

Save stress test parameters for repeated stress testing

Save stress test reports for subsequent viewing and sharing

Provides simple and direct graphical and text reports

Can perform stress testing on multiple http interfaces at the same time

You can perform stress testing on multiple host:port pairs in the cluster at the same time

Use multiple sets of calling parameters to avoid data hot spots during stress testing

Use step settings to generate progressive stress sources

Provide a simple stress testing machine System status real-time display function

Alex Limitations

Alex runs in a single process. If you need a distributed stress testing environment, you have to deploy multiple nodes. During stress testing, multiple people need to operate at the same time.

Vegeta does not provide a way to stop immediately when the pressure is overloaded. This requires you to carefully design the stress testing steps and carefully observe the system status to avoid system overload.

Qps and concurrency number should not be too large. I once used the Alex tool to test the HelloWorld web program in a single process. Each request spit out 1,500 bytes, and the qps could reach up to 60,000, which basically filled up the Gigabit network card.

Try to avoid Gzip decompression under large stress tests. Decompression consumes a lot of CPU resources and can lead to inaccurate stress test reports. You can perform large-scale stress testing by deploying multiple nodes.

Only supports HTTP protocol. The HTTPS protocol is not planned to be supported because encryption and decryption will also consume a lot of CPU resources, resulting in inaccurate reporting.

The report only provides a performance reference, you must be brave enough to question the report.

Although Alex has so many limitations, this does not affect its daily use.

Install

install mongodb

install golang  # 1.4+ is required

go get github.com/go-martini/martini

go get github.com/tsenart/vegeta

go get gopkg.in/mgo.v2

go get github.com/shirou/gopsutil

# godep restore

git clone https://github.com/shellquery/alex.git

cd alex

go build

./alex

./alex -c config.json

open browser

http://localhost:8000/

Configure config.json

{

"BindAddr": "localhost:8000",

"MongoUrl": "mongodb://localhost:27017/alex",

"Teams": [

"python",

"java",

"php",

"go"

]

}


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn