-Bryce
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/redis-db?hl=en.
>
--
> Is this the case then, that if my site is being hit with say 1K request per second, they will all be sharing the same global connection?
>
> Well I am using Phussion passenger, which will create different pools of rails servers so I guess I will have mutiple application servers and thus multiple global connectsion per rails app server.
If you are using passenger then you will end up with 1 redfis connection per forked child. But you need to take care to make sure the forked childrten *do not* share or inherit the redis connection from the main parent. This means you need to use one of the passenger sp[ecial 'hooks' that let you perform code *after* the child is forked.
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
$redis = Redis.new :thread_safe => true, etc...
end
end
Put that somewhere in one of your initializers and it will fire only after the passenger child worker is forked and therefor will not share $redis file descriptors between children.
Cheers-
Ezra Zygmuntowicz
ezmo...@gmail.com
--