I am using createCipheriv, createHash api's and on an average doing 4-5 
crypt-decrypt per request. Major consumer of crypto in my app is session 
(SHA1 on session size ≈20-30k). What I am seeing is only 50-100 rps max and 
90+% CPU in perf testing and I was suspecting heavy crypto use for it. Let 
me move crypto functionality to child processes and compare the result.

-sanjeev

On Tuesday, September 2, 2014 9:39:08 AM UTC-7, Fedor Indutny wrote:
>
> This totally depends on what kind of crypto are you going to be using.
>
> For example the 2048bit RSA decryption takes 1ms on my MBP, so using it on 
> every request will limit your RPS to around 700-800.
>
>
> On Sun, Aug 31, 2014 at 10:28 PM, Sanjeev Koranga <[email protected] 
> <javascript:>> wrote:
>
>> So if an app is doing lot of crypto, would you advice using child 
>> processes/fibers/webworkers for running crypto functionality?
>>
>> On Saturday, August 30, 2014 4:29:28 PM UTC-7, mscdex wrote:
>>>
>>> On Friday, August 29, 2014 8:02:25 PM UTC-4, Sanjeev Koranga wrote:
>>>>
>>>> When I use the node crypto module, does it block the event loop while 
>>>> processing or spawn a different thread in C++?
>>>>
>>>
>>> Currently there are no non-blocking counterparts to the existing 
>>> functions in the built-in crypto module for node, except for 
>>> `randomBytes()`/`pseudoRandomBytes()` which run in a separate thread if 
>>> a callback is passed to those functions.
>>>
>>  -- 
>> Job board: http://jobs.nodejs.org/
>> New group rules: 
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/nodejs/0980ed05-2d1b-4430-bfbd-e5e011c48410%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/nodejs/0980ed05-2d1b-4430-bfbd-e5e011c48410%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/f1677ead-61f3-4325-8544-88c98ef0cffe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to