Answer the question
In order to leave comments, you need to log in
Lots of mysql clients?
There is a main process in which the RPC server is opened.
The same process uses the cluster module to create 500+ forks, they are workers that will do the work.
Is it possible to open a connection to mysql in each worker, or is it better to keep the connection in the master and kick the master from the workers so that he updates the database?
PS Is it possible to fork an open connection from the master?
Answer the question
In order to leave comments, you need to log in
500+ workers? on one machine? why so many? performance will only lose from such a number
of subjects, open a connection in each worker, mysql is not able to resolve concurrent access to one connection. Within a single process, this is handled by driver libs by queuing requests, but on multiple processes this will be a problem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question