So, I'm writng a software to check the insights of an instagram page that I have. The problem is that, using the instagram graph api, getting the insights of a post takes like .2/.3 seconds. To display them by date I can easily use a pager, so it doesn't take a lot of time, but I need to find a method to get the insights of every post to make graphs or order them in a specific way, otherwise the software becomes nearly useless. It's the first time having this tipe of problem so I don't really know what to do. I've read of workers, can they be useful or there are other methods to speed up the process??
Well you can boost performance of Node.js application in the following ways.
You can use cluster module.
You are right, you should use workers and offload the heawy tasks to it where possible. But the thing is if the operation that takes long is on the Instagram site it may not help.
In terms of scallability of your application you can apply some queue mechanism, for example BullMQ npm package can help you with that.