In order to handle large amounts of accesses and large amounts of data, it is essential to have a mechanism to distribute reference queries to Replica.
CakePHP does not have distributing reference queries to Replica, but it can be done with a plugin.
cakephp-master-replica is a great plugin to do this.
This can be achieved by implementing a process to switch to Replica before executing a reference query, but if it is simply implemented, it will be cumbersome to write the switching process every time.
In this proposal, Yuki introduces the cakephp-master-replica plugin and shows an example implementation in CakePHP4 that automatically switches to Replica when a reference query is issued.
Смотрите видео CakeFest Virtual 2021 Day 2- Automatically Distributing Reference Queries in CakePHP - Yuki Kanazawa онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь CakePHP 13 Октябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 211 раз и оно понравилось 6 людям.