tb(TarsBenchmark)It is a non-code benchmark tool specially tailored for tars service, with the following features:
The tb is designed in a multi-process model. The main process is responsible for resource scheduling and display, and the benchmark process is responsible for network transmission and reception and statistics. The network layer can flexibly choose TCP or UDP; adopts a protocol factory to manage various service protocols, supports http/tars by default; the main process and the benchmark process exchange signals through control information, and the data interacts through the lock-free shared memory queue to achieve the lowest resource consumption. The main process periodically collects each The network statistics of the benchmark process are output to the console after a simple summary.
./tb -c 600 -s 6000 -D 192.168.31.1 -P 10505 -p tars -S tars.DemoServer.DemoObj -M test -C test.txt
-h help information -c number of connections -D target server address(ipv4) -P target server port -p service protocol(tars|http) -t(optional) overtime time，default 3 second -T(optional) network protocol，default tcp -I(optional) continue time(by second)，default 1h -i(optional) view interval(by second)，default 10s -s(optional) maximum tps limit per target server -n(optional) maximum process
See details in develop.md
The online benchmark service can be implemented with the latest version of TarsWeb. release steps are as follows:
./install.sh webhost token adminsip nodeip
webhost Host or ip:port on the TarsWeb management side token Which can obtain the http://webhost/auth.html#/token through the management side adminsip The IP address of the AdminServer deployment, it must be deployed at a single point nodeip The IP address of the NodeServer deployment, it should be separated from the AdminServer
AdminServer is recommended to deploy together with tarsregistry, NodeServer is recommended to expand the capacity on the management side. The more machines deployed, the stronger the ability to support parallel benchmark.