简体   繁体   中英

Deploying a node js socket io app to azure

I'm thinking about using azure for my node js app. The app uses Pomelo, which is a framework built on top of socket.io. The server also uses redis for scalability purposes.

I'm kind of confused as to which subscription I should look into.

Let me detail my needs:

  1. Scalability: The server is stateful. This means if I scale, the other pods must die only if there's no connection to them.
  2. Deployment: If I deploy a new version, because the server is stateful, I want to gradually redirect the traffic to the new servers, until there is no connection on the previous version servers.

The two options that seem the most fit for these scenarios are azure web app service and azure container instances.

Ideally, I'd like to go with azure web app as it seems simpler to handle. I don't know if this subscription offers that type of customization. On the other hand, I'm almost certain I can do this with an azure container intances and AKS.

Does someone have experience with this? Thank you!

It is absolutely yes that you can use Azure Web Application to achieve "Scalability" and "Deployment" which meet your need.

  1. Scalability : (Actually I'm not sure what "the other pods" mean. So let me introduce scale up and scale out in Azure:)

Scale up: Get more CPU, memory, disk space, and extra features like dedicated virtual machines (VMs), custom domains and certificates, staging slots, autoscaling, and more. You scale up by changing the pricing tier of the App Service plan that your app belongs to.

Scale out: Increase the number of VM instances that run your app. You can scale out to as many as 30 instances, depending on your pricing tier.

  1. Deployment : You can use Traffic Manager under deployment slots in Azure web app.

  2. Besides: If you mean "the other pods" is your other web app on the same App Service plan, when you do scale up, there would be an interrupt, while when you do scale out, it should process without interrupt. For more information about Azure App Service plan or app service, you can have a look at official docs :

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM