Forum: NGINX Does nginx support multi-thread?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chieu (Guest)
on 2009-06-01 09:04
(Received via mailing list)
I found that nginx can just work in multi-process. I just write a cache
and
found the cache can not be shared in multi-process model, each work
process
just copy the cache and manage the cache self. So I want a global cache
.Does any way I can share a cache in global?
Maxim D. (Guest)
on 2009-06-01 15:10
(Received via mailing list)
Hello!

On Mon, Jun 01, 2009 at 12:54:53PM +0800, Chieu wrote:

> I found that nginx can just work in multi-process. I just write a cache and
> found the cache can not be shared in multi-process model, each work process
> just copy the cache and manage the cache self. So I want a global cache
> .Does any way I can share a cache in global?

For inter-process data nginx typically uses shared memory zones
(implemented via mmap() or shmget() depending on OS capabilites).
Take a look at ngx_http_limit_zone_module for coding examples.

Maxim D.
Chieu (Guest)
on 2009-06-02 06:22
(Received via mailing list)
thanks and I will try it.

2009/6/1 Maxim D. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.