01/02/2023
πππππππ¬π π«ππ©π₯π’ππππ’π¨π§
βDatabase replication can be used in many database management systems, usually with a master/slave relationship between the original (master) and the copies(slaves)β.
A master database generally only supports write operations. A slave database gets copies of the data from the master database and only supports read operations. All the data-modifying commands like insert, delete, or update must be sent to the master database.
Most applications require a much higher ratio of reads to writes; thus, the number of slave databases in a system is usually larger than the number of master databases.
πππ―ππ§πππ ππ¬ π¨π πππππππ¬π π«ππ©π₯π’ππππ’π¨π§:
ππππππ« π©ππ«ππ¨π«π¦ππ§ππ: In the master-slave model, all writes and updates happen in master nodes; whereas, read operations are distributed across slave nodes. This model improves performance because it allows more queries to be processed in parallel.
πππ₯π’πππ’π₯π’ππ²: If one of your database servers is destroyed data is still preserved. You do not need to worry about data loss because data is replicated across multiple locations.
ππ’π π‘ ππ―ππ’π₯πππ’π₯π’ππ²: By replicating data across different locations, your website remains in operation even if a database is offline as you can access data stored in another database server.