Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.6.x

Eviction Policies?

6 replies [Last post]
  • Login or register to post comments
Thu, 02/03/2011 - 06:33
bnutting
Offline
Joined: 02/03/2011
Groups: None

Hi there,

We are looking to use Membase/Memcached to replace our Jboss Cache as we are having constant issues with it. One thing that Jboss cache has that I cannot find documented anywhere in Membase/Memcached is eviction policies. In our jboss cache we have two different "buckets" configured...one that if a node is idle for X minutes, it is automatically removed...the other is if a node is older than X minutes it gets removed automatically. Does Membase/Memcached have this and if not how are people accomplishing this? Our goal is to prevent stale data in the cache.

--Ben

Top
  • Login or register to post comments
Thu, 02/03/2011 - 16:09
perry
Offline
Joined: 10/11/2010
Groups:

 Hey Ben, Membase supports expiration in the same way that memcached does.  When you 'set' an item, you can define how long it should live in the database/cache.  Unfortunately we don't have the ability yet to expire based on idle time, but that's a feature we're actively looking into.

 

Let me know if that helps or if there's any more information I can provide.

 

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

Top
  • Login or register to post comments
Thu, 02/03/2011 - 17:05
bnutting
Offline
Joined: 02/03/2011
Groups: None

I do not pretend to know the inner workings of Membase....I am sure they are very complex...but from a user standpoint may I make a suggestion on how I would implement the idle cache.

Membase already has the max age cache, where any object placed into the cache will stay there for X seconds. This is very good to help prevent data from getting stale, but great for performance. Theoretically only one user will take the database hit, or you could have background jobs refresh the data before it gets stale.

What Membase needs is an idle cache that refreshes the timer when a node is used. What I would recommend is have this be an option at the bucket level. Every node will have X seconds of idle time before they are removed, and if they are used, Membase uses the value from the bucket. This will prevent having to keep the original expiration seconds and the current. This would prevent the get and put to keep the timer refreshed.

Thanks,

--Ben

Top
  • Login or register to post comments
Thu, 02/03/2011 - 18:28
perry
Offline
Joined: 10/11/2010
Groups:

 Thanks for the feedback Ben, I'll pass that around internally.

 

What we are currently planning on doing is implementing a "touch" command so that the application can decide which items it wants to extend the TTL on and which ones it doesn't...more to come on that hopefully soon.

 

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

Top
  • Login or register to post comments
Fri, 02/04/2011 - 21:14
jasonsirota
Offline
Joined: 11/10/2010
Groups: None

Out of curiosity, why do you want to remove stale data out of an LRU cache? it seems like when the cache gets full it will just clear out the old data, in the mean time, what's the harm in having it in there?

__________________

Jason Sirota
Director, Application Architecture - The Knot
http://twitter.com/jasonsirota

Top
  • Login or register to post comments
Mon, 02/07/2011 - 09:55
bnutting
Offline
Joined: 02/03/2011
Groups: None

In this case I am putting data into the cache that is "like"... meaning multiple nodes that have a similar grouping. As long as the variables are used I want it to stay in the cache. When they are not being used for say an hour, they can flush out. Think session timeouts on an enterprise system.

Top
  • Login or register to post comments
Sat, 02/18/2012 - 03:59
DaisySibyl
Offline
Joined: 02/08/2012
Groups: None

The idle cache is very complex indeed. I have troubles figuring it out.

__________________

http://www.w-weddinginvitations.com/buy-wedding-invitations-online/

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker