RDMS In The Loud: Oracle Database On AWS

Transcription

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWSRDBMS in the Cloud: Oracle Database on AWSJean-Pierre Le Goaller, Carlos Conde, and Shakil LanghaOctober 2013(Please consult http://aws.amazon.com/whitepapers/ for the latest version of this paper)Page 1 of 33October 2013

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWSOctober 2013Table of ContentsAbstract . 3Oracle Database Solutions on AWS . 3Oracle Database on Amazon RDS . 3Oracle Database on Amazon EC2 . 3Other Database Scenarios. 3Choosing between Amazon RDS and Amazon EC2 for an Oracle Database . 4Oracle Database Feature Comparison between Amazon RDS and Amazon EC2 . 5Oracle Licensing and Support . 6Starting an Oracle Database Instance on AWS . 6Starting an Oracle Database Instance on Amazon RDS . 6Starting an Oracle Database instance in Amazon EC2 . 7Performance Management . 8Instance Sizing . 8Disk I/O Management in Amazon RDS. 9Disk I/O Management in Amazon EC2 . 10Caching . 13Database Replicas . 14High Availability . 15High Availability Features in AWS . 15High Availability Features in Oracle . 16High Availability Architecture in Amazon RDS . 17High Availability Architecture in Amazon EC2 . 19Backup and Restore . 22Backup and Restore on Amazon RDS . 22Backup and Restore in Amazon EC2 . 23Monitoring and Management. 24Amazon RDS Monitoring . 24Monitoring and Management in Amazon EC2. 26Security . 27Amazon VPC . 27Oracle Security in Amazon RDS . 28Oracle Security in Amazon EC2 . 28AWS for On-Premise Oracle Environments . 29Backing up On-Premise Oracle Databases in AWS . 29Disaster Recovery on AWS for On-Premise Oracle Databases . 30Migrating your On-Premise Oracle Database to AWS . 31Managing Cost . 32Reducing Cost with Reserved Instances . 32Other Options to Reduce Costs. 32Conclusion . 32Further Reading . 33Page 2 of 33

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWSOctober 2013AbstractAmazon Web Services (AWS) is a flexible, cost-effective, easy-to-use cloud computing platform. Relational databasemanagement systems, or RDBMS, are widely deployed within the Amazon cloud. In this whitepaper, we help youunderstand how to deploy Oracle Database on AWS. You can run Oracle Database on Relational Database Service(Amazon RDS) or Amazon Elastic Compute Cloud (EC2).The goal of this whitepaper is to explain how you can run Oracle Database on both Amazon RDS and Amazon EC2, and togive you an understanding of the advantages of each approach. We review in detail how to provision and monitor yourOracle database, and how to manage scalability, performance, backup and recovery, high availability and security inboth Amazon RDS and Amazon EC2. We also describe how you can set up a Disaster Recovery solution between an onpremise Oracle environment and AWS, and how you can perform a migration of your existing Oracle database to AWS.After reading this whitepaper you will be able to make an educated decision and choose the solution that best fits yourneeds.Oracle Database Solutions on AWSThere are two ways to run an Oracle database on AWS. One way is to use Amazon Relational Database Service (AmazonRDS). Another way is to deploy the database on Amazon Elastic Compute Cloud (EC2). Alternatively, there are other AWSsolutions that you could use for your database needs.Oracle Database on Amazon RDSAmazon RDS is a web service that makes it easier to set up, operate, and scale a relational database in the cloud.Amazon RDS automates installation, disk provisioning and management, patching, minor version upgrades, failedinstance replacement, as well as backup and recovery of your Oracle database. Amazon RDS also offers automatedMulti-AZ (Availability Zone) synchronous replication, allowing you to set up a highly available environment fullymanaged by AWS. If you want Amazon to handle the day-to-day management of your Oracle database, Amazon RDS isthe preferred way. This enables you to focus on higher-level tasks, such as schema optimization, query tuning, andapplication development. For more information about Amazon RDS, see http://aws.amazon.com/documentation/rds/.Oracle Database on Amazon EC2Amazon EC2 is a web service that provides resizable computing capacity in the cloud. When deploying your Oracledatabase on Amazon EC2, you have full control over the operating system, database installation, and configuration. Youalso have full control over your database administration, including backups and recovery, patching of the operatingsystem and the database, tuning of the operating system and database parameters, security management, andconfiguration of high availability or replication. In terms of database administration, using Amazon EC2 is similar torunning an Oracle database in-house. With Amazon EC2, you can quickly provision and configure instances and storage,you can scale your environment vertically (by changing the size of your instances) or horizontally (by adding moreinstances), and you can provision your databases in AWS regions across the world to provide low latency to your endusers worldwide. Running your own relational database on Amazon EC2 is the ideal scenario if you require a maximumlevel of control and configurability. For more information about Amazon EC2, seehttp://aws.amazon.com/documentation/ec2/.Other Database ScenariosAlthough running your own Oracle database on Amazon EC2 or Amazon RDS is a great solution for many users, there area number of scenarios where other AWS solutions might be a better choice.Page 3 of 33

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWSOctober 2013ScenarioDescriptionWeb ScalabilityIf your application needs to store huge quantities of data with a high throughput, you mayfind NoSQL databases to be more appropriate for your needs than relational databases.While NoSQL databases are not relational and not ACID compliant, they are typically moreadept at storing and retrieving large amount of data with high performance. Also, NoSQLdatabases are significantly easier to manage. Many AWS customers run NoSQL databases inAmazon EC2, including Cassandra, MongoDB, Redis, CouchDB, and HBase. If you do not wantto manage your NoSQL database, Amazon DynamoDB is a fast, fully-managed AWS NoSQLdatabase that provides predictable performance and seamless scalability. All data items arestored on solid state drives (SSDs) and are automatically replicated across multiple AvailabilityZones (within a region) to provide built-in high availability and data durability. For moreinformation about DynamoDB, see http://aws.amazon.com/dynamodb.Data WarehousingWhile you can use Oracle Database for data warehousing purposes, an alternative is AmazonRedshift. Amazon Redshift is a fast, fully managed, petabyte-scale data warehouse servicethat makes it simple and cost-effective to efficiently analyze all your data using your existingbusiness intelligence tools. It is optimized for datasets ranging from a few hundred gigabytesto a petabyte or more and costs less than 1,000 per terabyte per year. For more informationabout Amazon Redshift, see http://aws.amazon.com/redshift.Storage of NumerousBinary Large Objects(Blobs)While the Oracle databases support blobs storage and management, you may find AmazonSimple Storage Service (Amazon S3) to be a better and simpler choice for BLOB storage if yourapplication makes heavy use of these objects (video, audio, images, and so on). Many AWScustomers have found it useful to store blob-style data in Amazon S3 while using a NoSQLdatabase such as DynamoDB to manage blob metadata. For more information about AmazonS3, see http://aws.amazon.com/s3.Choosing between Amazon RDS and Amazon EC2 for an Oracle DatabaseFor an Oracle database, both Amazon RDS and Amazon EC2 have advantages. Amazon RDS is easier to set up, manageand maintain than running Oracle in Amazon EC2 and lets you focus on other tasks rather than the day-to-dayadministration of Oracle. Alternatively, running Oracle in Amazon EC2 gives you more control, flexibility and choice.Depending on your application and your requirements, one might be preferable over the other.Amazon RDS might be a better choice for you if: You want to focus on your business and applications, and outsource the following tasks to Amazon: provisioningof the database, management of backup and recovery, management of security patches, upgrades of minorOracle versions and storage management. You need a highly available database solution and want to take advantage of the push-button, synchronousMulti-AZ replication offered by Amazon RDS, without having to manually setup and maintain a standbydatabase. You do not want to manage backups and, most importantly, point-in-time recoveries of your database.Page 4 of 33

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWS October 2013You would rather focus on high-level tasks, such as performance tuning and schema optimization, than on thedaily administration of the database.Amazon EC2 might be a better choice for you if: You need full control over the database, including access to the operating system. You have experienced database administrators that will be able to manage the database. Your database size exceeds the current maximum database size in Amazon RDS (3TB at the time of this writing). You need to use Oracle features or options not currently supported by Amazon RDS. You want to setup a disaster recovery solution between several AWS regions, or between your on-premiseenvironment and AWS.Oracle Database Feature Comparison between Amazon RDS and Amazon EC2The capabilities of Amazon RDS for an Oracle database are constantly improving. However, there are a few OracleDatabase features and options that are currently not supported by Amazon RDS. Here is a list of Oracle Databasefeatures that are not directly supported by Amazon RDS, but where Amazon RDS provides equivalent functionality: Oracle Data Guard and Oracle Active Data Guard allow you to create standby databases. Amazon RDS providessimilar functionality when run in Multi-AZ mode. Oracle Enterprise Manager (OEM) Grid Control allows you to manage multiple Oracle database and applicationservers. While Amazon RDS does not support Grid Control, you can manage your Amazon RDS databasesindividually with OEM Database Control. Automated Storage Management (ASM) simplifies the management of Oracle data files, control files and logfiles. It is however unnecessary in Amazon RDS since Amazon RDS manages all the Oracle files for you. Streams can be configured to propagate database changes within and between Oracle databases, and can beused for replication purposes. Instead, you can use Amazon RDS Multi-AZ to create a synchronous standbydatabase. Oracle XML DB provides native XML storage and retrieval capabilities. It is supported in Amazon RDS without theXML DB Protocol Server. Real Application Clusters (RAC) is a cluster database with a shared cache and shared disk architecture. Currently,you cannot run RAC in Amazon EC2 either. Some of the customers that require RAC choose to host theirdatabases outside of AWS while running the rest of their infrastructure in AWS. To do this while providing gooddatabase performance, they host their RAC database at an AWS partner datacenter, which is linked via AWSDirect Connect to the AWS datacenter where the rest of their infrastructure exists. AWS Direct Connect lets youestablish a dedicated network connection between the AWS Direct Connect location and the closest AWSregion. It provides low-latency 1 Gbps and 10 Gbps connections, and you can easily provision multipleconnections if you need more network capacity. For more information about AWS Direct Connect, seehttp://aws.amazon.com/directconnect/.Currently the following Oracle options are not supported in Amazon RDS: Oracle Java support allows you to deploy Java server-side applications in the database. Oracle Locator and Oracle Spatial aid you in managing geographic and location-data in a native type within thedatabase.Page 5 of 33

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWSOctober 2013If you need to use any of these database features and options, Amazon EC2 is currently the best-suited deploymentplatform. This list is subject to change as we add new features to Amazon RDS. To check for recent updates, see theAmazon RDS documentation Guide/Appendix.Oracle.Options.html.Oracle Licensing and SupportBefore running Oracle in AWS, make sure that you have the correct licensing and support for Oracle.Licensing/SupportDescriptionOracle Licensingin Amazon RDSYou can run Amazon RDS for Oracle under two different licensing models: License Included andBring Your Own License (BYOL). In the License Included model, you do not need separately purchased Oracle licensesbecause the Oracle Database software has been licensed by AWS. The license is includedin the Amazon RDS hourly cost. It is important to note however that the License Includedmodel is currently limited to Oracle database Standard Edition One. In the BYOL model, you can use existing Oracle database licenses for your Amazon RDSdeployment, or purchase new licenses directly from Oracle.In the BYOL model, you should follow the licensing rule defined by Oracle, and describedat icensing-070579.pdf. If you decideto use the Multi-AZ mode (see the “High Availability” section for details), you may needextra licenses for the standby database instance. You should review your Oracle SoftwareLicensing Agreement and comply with Oracle’s licensing policies.Oracle Licensingin Amazon EC2Licensing Oracle in Amazon EC2 follows the BYOL model explained in the previous Amazon RDSdescription.Oracle Supportfor AWSOracle fully supports deploying Oracle database on AWS, as described aq-098970.html#support.Starting an Oracle Database Instance on AWSThe way you start an Oracle database instance on AWS depends on your configuration.Starting an Oracle Database Instance on Amazon RDSStarting an Oracle Database instance on Amazon RDS is easy. You can do this by using the AWS Management Console oryou just choose the Oracle engine version that you want to run, and we take care of choosing and configuring theunderlying software. Using the AWS Management Console, you select the RDS tab, click Launch a DB instance, and thenselect the Oracle edition that you wish to use. Figure 1 shows an example

Amazon Web Services – RDBMS in the Cloud: Oracle Database on AWS October 2013 Page 4 of 33 Scenario Description Web Scalability If your application needs to store huge quantities of data with a high throughput,