I will build a service which uses crypto.randomBytes() a lot. As I know it is blocking I/O. Is there a way to at least speed this process up? Is there anything multicores or multithreads can do?
Asked
Active
Viewed 390 times
1 Answers
1
Some details here: How random is crypto#randomBytes?
Assuming you're not using windows crypto.randomBytes()
is using /dev/urandom
. There seem to be a few alternatives to using /dev/urandom
if it's a performance bottleneck: https://serverfault.com/questions/6440/is-there-an-alternative-to-dev-urandom
Also no, /dev/urandom won't run multi-core: https://bbs.archlinux.org/viewtopic.php?id=160967

maxm
- 3,412
- 1
- 19
- 27
-
Thank you, links answered all of my questions. – Mehmet Egemen Albayrak Oct 25 '18 at 16:32