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

adding replication or reducing size of cluster without data loss

2 replies [Last post]
  • Login or register to post comments
Mon, 10/17/2011 - 10:37
chatty
Offline
Joined: 11/17/2010
Groups: None

I have a cluster of 10 servers and I want to reduce it to 5 while I move 5 of them to a different rack which will involve re-IPing the servers etc.
What I'd like to do is one by one remove a server and then rebalance.
However The buckets against this cluster were set up without replication so..

Is it possible to do this without losing data?
If not is it possible to add replication to a bucket after it has been set up?

The servers are specified well enough to hold the entire dataset on 3 servers.
Unlike most installations we do NOT use membase as a cache for MYSql misses, we actually dropped mysql because membase has the persistence we need.

Once the servers have been moved I'd be adding them back to the cluster.

Top
  • Login or register to post comments
Mon, 10/17/2011 - 11:03
alex
Offline
Joined: 08/29/2011
Groups: None

Hi there,

Without replication you cannot do this through a rebalance without losing data.

Once a bucket is created you cannot change its replication value. What you'll need to do is create a second bucket and migrate the data.

You could do this via some application-level logic to avoid any down
time, with something like:

In your GET wrapper, first check the new bucket for the value; if it's
not there:
- check the old bucket
- write the value to the new bucket
- remove it from the old bucket
- return it to the client

In your PUT wrapper, write to the new bucket, and delete from the old bucket.

Or, do the migration via mbrestore.

hope this helps

-Alex.

Top
  • Login or register to post comments
Mon, 10/17/2011 - 15:35
chatty
Offline
Joined: 11/17/2010
Groups: None

Thanx Alex,
Our code is a bit complex to do the new / old bucket checks.
It looks like mbrestore with some downtime is our only option.

Alec

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