riak_kv_memory_backend in production

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

riak_kv_memory_backend in production

kpandey
Are there known production installation of riak that uses riak_kv_memory_backend.  We have a need to store transient data just in memory ( never hitting persistent store). I'm testing riak on aws with 3 node cluster and looks good so far.   Just wanted to find out what kind of setup people are using in production.

Thanks
Kumar
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

Jared Morrow
Kumar,

We have a few customers who use the memory backend.  The first example I could find (with the help of our CSE team) uses the memory backend on 8 machines with 12gb of ram each.  

I know you are just testing right now, but we'd suggest using 5 node minimum.  With N=3 on a 3-node cluster you could be writing multiple replicas to the same machine.

Good luck in your testing,
-Jared




On Thu, Jul 18, 2013 at 8:38 AM, kpandey <[hidden email]> wrote:
Are there known production installation of riak that uses
riak_kv_memory_backend.  We have a need to store transient data just in
memory ( never hitting persistent store). I'm testing riak on aws with 3
node cluster and looks good so far.   Just wanted to find out what kind of
setup people are using in production.

Thanks
Kumar



--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

Guido Medina-2
Since the data he is requiring to store is only "transient", would it make sense to set N=2 for performance? Or will N=2 have the opposite effect due to amount of nodes having such replica?

Guido.

On 18/07/13 16:15, Jared Morrow wrote:
Kumar,

We have a few customers who use the memory backend.  The first example I could find (with the help of our CSE team) uses the memory backend on 8 machines with 12gb of ram each.  

I know you are just testing right now, but we'd suggest using 5 node minimum.  With N=3 on a 3-node cluster you could be writing multiple replicas to the same machine.

Good luck in your testing,
-Jared




On Thu, Jul 18, 2013 at 8:38 AM, kpandey <[hidden email]> wrote:
Are there known production installation of riak that uses
riak_kv_memory_backend.  We have a need to store transient data just in
memory ( never hitting persistent store). I'm testing riak on aws with 3
node cluster and looks good so far.   Just wanted to find out what kind of
setup people are using in production.

Thanks
Kumar



--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

kpandey
In reply to this post by Jared Morrow
Thanks Jared
  Yes I will be running 5 node cluster in production.


Kumar
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

Guido Medina-2
In reply to this post by Guido Medina-2
Forgot to mention, with N=2 should he be able to have only 4 nodes and focus on RAM per node rather than 5?

I know is not recommended but shouldn't N=2 reduce the minimum recommended nodes to 4?

Guido.

On 18/07/13 16:21, Guido Medina wrote:
Since the data he is requiring to store is only "transient", would it make sense to set N=2 for performance? Or will N=2 have the opposite effect due to amount of nodes having such replica?

Guido.

On 18/07/13 16:15, Jared Morrow wrote:
Kumar,

We have a few customers who use the memory backend.  The first example I could find (with the help of our CSE team) uses the memory backend on 8 machines with 12gb of ram each.  

I know you are just testing right now, but we'd suggest using 5 node minimum.  With N=3 on a 3-node cluster you could be writing multiple replicas to the same machine.

Good luck in your testing,
-Jared




On Thu, Jul 18, 2013 at 8:38 AM, kpandey <[hidden email]> wrote:
Are there known production installation of riak that uses
riak_kv_memory_backend.  We have a need to store transient data just in
memory ( never hitting persistent store). I'm testing riak on aws with 3
node cluster and looks good so far.   Just wanted to find out what kind of
setup people are using in production.

Thanks
Kumar



--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

Dave Martorana
In using riak_kv_memory_backend as a replacement of sorts for Redis or memcached, is there any serious problem with using a single node and an n_val of 1? I can’t (yet) afford 5 high-RAM servers for a caching layer, and was looking to replace our memcached box with a Redis one. In the interest of reducing disparate-technology reliance, running a single-node riak_kv_memory_backend instance would be preferable, unless there are serious concerns *aside* from data loss.

For us, it’s it’s still a LRU-destroy-model cache, and losing it to machine failure is only a minor, temporary impediment. Any reason not to run a single-node memory-only “cluster” as a replacement for a single-machine memcached or Redis instance?


On Thu, Jul 18, 2013 at 11:23 AM, Guido Medina <[hidden email]> wrote:
Forgot to mention, with N=2 should he be able to have only 4 nodes and focus on RAM per node rather than 5?

I know is not recommended but shouldn't N=2 reduce the minimum recommended nodes to 4?

Guido.


On 18/07/13 16:21, Guido Medina wrote:
Since the data he is requiring to store is only "transient", would it make sense to set N=2 for performance? Or will N=2 have the opposite effect due to amount of nodes having such replica?

Guido.

On 18/07/13 16:15, Jared Morrow wrote:
Kumar,

We have a few customers who use the memory backend.  The first example I could find (with the help of our CSE team) uses the memory backend on 8 machines with 12gb of ram each.  

I know you are just testing right now, but we'd suggest using 5 node minimum.  With N=3 on a 3-node cluster you could be writing multiple replicas to the same machine.

Good luck in your testing,
-Jared




On Thu, Jul 18, 2013 at 8:38 AM, kpandey <[hidden email]> wrote:
Are there known production installation of riak that uses
riak_kv_memory_backend.  We have a need to store transient data just in
memory ( never hitting persistent store). I'm testing riak on aws with 3
node cluster and looks good so far.   Just wanted to find out what kind of
setup people are using in production.

Thanks
Kumar



--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

Jared Morrow
Dave,

Since Redis was designed with that use more in mind, I would guess a single node of Redis would be faster than a single node of RIak with N=1.  If you still want to run Riak, you'd want to lower the ring size to maybe 8 so you weren't running 64 vnodes on a single node.   This would obviously make it more difficult down the road to add nodes, but not impossible.

The only downside I can think of is what you already mentioned, dataloss and availability loss if that node goes down.

-Jared




On Thu, Jul 18, 2013 at 11:32 AM, Dave Martorana <[hidden email]> wrote:
In using riak_kv_memory_backend as a replacement of sorts for Redis or memcached, is there any serious problem with using a single node and an n_val of 1? I can’t (yet) afford 5 high-RAM servers for a caching layer, and was looking to replace our memcached box with a Redis one. In the interest of reducing disparate-technology reliance, running a single-node riak_kv_memory_backend instance would be preferable, unless there are serious concerns *aside* from data loss.

For us, it’s it’s still a LRU-destroy-model cache, and losing it to machine failure is only a minor, temporary impediment. Any reason not to run a single-node memory-only “cluster” as a replacement for a single-machine memcached or Redis instance?


On Thu, Jul 18, 2013 at 11:23 AM, Guido Medina <[hidden email]> wrote:
Forgot to mention, with N=2 should he be able to have only 4 nodes and focus on RAM per node rather than 5?

I know is not recommended but shouldn't N=2 reduce the minimum recommended nodes to 4?

Guido.


On 18/07/13 16:21, Guido Medina wrote:
Since the data he is requiring to store is only "transient", would it make sense to set N=2 for performance? Or will N=2 have the opposite effect due to amount of nodes having such replica?

Guido.

On 18/07/13 16:15, Jared Morrow wrote:
Kumar,

We have a few customers who use the memory backend.  The first example I could find (with the help of our CSE team) uses the memory backend on 8 machines with 12gb of ram each.  

I know you are just testing right now, but we'd suggest using 5 node minimum.  With N=3 on a 3-node cluster you could be writing multiple replicas to the same machine.

Good luck in your testing,
-Jared




On Thu, Jul 18, 2013 at 8:38 AM, kpandey <[hidden email]> wrote:
Are there known production installation of riak that uses
riak_kv_memory_backend.  We have a need to store transient data just in
memory ( never hitting persistent store). I'm testing riak on aws with 3
node cluster and looks good so far.   Just wanted to find out what kind of
setup people are using in production.

Thanks
Kumar



--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

kpandey
My ultimate goal is to use Riak as that one nosql solution for most of my needs  like

1) In memory immutable data( with guaranteed write  and failover   so n=3, w=quoram, r=1  )
2) In memory cache
3) bitask with TTL  to store immutable  session data (n=3, w=quoram, r=1 )
4) audit data (n=3, w=1,r=1)
5) log data (n=3, w=1,r=1)

etc.  

For now I am looking have a 5 node cluster and a test with 5 node cluser.

Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

David Yu
In reply to this post by kpandey


On Thu, Jul 18, 2013 at 10:38 PM, kpandey <[hidden email]> wrote:
Are there known production installation of riak that uses
riak_kv_memory_backend.  
Btw, another alternative is to use the leveldb memory-backend impl (prevents gc/storage overhead from erlang tables).  You'll have to patch up basho's fork of leveldb and include/compile/enable the memory-backend impl from stock leveldb. 
We have a need to store transient data just in
memory ( never hitting persistent store). I'm testing riak on aws with 3
node cluster and looks good so far.   Just wanted to find out what kind of
setup people are using in production.

Thanks
Kumar



--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



--
When the cat is away, the mouse is alone.
- David Yu
_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: riak_kv_memory_backend in production

Casey Rosenthal
In reply to this post by kpandey
A single node deployment of the memory backend will certainly work, but will not be as performant as Redis.

Here are some suggestions for running the memory backend in production:

1. Since you are running a single node cluster, set your n_val to 1 [1]

2. Make sure you set the max_memory parameter [2] to prevent the node from OOM'ing.

3. In order to get greater concurrency and throughput with the memory backend, I suggest increasing your ring_creation_size to 128 or 256.  You might need to test which is more performant on your hardware.

4. Turn anti_entropy off.  It will just be unnecessary overhead with your workload.

5. Make sure your ulimit is raised [3]

6. Apply our recommended system tunings [4]

7. You may need to raise some Erlang resource limits in your vm.args file [5]


[1] http://docs.basho.com/riak/latest/references/Configuration-Files/#app-config
[2] http://docs.basho.com/riak/1.3.0/tutorials/choosing-a-backend/Memory/#Enabling-and-Configuring-the-Memory-Backend
[3] http://goo.gl/6LCiq
[4] http://docs.basho.com/riak/latest/cookbooks/Linux-Performance-Tuning/#Linux-Tuning
[5] http://goo.gl/bRzeT


On Thu, Jul 18, 2013 at 2:24 PM, kpandey <[hidden email]> wrote:
My ultimate goal is to use Riak as that one nosql solution for most of my
needs  like

1) In memory immutable data( with guaranteed write  and failover   so n=3,
w=quoram, r=1  )
2) In memory cache
3) bitask with TTL  to store immutable  session data (n=3, w=quoram, r=1 )
4) audit data (n=3, w=1,r=1)
5) log data (n=3, w=1,r=1)

etc.

For now I am looking have a 5 node cluster and a test with 5 node cluser.





--
View this message in context: http://riak-users.197444.n3.nabble.com/riak-kv-memory-backend-in-production-tp4028393p4028404.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com