Search code examples
node.jsbitbucketauto-updatemultiserver

auto update code to many servers at one time


I have a nodejs web app, I deploy this app to 3 servers to serve many requests from user. The problem is when everytime I update source code, I have to remote to every server to pull code from Bitbucket and restart the server. Is there any way to update one time for all servers?, thanks. How facebook do when they have thousand of servers?


Solution

  • I would recommend removing git access from your servers. Instead, use a build tool like grunt or gulp to create a package. Then deploy it with something like Ansible (super simple, runs over ssh without any agents), or Chef, etc.