Thursday 20 April 2017

How to run a Node.js worker for a server hosted on Amazon ECS?

we have a node server on Amazon ECS that gets hit around 100 times per second. Since javascript is single threaded, we don't want to block the event loop. So we need to create a worker that periodically fetches data from a database and loads the data into memory. This may take a while, so we want to create a worker so there's a different event loop. How can we do this with ECS? Can we just use an npm or do we have to do anything special like setting additional stuff up on the Amazon console to have a separate worker?



via PythonNoobile

No comments:

Post a Comment