1b.app
Link copied -

Critical loads

What is the maximum number of API requests per second that the OneBox software can handle
For example, at the same time there will be a request for information from different customer cards
information about the purchase or bonuses, documents, products.
2,000,000-3,000,000 clients in the database
1000-1500 cash registers
1000 000 loyalty cards
100,000 products in the database
Original question is available on version: ru

Answers:

One way or another, such a system will be deployed to a server with approximately the following configuration - https://www.hetzner.com/dedicated-rootserver/ex62-nvme
The operating system should see 16 threads (8 cores) and at least 64 GB of RAM.
And the disk subsystem is SSD/SSD NVME.
With such a server, the REST API is fast enough and for requests like "get a client card by id" or "get a client card by phone number" or "get a bonus balance by phone number" it will be able to issue about 100-200 responses per second.
To get better performance, you need to do a number of tricks (not necessarily all at once).
1. For the necessary requests to the API, make a caching pad on Redis / Aerospike / similar database. The main idea is that OneBox puts data from a relational SQL database into a very fast key-value storage, to which requests are already flying using a binary protocol and very very quickly.
2. Allocate many database cores. To do this, you will probably have to use a server like https://www.hetzner.com/dedicated-rootserver/ax101 or https://www.hetzner.com/dedicated-rootserver/ax161 or move the database to a separate server/cluster (you will need 10GB LINK between servers).
If you do point 1 and point 2 at the same time, then I can safely guarantee 200,000 requests per second for almost any api endpoint. I have a Hi-Load project that sends 4,000,000 requests per second.
Of course, setting up this infrastructure costs money, as it is not included in the basic functionality of OneBox.
02.02.2021, 19:36
Как со мной связаться - никак :)
Задавайте вопросы на форуме публично - и я отвечу.
Подробнее - https://1b.app/ru/user/11/
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment