In order to create a cross region setup for my craft website, I've created a read-only replica of my RDS DB from North Virginia region to Canada Central region.

I'm facing the internal server error every time Craft is trying to update the session related info in the read-only database.

I could have used the same DB of N.Virginia but, if the N.Virginia region is down, then there will be no DB to support the server in the Canada region.So for this reason I've created a read only replica of the RDS at N.Virginia.

Why I'm choosing read-replica? Because AWS updates it automatically if we update the master DB. So I'll have to update in only one place and the slave RDS across regions will be updated as well.

How can I resolve this? Or, what is the best approach to AWS cross region setup for Craft website?

  • I suspect you'll run into all kinds of interesting problems as the slave Craft instance tries to write to its read-only database. You might consider a Varnish cache (still read-only) or some kind of automatic application-level switching to a mirrored read/write database to limit the impact of an outage. (Not my area of expertise, just thinking through the problem!) – Matt Stein May 27 '17 at 18:59
  • Thank you Matt, for your response. The problem here is that AWS allows only to create Read-only replicas. And the reason why we are going for it instead of mirroring a read-write DB is that we just have to update our Master and changes will sync with slave. AWS allows to enable the writing in read-replica DB instance, so for now I have enabled that feature but this does not look like a suitable solution as anything updated on the slave will never sync with the master. – Ankit Sahu May 30 '17 at 5:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.