Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
150 lines (99 sloc) 4.15 KB

The NorthScale Server

This application represents the top of the hierarchy of all memcached smart services. It is an application in the Erlang OTP sense.

[ns server]


Build dependencies include...

  • erlang (5.7.4, also needed at runtime)
  • ruby (1.8.6)
  • ruby gems
    • sprockets (install with gem install sprockets)


git clone
cd ns_server

Runtime dependencies

Before you start the server, you may need to do the following

  • Below, is where you checked out and built ns_server above.
  • Make sure the needed ports are not being used (these include 8080, 11211, 11212, etc).


For 1.0/Reveal memcached...

Build the "for_release" branch of northscale memcached that has isasl enabled...

git clone && cd memcached && git checkout --track origin/for_release && ./config/ && ./configure --enable-isasl && make && make test

For membase, instead use git:// engine branch...

git clone git:// git checkout --track origin/engine

Build the bucket_engine library from the repository.

git clone && cd bucket_engine && ./configure --with-memcached=/path/to/your/above/dir/for/memcached/ && make && make test

Next, create symlinks...

  • Create a sym link from the for_release northscale memcached that you just built to /priv/memcached
  • Create a sym link from the memcached/.libs/ to /priv/engines/
  • Create a sym link from the bucket_engine/.libs/ to /priv/engines/

For membase, also symlink...

/priv/engines/ to memcached/.libs/

Also, for membase, build the ep engine and symlink it the .libs/ the priv/engines...

git clone && cd ep-engine && ./configure --with-memcached=/path/to/your/above/dir/for/memcached/ && make && make test

If your sym links are correct, you should be able to cd to /priv and run (just to test):

./memcached -p 11211 -d -P /tmp/ -E engines/ -e "admin=_admin;engine=engines/;default_bucket_name=default

To kill your test memcached:

kill cat /tmp/


To make life easy, use the appropriate binary from the Northscale website. Copy the installed memcached.exe and into the ./priv and ./priv/engines directories.

If your copying was correct, you should be able to cd /priv and run (just to test):

./memcached -p 11211 -E engines/

To kill memcached:

taskkill //F //PID tasklist.exe |grep memcached|awk '/^(\w+)\W+(\w+)/ {print $2}'


Just a general note, if you are making changes to the priv/config file and these changes don't appear to be reflected in the start up procedures, try deleting the /config dir.


The ns_server can be started through the script found in the main directory.


It starts under sasl, which will give you more detailed logging on both progress and failures of the application and the heirarcy.

Interactive Execution

If you'd like to just start a shell, then interact with the running application, use:


To start with a different node name, and pass parameters (such as a different config file), use:

./ -name $NODE_NAME -ns_server ns_server_config "$CONFIG_FILE"

For example:

./ -name ns_2 -ns_server ns_server_config "priv/config2"

Tip: if you see error message like...

=ERROR REPORT==== 18-Jan-2010::10:45:00 ===
application_controller: bad term: priv/config2

Then you will have to add backslashes around the path double-quotes -- like \"priv/config\"

Copyright (c) 2010, NorthScale, Inc.

Jump to Line
Something went wrong with that request. Please try again.