开发者

About the way nginx deals with listening sockets

It uses mutex to make worker process take turns to accept new connections on each listening socket.

Why not assign specific listening sockets to each worker process ,thus avoiding the overhead of the mutex thing开发者_如何学C?


Most likely to get a more even distribution of requests over each worker. If you have one port handling more requests than others then the worker handling that socket will have to handle more requests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜