Muzak replication advice and techniques Muzak replication advice and techniques php php

Muzak replication advice and techniques


Here's what I suggest based on my experience.

  1. You can use one type of engine (MyISAM or InnoDB) for both servers. I you mix both engines, you might get Deadlock, transaction problems etc... and time fixing them can be painful.I had problems a little while ago with InnoDB -> MyISAM. Now I used MyISAM on all servers.

  2. For storing media (such as images, video or documents) you can create a NFS and mount a folder like /usermedia/ that both servers access.Therefore you don't have to rsync every time. In addition, you can save the meta data or media information to the database for reference and where the file is saved on the disk.Note: using a blob to save files can be good depending on the media. If you have a file that is approximately 1 gig might not be a good idea to save on the database for example).

  3. Use a caching system to retrieve data (such as memcached).For example, if you request data and you need to display them to the user, look first in the cache. If it's not in the cache, query the database, save it to the cache and display.Next time the same information is requested, you won't request it from the server but from memory. This solution will avoid numerous calls on the Database server which will improve performance.

Let me know if you need additional help.


I would recommend InnoDB (for transactions, row locking and not table locking) and redis as the caching very fast and efficient