Redisio cookbook


#1

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%?

Nikhil Shah * System Administrator
nshah@theorchard.com * p. (+1) 212 308-5648

THE ORCHARD * Distribution Done Right*
23 E 4th St, Fl 3 * New York, NY 10003

Follow us: The Daily Rind http://www.dailyrindblog.com/
Facebookhttp://www.facebook.com/theorchard
Twitter http://www.twitter.com/orchtweets
YouTubehttp://www.youtube.com/user/theorchard
LinkedIn http://www.linkedin.com/company/the-orchard
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 © 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.


#2

Sorry I got it:

‘servers’ => [{‘port’ => ‘6379’, ‘name’ => “dev_redis”, ‘maxmemory’ =>
‘60%’}, {‘port’ => ‘6380’, ‘name’ => “uat_redis”, ‘maxmemory’ => ‘60%’}]

On Wed, Mar 26, 2014 at 3:10 PM, Nikhil Shah nshah@theorchard.com 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%?

Nikhil Shah * System Administrator
nshah@theorchard.com * p. (+1) 212 308-5648

THE ORCHARD * Distribution Done Right*
23 E 4th St, Fl 3 * New York, NY 10003
www.theorchard.com

Follow us: The Daily Rind http://www.dailyrindblog.com/ Facebookhttp://www.facebook.com/theorchard
Twitter http://www.twitter.com/orchtweets YouTubehttp://www.youtube.com/user/theorchard
LinkedIn http://www.linkedin.com/company/the-orchard
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 © 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.

Nikhil Shah * System Administrator
nshah@theorchard.com * p. (+1) 212 308-5648

THE ORCHARD * Distribution Done Right*
23 E 4th St, Fl 3 * New York, NY 10003

Follow us: The Daily Rind http://www.dailyrindblog.com/
Facebookhttp://www.facebook.com/theorchard
Twitter http://www.twitter.com/orchtweets
YouTubehttp://www.youtube.com/user/theorchard
LinkedIn http://www.linkedin.com/company/the-orchard
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 © 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.


#3

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%?

Nikhil Shah • System Administrator
nshah@theorchard.com (mailto:nshah@theorchard.com) • p. (+1) 212 308-5648

THE ORCHARD Distribution Done Right
23 E 4th St, Fl 3 • New York, NY 10003
www.theorchard.com (http://www.theorchard.com)

Follow us:
The Daily Rind (http://www.dailyrindblog.com/)

Facebook (http://www.facebook.com/theorchard)

Twitter (http://www.twitter.com/orchtweets)

YouTube (http://www.youtube.com/user/theorchard)

LinkedIn (http://www.linkedin.com/company/the-orchard)

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 © 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.


#4

I believe the expiration alg defaults to volatile-lru, if that is what you
are referring to.

On Wed, Mar 26, 2014 at 3:34 PM, Daniel Condomitti daniel@condomitti.comwrote:

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%?

Nikhil Shah * System Administrator
nshah@theorchard.com * p. (+1) 212 308-5648

THE ORCHARD * Distribution Done Right*
23 E 4th St, Fl 3 * New York, NY 10003
www.theorchard.com

Follow us: The Daily Rind http://www.dailyrindblog.com/ Facebookhttp://www.facebook.com/theorchard
Twitter http://www.twitter.com/orchtweets YouTubehttp://www.youtube.com/user/theorchard
LinkedIn http://www.linkedin.com/company/the-orchard
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 © 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.

Nikhil Shah * System Administrator
nshah@theorchard.com * p. (+1) 212 308-5648

THE ORCHARD * Distribution Done Right*
23 E 4th St, Fl 3 * New York, NY 10003

Follow us: The Daily Rind http://www.dailyrindblog.com/
Facebookhttp://www.facebook.com/theorchard
Twitter http://www.twitter.com/orchtweets
YouTubehttp://www.youtube.com/user/theorchard
LinkedIn http://www.linkedin.com/company/the-orchard
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 © 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.