- From: Daniel Condomitti <
>
- To:
- Subject: [chef] Re: redisio cookbook
- Date: Wed, 26 Mar 2014 12:34:53 -0700
You can put it in the individual instance hash:
'servers' => [{'port' => '6379', 'name' => "dev_redis"}, {'port' => '6380', 'name' => "uat_redis", 'maxmemory' => ’60%’}]
You should also explore the expiration algorithm options before setting max_memory or you’ll run into a lot of errors from Redis when max_memory is reached and there aren’t any keys to evict.
On Wednesday, March 26, 2014 at 12:10 PM, Nikhil Shah wrote:
I deployed the redisio cookbook and it seems to work like a charm. I
did have one question when it came to max memory. How would i specify 1
instance getting 60% memory; whereas the 2-3 instance receiving 30%?
Would this be done via role? Here is how I have my role setup for redis:
name "redis"
description "redis role applied to all redis servers."
run_list *%w[
recipe[redisio::install]
recipe[redisio::enable]
]
default_attributes({
'redisio' => {
'default_settings' => {'datadir' => '/etc/redis-db'},
'servers' => [{'port' => '6379', 'name' => "dev_redis"}, {'port' => '6380', 'name' => "uat_redis"}]
}
})
Here is the default attribute:
'maxmemory' => nil, - This allows the use of percentages, you must append % to the number.
I guess where and how/where would I specify devredis receives X%?
--
THE ORCHARD Distribution Done Right
23 E 4
th St, Fl 3
• New York, NY 10003
www.theorchard.com
Privileged And Confidential Communication.
This electronic transmission, and any documents attached hereto, (a)
are protected by the Electronic Communications Privacy Act (18 USC §§
2510-2521), (b) may contain confidential and/or legally privileged
information, and (c) are for the sole use of the intended recipient
named above. If you have received this electronic message in error,
please notify the sender and delete the electronic message. Any
disclosure, copying, distribution, or use of the contents of the
information received in error is strictly prohibited.
Archive powered by MHonArc 2.6.16.