Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to distributed cache for ephemeral data #52

Open
cammoore opened this issue Jul 13, 2013 · 0 comments
Open

Switch to distributed cache for ephemeral data #52

cammoore opened this issue Jul 13, 2013 · 0 comments

Comments

@cammoore
Copy link
Member

Reported by rbrewer, Aug 21, 2012
We are using the Java Caching System to cache the ephemeral data right now, which works fine with a single server, but doesn't scale when multiple WattDepot servers are acting as a cluster (like on Heroku with multiple dynos). Two possible solutions:

Switch to memcached for the cache. Heroku supports memcached as a service shared across dynos. The cache could be segmented, so that sensor data goes in one segment with a short TTL (to support latest sensor data queries) and the results of all REST API calls in another segment.

Put latest high-frequency sensor data in a separate table in the existing Postgres database. This assumes that the database is relatively fast, so it only helps the long-term data storage problem for high-frequency data.

@ghost ghost assigned cammoore Aug 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant