Even though AppEngine price changes were announced back in May at Google IO, yesterday Google Team send an email about “Google AppEngine Leaving Preview” and the new pricing model will start taking effect (something that most appengine developers hated but anyway).
So, these are some tips you can do to control/lower your pricing based on our observations here at BugSense. Keep in mind that different applications have different needs. We are having more than 30k requests per hour (all day long) with peak times for six hours where we get 40k to 50k requests and we had at least 20 instances running. So, after a little tuning, we are having 7 to 8 instances with no significant delays. Yeap, less than half the instances thus less than half the costs.
We are not going to dive into code changes at this post (as we are still gathering data about our code changes) but we’ll explore how little changes on the management of instances can make a huge difference.
These are the two things you should change:
- Max Idle Instances. Go to your Dashboard, select Instances and 24 hrs and find the minimum number of instances you are using.Place these as your “Max Idle Instances”. I know that a lot of people suggest putting the average number of instances per day but if you try both approaches it seems that killing unwanted instances and starting them only when you need them is a lot better. Of course (as I’ve said previously), it depends on the application.
- Minimum Pending Latency. Place it between 60ms and 100. This means that requests that will take more than that time, will trigger a new instance creation. Again this will vary a lot for your application.
- Now, test your new configuration when your application is under full stress and see the minimum and maximum instances that are online. Based on these results, you can optimize further your Max Idle Instances and your Minimum Pending Latency.
Have you find a different/better way? We’d love to hear it!
Are you an Android/iOS developer? We’d love to meet you!