apigear-io / template-cpp14

C++14 technology template
https://apigear.io/template-cpp14/docs/intro
MIT License
0 stars 1 forks source link

fix(apigear): fix high load issue #97

Closed dorotaphanSiili closed 1 year ago

dorotaphanSiili commented 1 year ago

during high load test (sending at once 1000 messages from each of 100 threads the pair of test applications for server and client got stuck. Most probable rootcause was too high load on sending messages by server. solution:

  1. moved a queue from client side only to socket wrapper now it is used for both server and client.
  2. changes the time for scheduling task to some smaller number - 7, cause 5was too lit
  3. limit the number of messages sent in each loop to 400 - then schedule a next task for sending - this way it is unblocked and may receive message

created bug report for better fix: https://github.com/apigear-io/template-cpp14/issues/98 also a bug report for sending ping message: https://github.com/apigear-io/template-cpp14/issues/96

✅ Checks