Friday, 5 January 2018

Having a worker thread in a 1-core environment for responsiveness ?

For example, say most requests to my server are responded to in less than 1ms, but on rare occasions the server needs to stringify a huge object and write it to a file, taking 2 seconds.Would it make sense to keep that object in a worker process and stringify it there, so maybe it takes 2.5 seconds but context switching is occurring and other requests are still being responded to quickly?Is there a better way to handle such a situation, other than adding more cores?

Submitted January 05, 2018 at 05:15PM by ConstantinopleFett

No comments:

Post a Comment