is shared_dict ok with worker_processes >1 ?

57 views
Skip to first unread message

Hadi Abbasi

unread,
Apr 28, 2019, 3:50:36 AM4/28/19
to openresty-en
Hey friends...

I wanna set:
worker_processes = the number of server cpu cores!


and also :

worker_rlimit_nofile = worker_connections = 65536


but I don't know if setting worker_processes can really help my cdn to be faster than worker_processes=1?
and if nginx shared_dictionary and all shared and concurrent tools and Processes are auto-managed by worker_processes  more than 1?
just I want two yes answers to set it!
thanks a lot...
good luck...

Hadi Abbasi

unread,
Aug 27, 2019, 6:57:22 AM8/27/19
to openresty-en
yeah,it's OK!!!
nginx shared_Dict is atomic between all workers!

Kostya Y

unread,
Aug 28, 2019, 6:44:57 AM8/28/19
to openresty-en
just make sure you use the helper functions and not work with it like a regular table.

Hadi Abbasi

unread,
Aug 28, 2019, 7:32:32 PM8/28/19
to openresty-en
Yep, I see...
just we can use shared dictionary using its methods and it will be atomic and thread safe for all of workers...
thanks a lot...
Best,
Hadi
Reply all
Reply to author
Forward
0 new messages