Skip to content

Switch to distributed cache for ephemeral data #52

@cammoore

Description

@cammoore

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions