Vu Nguyen
Vu Nguyen3y ago

✅ – 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?
3 Replies
ScriptyChris
ScriptyChris3y 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
Vu Nguyen
Vu NguyenOP3y ago
That's make sense, thank you
reactibot
reactibot3y ago
This question has an answer! Thank you for helping 😄 If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/980807353496633374 This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/980807353496633374

Did you find this page helpful?