Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    46

    Memcache for 2 Processes

    I have a VPS running CentOS. I set up memcache no problem. However, now I have 2 applications on the VPS and would like to have memcache work for both apps at the same time. How can I do this?

    I have webmin installed but it doesnt have a memcache module.

  2. #2
    Join Date
    Sep 2008
    Posts
    191
    Hi,

    Unless I've misunderstood the question, you just need to set up a single instance of the daemon by setting the port and amount of RAM you'd like to allocate, and then set up your applications to work with it.

  3. #3
    Join Date
    Aug 2007
    Posts
    46
    Sorry I wasnt clear. Not feeling to well today. I do have memcache installed and running already.

    So if i understood you correct, since it is installed and running, all I have to do is set up the apps to work with memcache?

  4. #4
    Join Date
    Sep 2008
    Posts
    191
    That should be all you need to do.

    Provided that they support Memcache, you should be able to just put the address and port of the daemon in and away you go.

  5. #5
    Join Date
    Jun 2002
    Posts
    1,376
    Yes, memcache is meant to accept many connections at once. It's basically a stand-alone server. I have over 200 app instances hitting a few memcache nodes.

    The only thing you need to watch out for is the fact that they'll share a namespace -- if App A caches "homepage_content" and App B tries to read "homepage_content" for a different site, it'll get what App A cached. This is by design, but it's something to make sure you're expecting.

  6. #6
    Join Date
    May 2007
    Location
    Chicago
    Posts
    322
    Quote Originally Posted by fog View Post
    The only thing you need to watch out for is the fact that they'll share a namespace -- if App A caches "homepage_content" and App B tries to read "homepage_content" for a different site, it'll get what App A cached. This is by design, but it's something to make sure you're expecting.
    And if this is a problem with your applications, you could run two different memcached instances on one server, each on their own port, and assign one to each application. You won't be able to do things like dynamically share memory between servers - you'll have to allocate a chunk of memory to each, but you won't run into namespace collisions.

Similar Threads

  1. Do I need memcache?
    By JoyceBabu in forum Hosting Security and Technology
    Replies: 7
    Last Post: 10-24-2008, 01:26 AM
  2. Memcache or xCache
    By DJSlim in forum Hosting Security and Technology
    Replies: 2
    Last Post: 08-04-2008, 10:37 AM
  3. memcache failed
    By kismetsd in forum Hosting Security and Technology
    Replies: 0
    Last Post: 07-29-2008, 08:26 PM
  4. Dedicated memcache box?
    By art4eye in forum Colocation and Data Centers
    Replies: 9
    Last Post: 02-28-2008, 12:09 PM
  5. Can't connect to memcache. (win 32)
    By grabmail in forum Programming Discussion
    Replies: 0
    Last Post: 06-10-2006, 07:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •