Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们正在修改osCommerce,但我们的架构涉及用于数据库读取和数据库写入的单独集群。
有没有人把这些分开?
你们看过mysql代理吗?您可以使用它自动将读取和写入发送到正确的服务器,即使对于您无法修改的应用程序也是如此。
此外,您可以使用该master_pos_wait()功能保持读写同步。(当你进行写操作时,从那个主服务器获取日志位置,然后向从服务器发出 master_pos_wait() 等待它赶上)
master_pos_wait()