Newsletters




Accessing PostgreSQL from Amazon RDS

<< back Page 3 of 3

While Multi-AZ makes failover much easier to deal with, there is still no support for asynchronous slaves as there is for MySQL and Oracle. This means off-site or read-only slaves are not yet available. Fortunately, regional outages aren’t common for Amazon, but if off-site slaves are a requirement for your business, PostgreSQL RDS is not yet ready.

Nearly all the contrib modules that PostgreSQL core comes with are supported. And PostGIS has enough demand that support for it has been built in, as well. One of PostgreSQL’s greatest strengths is its third-party module support, which has been growing even more rapidly with 9.1’s extension feature. Amazon’s built in support for third-party modules is currently limited and, unless the third-party module you’re using is simply stand-alone SQL statements, it cannot be installed to an RDS instance.

In addition, the performance of EC2 can be rather unpredictable. You’re sharing your hardware with unknown neighbors and if they decide to ramp up their use, it can have an impact on your system. With provisioned IOPS a lot of this can be mitigated, but you have to pay the extra costs to have those guarantees. And, increasing the IOPS value increases the minimum storage recommendations for best performance.

Cost Comparison

Comparing the costs of running an EC2 instance to an RDS instance should be done on a case-by-case basis. Comparing just the general EC2 costs to RDS you’ll definitely see a higher cost with RDS. But when you start adding on the features to EC2 that most users will need for a well performing database (more memory, IOPS, SSD storage), the costs are very close in the end. At that point, you have to start figuring in the costs of maintaining the OS as well as the database. RDS clearly has its advantages here.

Limitations

Currently the smallest database you can make is 5GB and the largest is 3072GB. Some of the options, such as IOPS, also have a minimum recommended size for optimal performance. IOPS is given in increments of 1000 and the smallest database size for that is 100GB. So if performance is a consideration, then the cost of the minimum requirements of that performance must also be planned out.

General Recommendations

RDS by far makes the most sense for a development environment. Spinning up entire environments for a database that will only be around for a day or so can be a lot of work. With an available API, RDS can make this almost effortless.

And just like EC2, RDS is a great platform for startups that are unsure of their future growth and don’t have the capital for bare metal systems. RDS is also an ideal platform for applications that have predictable, heavy spikes of database traffic but an overall average of low use. The system can be scaled up and down as needed and potentially save costs versus having to buy hardware for the rare, worst-case scenario.

RDS is a Great Platform for Getting Started with PostgreSQL

The performance of RDS (not just PostgreSQL) has been impressive. Cloud-based services have been notorious for poorer-than-average performance and seeing decent benchmark returns shows this platform has promise. Also, automated failover that is transparent to the application front end is a popular request for database systems, and Amazon has been able to leverage its capacity to make this built-in feature. So far, the biggest disadvantages are a lack of third-party modules and asynchronous replication. These are “must haves” for getting larger database customers onto PostgreSQL RDS. In addition, the lack of some log customization features can make running RDS in critical enterprise environments questionable, because detailed monitoring can be challenging. RDS is a great platform for those getting started with PostgreSQL and, in time, it is hoped that the feature set will grow to match the impressive performance.


About the author

Keith Fiske is a Database Administrator at OmniTI,  a full service provider, from sustainable architectures that can support hundreds of millions of users, to web application development—winning multiple Webby awards—and user interface design. 

<< back Page 3 of 3

Sponsors