The tutorials / docs for setting up replication, suggest using a read lock before copying data eg:
FLUSH TABLES WITH READ LOCK;
SET GLOBAL read_only = ON;
What is the lock for?
My testing suggests that using a Read Lock inserts will wait, which could cause our webservers to fall over as the requests start to stack up. While jut setting read_only with no lock will cause inserts to fail quickly; which is not ideal, but shouldn’t crash the webservers )
So why does everywhere say to use the read lock? What benefit is it?