Pregunta

I am new to Microsoft windows azure cloud and want to run my game server using node.js in azure cloud. I read the windows azure Node.js Developer Center site and it seems my server can run in azure cloud multiple ways.

Which azure option is good for my TCP game server using node.js?

¿Fue útil?

Solución

Three options:

  1. Web Site
  2. Cloud Service
  3. Virtual Machine

Web Sites are essentially shared web hosting, which only supports HTTP, so not an option for you.

Cloud Services are probably what you want. This is the core PaaS offering on Windows Azure. It will let you run pretty much whatever you want, as long as it runs on Windows. It supports TCP endpoints. There's are pretty nice tools for Node.js. There are two flavors of running Node in a Cloud Service: a web role or a worker role. Web roles use IIS and run Node.js behind it. That won't work for your raw TCP connections, so you'll want to use a worker role. A worker role will simply launch your Node app and leave it running forever.

Virtual Machines would work fine too, but they don't provide much value compared to Cloud Services. In a cloud service, you can spin up new VMs on demand, a load balancer sits in front of your app distributing traffic, your app will get restarted if it ever crashes, you can have your VM automatically patched without downtime, etc. Unless you can't run in a cloud service for some reason, you rarely want to use a raw VM.

tl;dr You want a worker role in a cloud service. :-)

Otros consejos

Windows Azure does have a toolkit for Social Games on Github, this might help you in you in your endeavours, not sure it supports Node.js mind you, there should be some takeaways to help you.

https://github.com/WindowsAzure-Toolkits/wa-toolkit-games

This blog post gives a good breakdown on where to run what and use cases for each.

http://blogs.msdn.com/b/silverlining/archive/2012/06/27/windows-azure-websites-web-roles-and-vms-when-to-use-which.aspx

It really depends on your application, what backend does it have, number of users, performance, latency etc...

A word of warning though, running Node.js on Windows is mostly fine but there are several libraries that will not work. Don't know if it's a hard requirement that you use Azure but there are other Node hosting solutions out there.

Nodejitsu
Nodester

Those are only two, there are more out there.

Disclaimer: I'm building a Node.js hosting solution, modulus.io.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top