-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.