Run Asynchronous Tasks in New Kubernetes Pods with NodeJS
<p>When you start creating APIs as a junior developer, you build everything synchronously. You don’t think in advance that the data in production is much bigger, that the forEach on your test data will behave differently on a million lines. If you’re lucky, everything breaks when you release your code. If you’re unlucky, it will take days of users complaining of random crashes before you find the culprit piece of code that overloads your API.</p>
<p>I know that because I’ve been through it enough to learn the lesson — <em>especially</em> <em>when your company at the time has a three-week delay on release, but that’s another subject. </em>I still get “javascript heap out of memory” nightmares occasionally.</p>
<p>Then, you grow as a developer. You learn about asynchronous design with message queues and workers. Your user-facing APIs don’t have to crash when too many resource-intensive tasks are triggered simultaneously.</p>
<p><a href="https://itnext.io/run-asynchronous-tasks-in-a-new-kubernetes-pod-with-nodejs-9a80bb1f649e"><strong>Read More</strong></a></p>