开发者

Storing MySQL writes in Memory

This is a bit of an oddball question. I'm aware of using memcached to cache "read heavy" data in memory, but is it possible todo the same for writes?

For example: You have a chunk of data in memory (in memcached) and if you have to 开发者_开发百科make any changes to that data, you make it in memory itself. At the end of a certain time period (hour, or day) you replicate all those changes into MySQL. So you are using storing things in memory rather than disk, and then at the end of the time period those changes become permanent when they are copied over to MySQL.

Is there a piece of software that can accomplish this ? Sample code maybe ?


Not possible for the critical data, as memcache do not guarantee data consistency.

Though you can use such a behavior for the session data and no special software needed. Just retrieve your data, alter it and save back.


yes, it can be in that way to reduce I/O overload.

i believe what you described is a "write-behind" scenario for cache data.

the implementation can be done with creating task queues and setup workers to do the job.


Perhaps MySQL Proxy can be of use for you? I haven't tried it so I don't know that it does what you require.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜