|How to setup cloud hosting with RakNet
Cloud hosting through Rackspace
RakNet was tested with two cloud hosting providers: Amazon AWS and Rackspace Cloud. I could not get Amazon AWS to work with incoming UDP connections. Furthermore, peformance on loopback using the BigPacketTest project was very bad. Rackspace did not have these problems and the cost for their lowest-end Linux servers is low. I also provide a C++ interface to Rackspace allowing you to programatically control your servers, so it's a good starting point.
The first step is to create a server, using Hosting / Cloud Servers / Add Server. This will bring up a menu asking if you want Linux or Windows, and how much RAM. The low-end Linux servers are cheaper than the Windows servers. RakNet should work with either. Cloud server and NAT punchthrough server both take minimal RAM. The Autopatcher takes a lot of RAM however, I recommend four gigabytes to serve 256 concurrent users or eight gigabytes to serve 512.
Once your server has been created, you will get an email telling you the password and login IP.
For Windows 7, enter the username, password, and login IP using Remote Desktop, found under Start / Accessories.
Setting up the server
Once logged in, server setup is the same as any computer.
Once your server is setup, open the RakNet solution and compile normally. You now have a working server, using the IP address you connected to using Remote Desktop.
Backing up and scaling the server
Once you have the server setup the way you want it, you can create an image of the server, which is essentially a harddrive backup. This is important for scalability, because you can create a new instance of the server with the same configuration as your image.
When you are not running your server, be sure to delete the instance and leave the much cheaper image. Unlike Amazon AWS which only charges for usage, Rackspace charges as long as your server exists at all. To start your server again, or to start multiple instances of the same server, use the Cloud Servers menu under My Server Images.