P
Piyush Ranjan
[Note: parts of this message were removed to make it a legal post.]
I have 1 ruby instance running for a website. I do heavy polling using in
memory data and to do run a few more. I have all my data stored in a MySQL
DB. Right now whenever an entry is made to this DB (containing only a single
table), I cache this data in memory and that serves my purpose. Now as the
traffic is increasing I need to start more ruby instances. Is there any way
to store this data in a single in-memory location and access it from all
other vms ?
There are a few options that come to my mind like
1. Storing in a memcache
2. Storing in localmemcache
The problem with both of these options is that I need to store heavily
nested objects. If I do that in memcache I may have to do using something
like Marshal dump and load which is a little slow for my liking.
Other option could be to keep seperate copies in all VMs and refresh it
using a hhtp get call to all VMs whenever the data changes in the DB.
Now the question is , is there a way to access in a shared manner between
all the VMs ? Or am I mssing something very obvious here? or is it not
doable ?
Piyush Ranjan
I have 1 ruby instance running for a website. I do heavy polling using in
memory data and to do run a few more. I have all my data stored in a MySQL
DB. Right now whenever an entry is made to this DB (containing only a single
table), I cache this data in memory and that serves my purpose. Now as the
traffic is increasing I need to start more ruby instances. Is there any way
to store this data in a single in-memory location and access it from all
other vms ?
There are a few options that come to my mind like
1. Storing in a memcache
2. Storing in localmemcache
The problem with both of these options is that I need to store heavily
nested objects. If I do that in memcache I may have to do using something
like Marshal dump and load which is a little slow for my liking.
Other option could be to keep seperate copies in all VMs and refresh it
using a hhtp get call to all VMs whenever the data changes in the DB.
Now the question is , is there a way to access in a shared manner between
all the VMs ? Or am I mssing something very obvious here? or is it not
doable ?
Piyush Ranjan