Haproxy Configuration
About Haproxy configuration This piece does not do much introduction, operation and maintenance of basic extremely easy, we want a VIP can be sphinx problem
Sphinx itself only supports distribution, there will be a single point of distribution problems, when the request is too high when the problem begins. The distribution cannot be scaled horizontally and cannot be highly available. So consider to do a load balancer, then the problem comes, Sphinx multiple machines can not be used to MySQL as the same as the use of Binlog log synchronization data, load the server between the data synchronization is a problem, such as a server 2-point rotation index, B server 3-point rotation of the intermediate access data will be different. Even if the time difference between indexing and setting up data is indexed, it is very stressful for MySQL to rotate the index at the same time. Solution Solutions A server rotation index, stop B Server service A server index rotation is successful, rsync data file to B Server B server start service (Sphinx Start service will re-cache index)
The advantage is that B server does not need to re-query the data source index, and can guarantee the data synchronization of a B server.