Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance overhead with a large number of services #48

Closed
claustres opened this issue Jan 13, 2020 · 3 comments
Closed

Performance overhead with a large number of services #48

claustres opened this issue Jan 13, 2020 · 3 comments

Comments

@claustres
Copy link
Member

claustres commented Jan 13, 2020

When reaching a large number of services (> 100) you can experience some performance issues like CPU load for message processing or network bandwidth consumption. Now we mitigate this by increasing the different intervals (hello/check messages) in the cote configuration. However this might not work with a large number of services. Refer to related cote issue.

We should probably manage all services methods using a single or limited set of requesters/responders and similarly service events using a single or limited set of publishers/subscribers.

@aikar
Copy link

aikar commented Feb 10, 2020

If @dashersw pulls my PR to node-discover in once its merged at wankdanker/node-discover#39 - this should at least greatly help reduce CPU cost in cote.

@dashersw
Copy link

@aikar have you run a benchmark on how much this saves performance? If we have concrete results, I'd be happy to review it and merge it to my branch, without waiting for the merge to the original repo.

@aikar
Copy link

aikar commented Feb 12, 2020

benchmarks no, but avoiding synchronous cpu intensive encryption and synchronous cpu intensive serialization logic blocking the node.js event loop is overall pretty clear it will be an improvement.

@claustres identified this code is the problem here: https://cotejs.slack.com/archives/C06MER4NT/p1570175857015100

So this PR simply skips even running this code all together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants