Preface
Some time ago I read an article on Tarantool and PHP called Stress test for Nginx + PHP + Tarantool. The author took a small server with 1 CPU, 512 MB of RAM and some SSD space, and conducted stress tests with PHP and Tarantool. The result was 900 RPS on a web page with template rendering, session handling, inserting a session into the DB and reading 9 top records sorted by rating from a table with ~16,200 Telegram stickers.
wrk -c50 -d60s -t4 http://ugly.begetan.me/good
Running 1m test @ http://ugly.begetan.me/good
4 threads and 50 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 54.48ms 10.15ms 441.17ms 95.62%
Req/Sec 220.76 19.43 270.00 74.65%
52760 requests in 1.00m, 320.86MB read
Requests/sec: 878.72
Transfer/sec: 5.34MB
The technical details are well described in the Tarantool: the Good, the Bad and the Ugly article.
In this article, I’m speaking about Python and programming. I’m going to start with a story about 900 RPS on a web page that renders HTML and makes 3 DB requests (insert, select and select calculated data) with PHP + Tarantool.
I couldn’t resist saying, “Challenge accepted!”
Our journey begins. Fasten your seatbelts, keep calm and enjoy.