Answer the question
In order to leave comments, you need to log in
Optimization of highly loaded applications. C++. What literature would you recommend for reading?
Actually, there is the following situation
From the various stages of processing, data is received by the flow manager - it has a global heap of input data.
During the start of processing, N streams of data parsing and the formation of batches of requests are created. Each thread, if it has processed the data it has, requests a new batch from the thread manager. That, in turn, throws off the entire available heap of input data to the requesting thread. When a certain amount of data is accumulated, or when there is idle time without input data, the thread starts the procedure of sending prepared batches of queries to the database.
Now it works, it was done through trial and error. I want to know how it can be optimized and where you can read about it.
Thank you in advance!
ZY: if someone shares their experience in creating such systems, I will be very grateful! ;)
Answer the question
In order to leave comments, you need to log in
If the requests are of the same type, then it is better to make a request accumulation buffer and combine them into one request. And according to the result, who asked what to distribute.
Fewer requests is always better.
Yes, and you need to clarify how you connect to the database itself? And does the connection library support simultaneous requests within the instance, does it support parallel simultaneous processing of requests from different threads, or does all requests go through one connection or are blocked by mutexes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question