CLUSTER MULTI THREADED NODEJS -- Run threads in parallel to speed up long processes (CORRECTED)
34.2 هزار بار بازدید -
4 سال پیش
-
My JavaScript that creates thumbnails
My JavaScript that creates thumbnails for hundreds of files is taking too long. So I have decided to speed things up with cluster.fork() that is built into Node.js. This will allow the workload to be spread out across my multi-core processor system.
⚠ 8:53 should read: index % forks === cluster.worker.id - 1
To follow along, you can fork this repository. I have added a tag you can check out that will bring you right to the point this video was created.
```
git checkout https://github.com/joelnet/mojo-galle...
cd mojo-gallery
git checkout youtube-video-cluster
```
⚠ 8:53 should read: index % forks === cluster.worker.id - 1
To follow along, you can fork this repository. I have added a tag you can check out that will bring you right to the point this video was created.
```
git checkout https://github.com/joelnet/mojo-galle...
cd mojo-gallery
git checkout youtube-video-cluster
```
4 سال پیش
در تاریخ 1399/04/22 منتشر شده
است.
34,266
بـار بازدید شده