0

I am looking for advice or different point of view.

Short story long. I am having an application(Wordpress) that runs with local DB, but needs to load data from remote DB (some of template elements). I can load remote data via script calls, but I was wondering if I can load the remote DB in my local DB as views or some type of slave instance of the DB. I will perform only READ requests. What is a good approach for the task?

With regards to the approach of just script requesting data from remote DB, I am concerned with the numerous remote DB requests to be performed upon page load and the latency it will cause. I will try to tackle this by catching the html by Varnish. However, I am googling for other ways. Any suggestions!?

Thank you.

  • Have you considered database replication? You can do it at the [table level](https://dev.mysql.com/doc/refman/5.7/en/replication-rules-table-options.html). – Tim May 03 '17 at 22:02

1 Answers1

1

A good approach? erm, any of them....

  • MySQL replication (async, sync, semi-sync, multi-master)
  • export/import
  • federated storage engine (with a good query cache)

numerous remote DB requests to be performed upon page load

Is the master database on a different continent/planet? Wordpress is rather messy in its IO behaviour, but that is unlikely to be a problem.

I will try to tackle this by catching the html by Varnish

First wait and see if you have capacity problems.

symcbean
  • 19,931
  • 1
  • 29
  • 49