0

I am using a linux server. I have done a single memcache installation and all is fine. We are adding another application on the same server. It also requires memcache.

How do I set up memcache so that each application gets its own instance of memcache?

I am using codeigniter framework.

Andrew
  • 18,680
  • 13
  • 103
  • 118
Hacker
  • 7,798
  • 19
  • 84
  • 154
  • 1
    It's very simple... start Memcached on another port, and configure your application to use it. – Brad Feb 17 '14 at 05:11
  • 1
    possible duplicate of [How can we create two instances of memcached server in same server in different port?](http://stackoverflow.com/questions/5928387/how-can-we-create-two-instances-of-memcached-server-in-same-server-in-different) – mikewied Feb 18 '14 at 23:04

1 Answers1

1

By default, memcache run on port 11211. But you can run as many memcache's instances on one server as you wish. Just specify another port to run - and configure your application to connect to the another port. Ex:

  • instance with 64M on port 11212

    memcache -p 11212 -m 64 -u nobody -d

  • instance with 128M on port 11213

    memcache -p 11213 -m 128 -u nobody -d

  • instance with 20G on port 11214

    memcache -p 11214 -m 20480 -u nobody -d

Community
  • 1
  • 1
user173129
  • 11
  • 1