✅ – VuNguyen – 12-18 May 30

I have a nodejs script that run crawl in background and serving an API with express at the same time, I wonder if I seprate the crawling process in another worker, will it be better in any chance?
S
ScriptyChris689d ago
workers are useful if you want to unload your main thread. So like if your API gets lots of requests and crawling takes much time processing data, it slows down API (clients have to wait longer to get their HTTP responses). If you move your crawling stuff to the worker then API will be able to serve clients more fluently as the crawling heavy load will be processed in separate thread
N
Nguyen689d ago
That's make sense, thank you
UU
Unknown User689d ago