✅ – 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?
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
Nguyen689d ago
That's make sense, thank you
Unknown User689d ago