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.
1dbf49b1551a3917432c4056bcf8de22?d=identicon&s=25 Chieu (Guest)
on 2009-06-01 07: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?
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2009-06-01 13: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 Dounin
1dbf49b1551a3917432c4056bcf8de22?d=identicon&s=25 Chieu (Guest)
on 2009-06-02 04:22
(Received via mailing list)
thanks and I will try it.

2009/6/1 Maxim Dounin <mdounin@mdounin.ru>
This topic is locked and can not be replied to.