2

I have an AWS instance with local (ephemeral) SSD storage backed by a permanent EBS storage. Is it possible to configure the local storage to act as a mirror/cache for row data in MySQL? I do not wish to cache resultsets, but the actual tables. Naturally, I want my writes to hit not only the local disk but also EBS for safety.

If I could offload majority of my queries to local SSDs, I'd have more consistent response latency and significantly lower I/O bill in AWS.

The instance memory cannot fit all of the data in RAM (yes, that would be ideal) but my local SSD is large enough fit all of the data.

RAID1 involving local SSD and EBS is not going to help me reduce the I/O bill, but it would improve latency. An ideal solution would give me both.

Creating another read-only slave DB with local SSDs is another option but perhaps there is a way to get what I want in a single-instance setup?

Any advice greatly appreciated.

Follow up: I'm currently investigating a setup similar to what's described here: http://tansi.info/hybrid/

This is the setup that appears to work well: http://hatim.eu/2014/05/25/leveraging-ssd-ephemeral-disks-in-ec2-part-2/

3
  • Any particular reason I might miss that you don't setup replication locally? howtoforge.com/one_machine_mysql_replication Commented Jun 8, 2016 at 21:37
  • 1
    Yes, creating a read-only slave with SSDs and redirecting traffic to it would work. But, I would give the Slave its own instance, not to consume memory from the Master. So Slave -> local SSDs, Master -> EBS. All Inserts/Updates go to Master, all queries go to Slave. It's not bad.
    – Slawomir
    Commented Jun 9, 2016 at 1:28
  • Cool, are you happy with that solution then? Also, I'm not sure how much a full host will cost, you could just up the memory on the slave and set the memory usage to limit it there. That way you're not paying for an additional instance but it's up to you on that level. You would still be sharing network/connections and so fourth so separation is always nice but if you wanted to save money and didn't use extremely high bandwidth, it would work. Commented Jun 10, 2016 at 16:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.