Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

ext/couchbase and persistent connections

1 reply [Last post]
  • Login or register to post comments
Tue, 03/13/2012 - 11:48
mikelevy
Offline
Joined: 09/19/2011
Groups: None

I was wondering if I could get a little more information about of ext/couchbase.

A little background, I've been using Membase/Couchbase for about a year now as part of the backend for social games. To date, we've been using PECL Memcached on our app servers that connect to a stand-alone moxi proxy that then queries our Membase cluster. I've been looking into replacing ext/memcached with ext/couchbase, but there's a couple questions I haven't been able to find yet.

The first is would it be feasible to replace ext/memcached and the stand-alone moxi with just ext/couchbase? I know that ext/couchbase is a smart client and I get the impression that it does the same thing as moxi: do an internal lookup of the vbucket mapping and route the request to the correct server. Does that sound about right?

The second question has to do with persistent connections with ext/couchbase. In theory, I'd like to be able to open a connection, perform x number of get/sets, and then when the script finishes running and exits, the connection is closed/destroyed. I know that persistent connections are supposed to help with performance/resource usage (all good things in a social game setting), but I need to make sure I'm not going to run out of connections when there's high usage across a wide user base. So my question I guess is when exactly does a persistent connection get closed? Does it persist between script executions? Or does it behave more like a mysql connection in that once you connect the connection stays open until the script exits or the connection is closed manually?

Thanks!

Top
  • Login or register to post comments
Sun, 03/18/2012 - 23:45
ingenthr
Offline
Joined: 03/16/2010
Groups:

First, on replacing ext/memcached with ext/couchbase and going around moxi, yep. That's exactly what it's supposed to do. It pulls the config (via libcouchbase via libvbucket) and routes to the right server.

On the second question, if the script exits the connection should be closed. Also, if you have multiple things going to Couchbase Server from a long running process, the connections will be shared/reused. There shouldn't be any problem with all of the connections getting consumed.

Give it a shot and let us know!

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