A Most Simple Cloud Is Amazon RDS for Oracle Right for You? Jeremiah Wilton, Principal Consultant June, 2014
Jeremiah Wilton wilton@pythian.com @oradebug Working with Oracle since 1994 (v.5) Amazon s first DBA 1997 2005 Platform architect Technical leadership and mentoring Focus areas: Sane platform architecture and design Consolidation and license economy Cloud migration and strategy Evidence-driven consolidation method Availability and scalability Recovery, repair and salvage Service-time-oriented performance management 2014 Pythian
Pythian is A flexible 24x7 DBA/SA/architect service Supporting Oracle, EBS, MySQL, SQL Server, Big Data and EIS Dedicated team of top engineers Complete management (or something less) Senior Consultants On-site or remote Senior principal level talent
Pythian is not An offshore outsourcer Our engineers are the hand-picked top 5% working from locations all over the globe A bargain option Commodity managed services providers introduce risk and are less able to provide expert guidance or quickly and efficiently resolve problems.
Why? RDS and EC2 are both ways to host an Oracle Database on Amazon s cloud Wading through the pros and cons of each is somewhat mystifying RDS seems like a really great solution. Is it?
Cloud Computing Professionally managed Instant demand-based deployment API-managed Pay-as-you-go (OpEx not CapEx)
Public Cloud vs. Private Cloud Private = build your own (high CapEx) Public = External service (low CapEx)
Types of Clouds SaaS: Software as a service Gmail, Google Drive, Salesforce CRM, Oracle ERP Cloud PaaS: Platform as a service Google AppEngine, Force.com, Oracle Java Cloud IaaS: Infrastructure as a service Amazon EC2 (Elastic Compute Cloud), Rackspace, Microsoft Azure DaaS: Database as a service Amazon RDS (Relational Database Service)
Amazon Web Services The most mature public cloud (since 2006) Started with web storage (S3) and virtual hosts (EC2) Has expanded to 40+ distinct services Compute Services: EC2, Auto Scaling, Load Balancing, Workspaces Storage/CDN S3, Glacier, EBS, Import/Export, Storage Gateway, CloudFront Database Services: RDS, DynamoDB, SimpleDB, Elasticache, RedShift Analytics EMR, Kinesis, DataPipeline Application Services: AppStream, CloudSearch, Simple Workflow Service (SWF), Simple Queue Service (SQS), Simple Notification Service (SNS), Simple Email Service (SES), Elastic Transcoder Deployment/mgt: Management Console, Identity/Access Management (IAM), CloudWatch, Elastic Beanstalk, CloudTrail, CloudFormation, Data Pipeline, OPSWorks, CloudHSM Networking Services: Route53, Virtual Private Cloud (VPC), Direct Connect Payment Services: Flexible Payment Services (FPS), DevPay Web Traffic Services: Alexa Workforce Services: Mechanical Turk AWS Support Software Marketplace
EC2 vs. RDS EC2: Infrastructure as a Service Provides virtual hosts, where you can install, create and run anything you want, including Oracle databases Allows total control of configuration management RDS: Database as a Service Provides ready-to-use running databases Offloads management and most configuration and management decisions Runs on EC2 infrastructure, but obscures the O/S and filesystem
Amazon s Flagship Product: EC2: The Elastic Compute Cloud US West (Oregon, Bay Area) GovCloud (US) South America (São Paolo) US East (Northern Virginia) EU West (Dublin) APAC (Singapore, Tokyo, Beijing, Sidney)
Instances: The heart of EC2 Virtual hosts managed by API calls to AWS Windows or Linux (use provided images or roll your own) Broad range of sizes / scales (up to 32 vcpu / 244G memory) Attachable and local storage with SSD and provisionable IOPS Snapshot backup of persistent storage Multiple regions with multiple availability zones Virtual Private Cloud, formidable security Monitoring, auto-scaling load balancing Configuration provisioning for whole architectures
Amazon Relational Database Service (RDS) in brief Oracle, MySQL, SQL Server and PostgreSQL databases on demand Under the covers, runs on Amazon EC2 infrastructure Auto-managed (backups, patching and upgrades in a window you specify) Provisionable IOPS, SSD available Broad range of sizes / scales (up to 8 vcpu/ 68G RAM) Limited range of versions (for Oracle, 11.2.0.2.3 11.2.0.4.1) Availability features: Multi-zone, auto host replacement Replication (Oracle Golden Gate, MySQL Read Replica, others) Monitoring Virtual Private Cloud and formidable security
Database Licensing on EC2 and RDS License Included; pay as you go RDS only Adds a small additional charge to hourly cost Limited to lower editions of Oracle and SQL Server Oracle Standard Edition One (SE1) Microsoft SQL Server Web, Express & Standard Editions Bring Your Own License Licensed by user, core or socket 2 vcpu = 2 core = 1 Enterprise Edition license 4 vcpu = 1 socket = 1 Standard Edition license
EC2 / RDS Instance Classes RDS instance classes align with EC2 instance classes Some EC2 instance classes are not available for RDS Some instance classes available for other RDS databases are not available for Oracle Some instance classes cannot be licensed for SE/SE1 (too many cores) The Oracle cloud CPU metric needs to be revised for the current generation EC2 instances
Breaking it down Which is right for me? EC2 or RDS
EC2 / RDS Instance Classes
Ease of Use RDS Pre-configured databases Little Oracle knowledge required EC2 You have to configure everything yourself More Oracle and systems knowledge needed Totally managed You design, implement and manage yourself: Backups Monitoring Upgrades / patching No SYSDBA, O/S or filesystem privileges Full access and privileges to database and O/S Load via Import, Datapump or DB Link only Graceful migration requires a logical replication tool (Golden Gate / DBVisit for Oracle) Access via DB native protocol only Log and trace file access via API only Backup and restore by snapshots Filesystem-only storage managed by Amazon Service is DB only Load any way you like, including RMAN Graceful migration using standard methods (physical standby switchover for Oracle) Access via and protocol you set up Normal filesystem log / tracefile access Normal RMAN backup/restore (S3) Filesystem or ASM storage Able to run both application and DB on same host
Flexibility RDS License-Included Model (SE1 only) Many unavailable features Limited parameter settings Cannot be stopped to save money Limited to Oracle 11.2.0.2.3 11.2.0.4.1 (today) Limited character sets (http://amzn.to/1jjlbuf) EC2 Bring or purchase your own license Almost all features available (no RAC) Set any parameter you like Stop the instance to stop paying for compute time Run any version of Oracle you can get working All character sets available Security RDS Theoretically accessible by Amazon DBAs? EC2 VMs and contents not accessible by Amazon engineers
Performance RDS Instance scaling requires an outage Does not support the largest instance sizes Multi-AZ deployments are synchronous, latent Lacks hugepages (uses memory_target) Availability RDS Easy multi-availability-zone deployments Standby / Dataguard not supported Fewer replication options (Golden Gate, SQL*Net only) Backups (non-rman snapshot) impact availability Multi-AZ secondary cannot serve requests Multi-AZ deployment has potential performance impact (sync) Cross-region DR limited to Golden Gate EC2 Use standby switchover for instance scaling Scale up to large instance sizes (32 vcpus) Async log transport to standby avoids latency Hugepages can be used on HVM instances EC2 No automatic redundancy across availability zones Standby / Dataguard fully supported All replication options (Streams, GG, log transport, etc.) Standard RMAN backups do not cause an outage Active DG, Read-only / snapshot standby supported Log transport can be async Standby / Dataguard can be cross-region
Showstoppers RDS Application requires SYSDBA or other higher privilege Database is too large to use import as a migration method or migration using logical replication is not an option Daily backup outages and other maintenance outages not acceptable Application requires a feature or parameter setting not supported by RDS/Oracle Application requires a DB version or character set not supported by RDS Security requirements exclude Amazon personnel Scale will require large memory or many CPUs Scale will require HA / DR with low latency Multi-region DR required, and Golden Gate not an option Real distributed / replicated / tiered environment required EC2 Insufficient database expertise, but need a relational database You cannot afford an Oracle SE1 license ($5800 list), and can only afford to pay as you go
Conclusions RDS for Oracle is a viable solution if: You need to pay license costs as you go You just need a basic database with very few bells and whistles You want to reduce management and maintenance customization and tasks Oracle on EC2 is a better solution if: You need serious HA / DR / Scale You need to use advanced Oracle features You need admin control of the system for any reason You need to migrate using a backup or standby (DB size) You will only use the system occasionally (Stoppable)
Questions wilton@pythian.com @oradebug