Presentation is loading. Please wait.

Presentation is loading. Please wait.

Setting up PostgreSQL for Production in AWS

Similar presentations


Presentation on theme: "Setting up PostgreSQL for Production in AWS"— Presentation transcript:

1 Setting up PostgreSQL for Production in AWS
Download Labs: Scott Mead Database Engineer – Amazon RDS PGConf NY - April, 2019

2 Sr. Database Engineer, Postgres Engines
Proctors Udayasimha Theepireddy Sridhar Ranganathan DB Cloud Architect Sr. Product Manager RDS Postgres Scott Mead Sr. Database Engineer, Postgres Engines

3 Objectives AWS RDS Postgres offerings Best Practices
Database configuration Deployment

4 Sign In to your Account If you don’t have one: aws.amazon.com/free

5 What is Amazon RDS? Relational Database Service
AWS provides infrastructure Customer builds the application

6 RDS Postgres Managed PostgreSQL AWS manages the infrastructure
High Availability – Automated Failover Automated Backups Multi Datacenter (Availability Zone) PostgreSQL running in an AWS Managed EC2 machine

7 Aurora Postgres Same Benefits as RDS PostgreSQL
Amazon Aurora features a distributed, fault-tolerant, self-healing storage system that auto-scales up to 64TB per database instance. It delivers high performance and availability with up to 15 low-latency read replicas, point-in-time recovery, continuous backup to Amazon S3, and replication across three Availability Zones (AZs).

8 Aurora Postgres Data is replicated six times across three Availability Zones Continuous backup to Amazon S3 (built for 11 9s durability) Continuous monitoring of nodes and disks for repair Storage volume automatically grows up to 64 TB AZ 1 AZ 2 AZ 3 Amazon S3 R/W Database Node R/O Database Node Storage Monitoring Storage Node Storage Node Storage Node Storage Node Storage Node Storage Node

9 What is Amazon RDS? Relational Database Service
AWS provides infrastructure Customer builds the application

10 AWS Shared Responsibility Model

11 Managed PostgreSQL on RDS or Aurora
Scaling High availability Database backups DB s/w patches DB s/w installs OS patches OS installation Server maintenance Rack and stack DB optimization Power, HVAC, net you

12 DBA responsibilities Security Provisioning Resiliency When to scale
Data Model Indexing VACUUM

13 DBA responsibilities Security Provisioning Resiliency When to scale
Data Model Indexing VACUUM

14 Labs Provision RDS Postgres Provision Management host (EC2)
Connectivity Monitoring H/A Backup / Recovery De-Provision RDS Postgres De-Provision EC2

15 An Elephant is still an Elephant
Running on server (EC2) Storage EBS (RDS Postgres) Aurora Storage Memory CPU

16 Get Started!

17 VPC Amazon VPC – Virtual Private Cloud Your network in the cloud
Subnets, Routers, Route Tables Same rules apply as physical networks

18

19 VPC – Ingress & Egress Public / Private subnets
Most databases fall into private subnets Use a management / bastion host to connect Customers can make VPN connections to their VPCs for simplified access

20 Security Groups Act as a firewall in the cloud
Allow for specific control of network access Host -> Host Host -> Internet Internet -> Host Can be added and updated dynamically Be careful with rules

21 Security Groups

22 Monitoring CloudWatch Enhanced Monitoring
Graphical interface for live and historical metrics CPU / IO / Network / Disk Metrics are available to download Enhanced Monitoring ‘top’ in a browser

23 Monitoring – Performance Insights
Drill-down interface for interacting with Postgres runtime stats Live stats picked up every second Ties SQL Statements and wait_events together Allows for simplified trend monitoring Thursday 4:20 NY Ballroom West

24

25 Configuration RDS Postgres instances have a parameter group
Some options are dynamic, some are not (as in standard postgres) By default, instances get the ‘default’ parameter group This group cannot be modified Create a new parameter group, change configuration there Assign the parameter group to your instance This requires downtime, for production, always create a parameter group for your instance before going live

26 Monitoring - Logs RDS presents the database logs via the web interface
Many customers periodically download logs or archive them to S3 CLI / API job Export logs to AWS CloudWatch to enable alarms Tools like pgBadger provide in-depth reporting

27 Multi A-Z A region is a cluster of datacenters located in a geographical location Each region is made up of a logical group of datacenters known as an Availability one Multi A-Z (Availability Zone) in RDS provides resources in more than one Availability Zone for resiliency

28 Multi A-Z Multi AZ in RDS uses synchronous, storaged-based replication
Zero Data Loss Fast failover to another Availability Zone Standby host is not addressable directly until after failover Use the ‘endpoint’ to automatically update the connection

29 Read Replicas Users can add Read Replicas, leveraging standard Postgres replication Modify an instance Add a ‘Read Replica’ Replicas can be connected to and read from Replicas can be promoted to writer

30 Learn more.. aws.amazon.com/rds aws.amazon.com/rds/aurora

31 Thank you!


Download ppt "Setting up PostgreSQL for Production in AWS"

Similar presentations


Ads by Google