Q. I was reading this article again: https://hackernoon.com/shrink-the-number-of-tiers-in-a-multitier-architecture-from-5-to-2-c59b7bf46c86#.271avuvvu. And it says “reads per second = ~20k”.
I recently spoke to Dennis Anikin at the Nginx conference in Austin, Texas, and he said that Tarantool can do up to 1 million reads per second on a single core.
Do you agree with Dennis and if so, what was the bottleneck in your test where you only got ~20k per second?
A. To get 1 million, you might want to try this benchmark: https://gist.github.com/danikin/a5ddc6fe0cedc6257853.
The fundamental difference between HTTP and Dennis’s benchmark is that Dennis's benchmark uses the capabilities of our asynchronous protocol.
HTTP is a request-response protocol, so there is a huge overhead of multiple context switches for every request.
Dennis’s benchmark represents the best-case scenario of Tarantool usage - a client asynchronously sends requests to a socket, using a single connection.
The fewer connections you have, the better performance you get with Tarantool. Ideally, you would have a single connection per client machine and send everything within this single connection.
If you put HTTP on top of Tarantool, then it harms the performance.