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

Moxi - How does it work?

3 replies [Last post]
  • Login or register to post comments
Fri, 06/03/2011 - 14:13
abhihome
Offline
Joined: 03/14/2011
Groups: None

Hi,

I have few basic questions on Moxi, can someone please address?

Question #1:

Does Moxi store any data in the client Application server?
I am getting an Out of memory error, ever since I started using Moxi.

The error doesn't occur if I restart Moxi's before I start the application servers.
When the error occurs, the tomcat does a heap dump and becomes non responsive.

Question #2:

If Moxi stores any data on the local Memory or Disc on the Application Server, how can we clear the cache if I need to?

Question #3:

What is the best cache clearing strategy on a Membased application.
Currently our application runs on local EHcache and we group objects in various buckets, and delete specific bucket when we need to.

Server: Membase 1.6.5
Client: memcached-2.6.jar (Spymemcached)
Number of Membase Servers: 2 (4GB each)
Data buckets : One (default)

Thanks
Abhilash

Top
  • Login or register to post comments
Sun, 06/05/2011 - 23:59
perry
Offline
Joined: 10/11/2010
Groups:

Hi there Abhilash, happy to try and address these:

1) No, Moxi is completely stateless. There "is" the ability to use a front-side cache but it is disabled by default. That error might actually be misleading depending on which version of Moxi you're using. Anything before 1.7 would return that error (incorrectly) for any connection problem. You might want to try the latest (http://www.couchbase.org/products/membase/1-7-beta) and let me know if that give a more descriptive error message.

2) Don't need to ;-)

3) Multiple buckets would certainly be a viable option with Membase as well. We do support the "flush_all" command (as standard memcached does) but there are some known issues with it and I wouldn't currently recommend it for production use but it can be very useful in testing.

There are a few other strategies for "flushing" data including key versioning: http://stackoverflow.com/questions/1202174/memcache-invalidate-entries-a...

Perhaps you can be more specific about the use case for clearing out data and I can help find the appropriate solution?

I would recommend upgrading to the latest version of Membase, as well as using the soon-to-be-released upgraded spymemcached client: http://www.couchbase.org/wiki/display/membase/prerelease+spymemcached+vb...

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
Mon, 06/06/2011 - 07:42
abhihome
Offline
Joined: 03/14/2011
Groups: None

Thanks Perry!

I'll try with latest moxi, and spymemcached client with vBucket and update you on the impact.

Regarding Point #3, ours is a rich content website, with lot of articles and other travel info's. We have grouped our contents into different buckets, for Ex. articles, attractions etc. When we make any updates to these content through our internal admin system, we need to refresh the specific cache bucket.

Right now, we can pick the bucket from a admin system, and EHCache deletes objects in that bucket through a net.sf.ehcache.management.Cache.removeAll() call.
Ex:

Cache cache = getCache(cacheName);
cache.removeAll();

After doing the performance tests on the application with Membase, my biggest question now is on the type of application, which Membase or any distributed caching solution can work better.

I realize that it works better on the social networking sites and gaming websites because it can be designed to make a minimum number of cache requests per user action.

On a content oriented website, the content can be categorized to many different categories, and the page will have multiple modules which uses the cache server. Thus a client request will produce a larger number of cache requests.

Our application responds well, with in-memory-eh-cache than Membase/any other centralized caching solution.

But we are trying to integrate Membase in order to increase the scalability and achieve, at least the same performance numbers we are currently having with EHCache. Is that over-ambitious? :)

Thanks Perry for all your help!
Abhilash

Top
  • Login or register to post comments
Mon, 06/06/2011 - 13:07
perry
Offline
Joined: 10/11/2010
Groups:

Transitioning from eh-cache to memcache/Membase will likely require a bit of work on your part, so you may not want to try to fit it in exactly...rather reimplement the areas that are different.

I would personally recommend the use of key versioning rather than simply flushing a whole bucket. It gives the application and developers much more flexibility over what data gets cleared without affecting the other data.

As far as performance goes, you'll definitely have some amount of trade-off when going from an in-memory solution to a network based one. I think the performance should be similar, but definitely not the same.

One thing I've found very common is for people to actually make MORE trips to the cache since it is so fast and so lightweight. By breaking up objects into smaller chunks, you can be much more granular over what data you grab (rather than getting a large chunk everytime when you only need a small piece).

Hope that helps

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
  • 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