wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

Balance all subscribers between CPU cores #311

Open yaroslav-phokus opened 4 months ago

yaroslav-phokus commented 4 months ago

We have multiple channels. Some of them have from 500 to 1000 subscribers, others have many less. Thus some subscribers of highloaded channels suffer from delays. I wonder whether there are some way to balance CPU capabilities not only between channels, but between subscribers to have equal number of subscribers distributed among each CPU?

Maybe there's some kind of configuration to speed up delivery?

Thanks!

sunnychun commented 4 months ago

您的信已收到,我将尽快给您答复

wandenberg commented 4 months ago

Hi @yaroslav-phokus inside the module we don't have control of in which process the user was connected to, this is something lower level. On top of my knowledge, what you can try to improve is the affinity between the Nginx processes and the cores, and then the distribution of connections per process, something like the accept_mutex These should improve the distribution optimizing the deliver.

yaroslav-phokus commented 4 months ago

Hi @wandenberg , thanks, will try.