Details
-
Task
-
Status: In Review (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
MXS-SPRINT-263
Description
The worker assignment currently selects the local worker whenever a client connection is accepted. Due to the use of SO_REUSEPORT, this will balance the work across all of the workers but for bursty workloads this results in a potentially skewed distribution of clients across the worker threads. Another obvious alternative is to still accept the connections in parallel but round-robin the worker assignment to guarantee equal distribution of connections for batches of connections. On systems that do not support SO_REUSEPORT (none exist anymore), the round-robin approach was used.
Neither of these approaches is ideal in all situations and the current approach of accepting the local connection takes into account how busy each thread is and has in practice shown to be fair enough that no problems have been reported. However, for benchmarking and some specific scenarios where applications use small connection pools with MaxScale, the round-robin approach would be better and making it configurable would fix it.