0

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?

1 Answers1

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