1

We have an application running on a single azure virtual machine (Windows server R12 Data center). Due to the huge traffic and load, we are planning to scale our system. The application is a game we have developed on nodeJs, socket.io and mongodb (MongoLab or MLAB ). Our preliminary plan is as follow :

Scaling the OS : Use azure virtual machine scale set.

Scaling the Database: Given that we are using Mlab (a mongodb database-as-a-service) we believe that scaling is done by them.

Scaling effect on Nodejs and Socket.io : We are not sure...(any hints)

Can anyone with experience on these technologies comment on scaling this stack ?

soulemane moumie
  • 1,005
  • 1
  • 14
  • 26

2 Answers2

1

Azure VM Scale Sets are now generally available. The GA announcement is here: Azure Virtual Machine Scale Sets GA, and the product page is here: Virtual Machine Scale Sets.

When you create an Azure VM scale set, you will create a new resource group with a set number of VMs with the same size, which enables them to scale out and in rapidly and automatically.

You can refer to Azure VM Scale Sets public preview for the overview and general steps of creating an VMSS. And please refer to Automatically scale machines in a Virtual Machine Scale Set for the details of template references.

By the way, you can capture your original VM image, and deploy it to your new VMSS. So that you can save time in deploying your code and runtime environment. Please refer to https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-customimage for details.

Gary Liu
  • 13,758
  • 1
  • 17
  • 32
  • Thanks this is partially a solution to my problem, any special setting for nodes, socket along with vmss ? – soulemane moumie Jun 17 '16 at 00:28
  • The internal settings should be the same with Azure VM. And by default, the `loadBalancingRule` will map the public port 80 of vmss to internal VM's 80 port. If you need other port, you can configure in the template file, under `loadBalancingRules` section. And any further concern, please feel free to let me know. – Gary Liu Jun 17 '16 at 01:00
  • Thanks Gary ! This is exactly what I need. I have been trying to make it work. I need a custom image with nodeJs installed and as well a copy of my application. My question is How can I create this custom image ?, where should I keep it ?, How should I reference it ? I even tried to run this sample template but I could get what I should enter in this field <> – soulemane moumie Jun 19 '16 at 15:48
  • To capture the VM image, you can refer to https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-capture-image/. And the image will stored in your storage, which will have a storage url, and you can replace it into the template file at https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-customimage. – Gary Liu Jun 20 '16 at 01:44
  • The template file in the github is not complete, there are several params need to be changed to custom storage urls, which raises your issue. – Gary Liu Jun 20 '16 at 01:45
0

To scale nodejs with Socket.io you can try horizontal scaling using multicores. You can either create multiple servers on different ports and use NginX reverse proxy or you can try nodejs cluster module. Check this link.

Good way to use socket.io with cluster in multi-core server?

ZApatel
  • 85
  • 9