I wanted to pass along a lesson that we learned deploying a system to the cloud – in this case Amazon Web Services – as it can be a signficant expense surprise if you’re not aware of it.
We had deployed an Amazon RDS database instance in a VPC all its own. We wanted to wall it off a bit and it seemed like the right thing to do. As we deployed the application to the various application servers and web sites, we were seeing a lot of data flow to the instance, and it led to some questions working with the AWS support and infrastructure team. What to them seemed very clear, to us was a surprise.
Specifically, if the application lived in a different VPC (or in the “General Population”) and had to traverse into the VPC holding the database, there are bandwidth charges for the movement of data. As we were watching the database server chug away at the workload, we began to sweat.
The solution? Pretty simple in this case. We AMI’d the box (imaged it), brought up the image in the same VPC as the database instance. and updated DNS and other things that were pointing to the web server in question.
The result is $0 for bandwidth (that’s right, zero). In addition, we were able to really fine-tune access privileges for the application server – and were able to isolate this from the other workloads we run.
This last bit isn’t really anything new, but the move to the other VPC which was very locked down to the database instance alone, offered the excuse to review and clean security.
I think the moral to the story is that you need to make sure you’re getting all of the information on how the architecture is supposed to be used – and how it’s optimized. If availability zones matter, be sure you plan those into the solution environment. Same for VPCs and same for other location-specific information. Things like the geo-location can matter as well (don’t put your database server in Washington State and your application server in Virginia) as you can drive up costs as well.
Be sure you review your architecture to make sure it’s paying attention to these more subtle rules and guidelines. You will avoid surprises on the bill and you can also impact performance of your application overall.