47
Postgres Plus Cloud Database Getting Started Guide December 15, 2011

Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database

Getting Started Guide

December 15, 2011

Page 2: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

2

Postgres Plus Cloud Database Guide, Version 1.0 by EnterpriseDB Corporation

Copyright © 2011 EnterpriseDB Corporation. All rights reserved.

EnterpriseDB Corporation, 34 Crosby Drive Suite 100, Bedford, MA 01730, USA

T +1 781 357 3390 F +1 978 589 5701 E [email protected] www.enterprisedb.com

Page 3: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

3

Table of Contents

1 Introduction ......................................................................................................................4

1.1 Typographical Conventions Used in this Guide ....................................................6

2 Postgres Plus Cloud Database - Overview .....................................................................7

2.1 The Benefits of using Postgres Plus Cloud Database............................................7

2.2 Architecture Overview ............................................................................................9

2.3 Cloud Database Hosting Options..........................................................................12

2.3.1 Public Cloud Environment................................................................................12

2.3.2 Private Cloud Environment...............................................................................14

2.3.3 Traditional Hardware On-Site Installation.......................................................15

3 Connecting to Cloud Database in a Public Cloud ........................................................16

3.1 Registering a New User on a Public or Private Cloud ........................................17

4 Using The Cloud Database Console .............................................................................21

4.1 The Dashboard Tab................................................................................................21

4.2 The Clusters Tab ....................................................................................................22

4.2.1 The Details panel ...............................................................................................25

4.2.2 The Parameters Panel ........................................................................................26

4.2.3 The Monitoring Panel........................................................................................28

4.2.4 The Events Panel ...............................................................................................29

4.3 The Backups Tab ...................................................................................................30

4.4 The User Tab..........................................................................................................31

5 Creating a New Server Cluster ......................................................................................32

6 Connecting an Application ............................................................................................36

6.1 Using SSH to Access a Server ..............................................................................37

7 Managing Backups and Recovery.................................................................................38

8 Automatic Failover.........................................................................................................41

9 Adding Replica Nodes ...................................................................................................42

10 Manual/Automatic Scaling ............................................................................................45

10.1 Adjusting the Automatic Scaling Thresholds ......................................................45

10.2 Manually Scaling Up - Adding Memory and Replicas to a Cluster ...................46

Page 4: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

4

1 Introduction

Postgres Plus Cloud Database automatically provisions PostgreSQL or Postgres Plus Advanced Server databases in single instances, high-availability clusters, or application

development sandboxes across public and private clouds or traditional data center hardware deployments. Cloud Database allows service providers and organizations to offer elastic and highly scalable database-as-a-service (DaaS) environments while freeing

DBAs and application developers from the rigors of setting up and administering modern and robust database environments.

In minutes, Cloud Database configures new Postgres database clusters with:

Rotating user-scheduled backups

Streaming replication

Self-healing high-availability

Automatic fail-over

Load balancing

In addition, Cloud Database provides automatic scaling of CPU resources, storage

resources, and cluster replicas when a database cluster reaches user-defined thresholds,

providing around-the-clock responsiveness to unpredictable load demands on your database infrastructure.

This document will demonstrate how to use the Cloud Database interface successfully in your cloud-based database management activities:

Postgres Plus Cloud Database Overview - Chapter 2 provides information about Cloud Database functionality, hosting options and architecture.

Connecting to Cloud Database - Chapter 3 walks you through the process of registering a new user, and logging in to Cloud Database.

Using the Cloud Database Console - Chapter 4 introduces you to the Cloud Database graphical user interface, and provides an overview of the functionality offered by the user interface controls.

Creating a New Server Cluster - Chapter 5 demonstrates how to create a server cluster.

Connecting an Application - Chapter 6 describes how to locate connection information for your server nodes, so your client applications can access your cluster.

Page 5: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

5

Managing Backups and Recovery - Chapter 7 describes how to take a backup of the server, and how to use a backup to recover a server cluster or create a developer sandbox from production data.

Automatic Failover - Chapter 8 discusses Postgres Plus Cloud Database failover functionality.

Adding Replica Nodes - Chapter 9 walks you through the process of manually scaling up your database cluster by adding replica nodes.

Manual/Automatic Scaling - Chapter 10 discusses how to manually add storage space and replicas to an existing cluster, and how to automatically add storage and additional replicas when system resources run low.

This document provides an introduction to Postgres Plus Cloud Database and is written to acquaint you with the process of configuring and using the product's core features; it is not a comprehensive guide to using Postgres Plus database products. Depending on your

operating environment (public cloud, private cloud, or traditional hardware deployment), there may be minor differences in Cloud Database features and functions.

This document uses Postgres to mean either the PostgreSQL or Postgres Plus Advanced Server database. For more information about using Postgres Plus products, please visit the EnterpriseDB website at:

http://www.enterprisedb.com/documentation

Page 6: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

6

1.1 Typographical Conventions Used in this Guide

Certain typographical conventions are used in this manual to clarify the meaning and

usage of various commands, statements, programs, examples, etc. This section provides a summary of these conventions.

In the following descriptions a term refers to any word or group of words that are language keywords, user-supplied values, literals, etc. A term’s exact meaning depends upon the context in which it is used.

Italic font introduces a new term, typically, in the sentence that defines it for the first time.

Fixed-width (mono-spaced) font is used for terms that must be given

literally such as SQL commands, specific table and column names used in the

examples, programming language keywords, etc. For example, SELECT * FROM emp;

Italic fixed-width font is used for terms for which the user must

substitute values in actual usage. For example, DELETE FROM table_name;

A vertical pipe | denotes a choice between the terms on either side of the pipe. A vertical pipe is used to separate two or more alternative terms within square brackets (optional choices) or braces (one mandatory choice).

Square brackets [ ] denote that one or none of the enclosed term(s) may be

substituted. For example, [ a | b ], means choose one of “a” or “b” or neither of the two.

Braces {} denote that exactly one of the enclosed alternatives must be specified.

For example, { a | b }, means exactly one of “a” or “b” must be specified.

Ellipses ... denote that the proceeding term may be repeated. For example, [ a |

b ] ... means that you may have the sequence, “b a a b a”.

Page 7: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

7

2 Postgres Plus Cloud Database - Overview

Postgres Plus Cloud Database simplifies the process of provisioning robust Postgres deployments, while taking advantage of the benefits of cloud computing. When used with Postgres Plus Advanced Server, Cloud Database also provides an Oracle-compatible DaaS, offering dramatic cost savings and competitive advantages.

2.1 The Benefits of using Postgres Plus Cloud Database

Postgres Plus Cloud Database provides the following functionality in public clouds, private clouds and for in-house data center installations:

PostgreSQL database. Cloud Database provides enterprise-class database

features and performance, using the mature and proven platforms of open source community PostgreSQL or EnterpriseDB's Postgres Plus Advanced Server.

Transparent/elastic scalability. Manually or automatically, Cloud Database allows you to add storage capacity, increase compute power, and scale out to support more users online without interrupting business operations.

Automatic Load Balancing. Cloud Database implements automatic load balancing, increasing overall performance by distributing read performance across multiple nodes.

Automatic Failover. Cloud Database supports high-availability replica servers, in the event of primary database failure to ensure continued operations.

Self-Healing. Cloud Database automatically replaces a downed read-only replica

or promotes a read-only replica to be the read-write master, preserving the integrity and performance of the cluster.

Web-based interface. Cloud Database implements point-and-click cluster management from start to finish using your favorite web browsers.

Online backup and point-in-time recovery. Cloud Database provides full protection of data in the cloud, and protects against data mishaps.

Database Cloning. Cloud Database allows you to quickly and easily create developer 'sandboxes' based on real production data.

Page 8: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

8

Supports public cloud, private cloud, and in-house data center installations. Cloud Database allows you select the environment that is most cost effective and convenient for your organization.

Cost-effective Oracle Compatibility. Using an Oracle-compatible Postgres database is a cost-effective way to move Oracle applications to a public or private cloud.

Page 9: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

9

2.2 Architecture Overview

The Postgres Plus Cloud Database management console is designed to help you easily create and manage high-availability database clusters from a web browser.

Traditionally, the expression cluster refers to a single instance of Postgres managing multiple databases; a Cloud Database database server cluster is a

collection of high-availability Postgres server instances that reside in a cloud or on a traditional network.

When you create a new cluster (a group of replicated database servers), Postgres Plus

Cloud Database initializes one or more Postgres instances (virtual machines) according to

your specifications. Cloud Database uses Postgres streaming replication to synchronize replicas in the cluster, and pgPool-II to implement load balancing among all active instances.

The primary node of the cluster contains a host operating system (CentOS 5.6) with a running instance of Postgres, along with a load balancer. When load balancing is utilized, database modifications are automatically routed to the primary node; any

modifications to the primary node are subsequently propagated to each replica using Postgres streaming replication.

Figure 2.1 - Cloud Database performs automatic load balancing.

Page 10: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

10

Cloud Database installs Postgres on each replica node in a read-only role that automatically duplicates all data found on the master node, and all changes made to that

data (see Figure 2.1). Replicas provide balanced user support as needed - if any instance in the cluster goes offline, the cluster's load is re-balanced among the remaining servers while the instance is automatically replaced (see Figure 2.2).

Figure 2.2 - Cloud Database provides automatic failover and load balancing .

In the event of a failure of the primary node, a secondary node can seamlessly assume the role of primary node without a loss of processing capabilities. While the secondary node is standing by, it is a read-only resource, allowing the secondary server's CPU to be

utilized for load balancing of client queries without a risk of compromising data integrity (see Figure 2.2).

Postgres Plus Cloud Database automatically archives data at regular intervals; you can specify a convenient backup window and how many backups to retain when creating a

database cluster. Cloud Database also offers backup on demand - simply click the

Backup icon to save a point-in-time copy of the instance. Automatic backups are retained according to your specifications; on-demand backups are retained until you

delete them. Each backup is a complete copy of the database cluster. You can use a

Page 11: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

11

backup to restore a cluster, or clone an existing cluster by restoring a backup into a new cluster.

Postgres Plus Cloud Database makes it easy to scale a database cluster. To increase the

capacity, performance or reliability of a cluster, you can add replicas to the cluster, or increase the amount of storage available to each node within the cluster (or both). You can also change the characteristics of the virtual hardware by creating a new cluster (with a different server class) and restoring a point-in-time backup into that cluster.

Page 12: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

12

2.3 Cloud Database Hosting Options

You can use Postgres Plus Cloud Database on an Amazon EC2 public cloud, a

Eucalyptus private cloud or traditional hardware installation. Please Note: the Cloud Database Private Beta release is available in a public cloud only.

2.3.1 Public Cloud Environment

A public cloud (shown in Figure 2.3) is a collection of virtual machines hosted by a paid

provider such as Amazon. The virtual machine runs a separate copy of an operating system and an installation of Postgres.

Figure 2.3 - Using Cloud Database in a Public Cloud.

Page 13: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

13

Select from different combinations of CPU speed, RAM, and disk space to suit your needs when provisioning a Cloud Database cluster; Postgres Plus Cloud Database makes it easy to scale up to a more capable cluster, or scale down as your requirements change.

You can use the pg_dump utility to migrate an existing Postgres database (schema, data,

and associated database objects) into a public cloud. The pg_dump utility creates a complete backup of your data in the form of a single file that contains the commands needed to create and populate your existing database. After creating the archive with the

pg_dump utility, use EDB-PSQL to replay the SQL commands found in the archive, directing the output into the primary server. For detailed information about using the pg_dump utility, see the PostgreSQL documentation at:

http://www.enterprisedb.com/docs/en/9.0/pg/app-pgdump.html

Page 14: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

14

2.3.2 Private Cloud Environment

A private cloud is similar in architecture to a public cloud, but a private cloud is hosted

on hardware that your organization owns and manages (instead of hardware supplied by a public cloud provider).

Figure 2.4 - Using Cloud Database in a Private Cloud.

A private cloud is a collection of virtual machines (see Figure 2.4); like a public cloud, you can adjust the resources assigned to each server and add new virtual machines (and resources) as required. The underlying private cloud implementation for Postgres Plus Cloud Database is handled by Eucalyptus.

Page 15: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

15

2.3.3 Traditional Hardware On-Site Installation

With a network of one or more physical and virtual servers, you can take advantage of

the easy deployment, setup, replication, backup and fail-over features offered by private and public clouds without virtualization (see Figure 2.5).

Figure 2.5 - Deploying Cloud Database on Traditional Hardware.

Page 16: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

16

3 Connecting to Cloud Database in a Public Cloud

When deployed in a public cloud, configuration and setup of the Postgres Plus Cloud Database is very simple. The first time that you use the Cloud Database, you must:

1. Open a web browser and navigate to the URL provided by EnterpriseDB. The URL will take the form:

http://ec2_public_dns_address:8080/PCSConsole

Where ec2_public_dns_address is the public address of the Cloud Database.

The Cloud Database management console currently supports the following browsers:

Chrome

Firefox

Internet Explorer

Opera

Safari

2. Register the Cloud Database user.

3. Login to the Cloud Database management console.

4. Download your SSH key (for safekeeping).

5. Launch a Postgres Plus database cluster.

After launching a cluster, you can connect to that cluster with a Postgres client application such as EDB-PSQL or Postgres Enterprise Manager. For more information about connecting to the cluster, see Chapter 6, Connecting an Application.

Page 17: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

17

3.1 Registering a New User on a Public or Private Cloud

Navigate to the address provided by EnterpriseDB, to access the Cloud Database

Login/Register dialog shown in Figure 3.1.

Figure 3.1 - The Cloud Database Login dialog.

The first time you connect to Cloud Database, you must Register user information and specify a password; with subsequent visits, you can use the information specified during the initial registration process to simply Login.

To register a new user, navigate to the web address of your server, and click the Register button. The New User Registration dialog opens (shown in Figure 3.2).

Page 18: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

18

Figure 3.2 - The New User Registration dialog.

Enter user information in the User Details box located on the Step 1 tab:

Enter the user's first and last names in the Firstname and Lastname fields.

Enter a password for the user, and confirm the password in the Password and Verify Password fields.

Provide an email address for the user in the Email field; please note that the email address is used as the Login identity for the user.

Use the drop-down listbox in the Cloud Provider field to select the host on which the cloud will reside.

When you've completed Step 1, click Next to access the Step 2 tab.

If you are using Cloud Database hosted on an Amazon EC2 cloud, the Step 2 dialog opens as shown in Figure 3.3.

Page 19: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

19

Figure 3.3 - Registering a user on an Amazon EC2 cloud.

Use the Step 2 dialog to provide connection information for your Amazon EC2 cloud.

Enter your Access Key Id in the Access Key Id field.

Enter your Secret Key in the Secret Key field.

Click the Step 1 tab or the Previous button to review or edit the information on the

prior tab. When you've completed the fields on the New User Registration dialog, click Finish.

After registering your user identity and connection information, you are ready to use the Login/Register dialog (shown in Figure 3.4) to connect to Cloud Database.

Figure 3.4 - The Login/Register dialog.

Page 20: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

20

Enter the registered email address in the Username field, and the associated password in

the Password field, and click Login to connect to the Cloud Database management console (shown in Figure 3.5).

Figure 3.5 - The Dashboard tab of the Cloud Database management console.

Please Note: Immediately after connecting to the Cloud Database management console, you should download your SSH key for safekeeping. The SSH key allows you to establish terminal sessions directly to any server in your cluster to perform tasks manually, or examine (in detail) other aspects of the virtual machine.

To download your SSH key, navigate to the User tab of the Cloud Database management console, and click the Download ssh key button. When the download completes, ensure that the downloaded key is stored in a safe place.

For information about connecting via SSH, see Chapter 6.1, Using SSH to Access a Server.

Page 21: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

21

4 Using The Cloud Database Console

To access the Cloud Database management console, simply open a web browser, and navigate to the address provided by EnterpriseDB. Provide login information, and the

management console opens to the Dashboard tab (shown in Figure 4.1).

4.1 The Dashboard Tab

The Dashboard tab provides an overview of the Cloud Database service status,

resources, useful information links and a quick start Launch DB Instance button.

Figure 4.1 - The Dashboard tab.

Use the Launch DB Instance button located in the Getting Started panel to create a new Postgres cluster.

The Resources panel contains an overview of the activity shown on the other tabs of the Cloud Database management console; click a link to navigate to the listed resource.

Page 22: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

22

For example, click the Events link to navigate to the Clusters tab to review the event logs.

The Service Status panel contains a status report from the cloud provider (ie. Amazon EC2) that will alert you to any regional outages or ongoing maintenance.

Navigate through the links displayed in the Related Links panel to view helpful information about using Cloud Database.

4.2 The Clusters Tab

Use the Clusters tab (shown in Figure 4.2) to create, monitor and manage active clusters that reside in the cloud.

Figure 4.2 - The Clusters tab.

Status indicators on the Clusters tab provide quick visual feedback about the status of clusters that reside on the cloud:

A green checkmark indicates that an object is healthy.

Page 23: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

23

A yellow alert symbol calls attention to an object that requires processing.

A red error symbol signifies that an object is not available.

A busy-indicator signals that the cluster creation has not completed.

Columns in the top panel of the Clusters tab contain information about the clusters that reside within the cloud. Click on a column name to sort the contents of the column; click a second time to reverse the sort-order.

Use the icons along the left side of the Clusters tab to create new clusters or manage existing clusters:

Use the Add Cluster icon to create a new Postgres cluster in the cloud.

Use the Scale Up icon to access the Scale Up dialog to manually add one or

more replicas to the current cluster, or add additional memory to the current cluster servers.

Use the Scale Down icon to remove a replica from the cluster.

Use the Backup icon to take a backup of the entire cluster (a single backup of the cluster data, and a backup of the cluster configuration).

Use the Recover icon to open a dialog that allows you to restore a backup, reverting the cloud to its condition at the time that the backup was taken. When you

restore from the backup, Cloud Database re-creates the original configuration and fills the cluster with the data you had stored in the database.

When you restore from a backup, the cluster configuration will match the original configuration, but the addresses will change.

You can use the Recover feature to create new developer sandbox environments based on backups of production data. For more information about creating a developer sandbox, see Chapter 7, Managing Backups and Recovery.

Page 24: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

24

Use the Delete Cluster icon to delete the currently selected cluster. A popup dialog will ask you to confirm your decision to terminate a cluster; once terminated, a cluster may only be restored from a backup.

When you terminate an active cluster, backups are not deleted. Backups (including user data) are retained until they are intentionally selected and deleted.

Please note: any custom module added to the server cluster that does not reside in the PGDATA directory is not backed up, and will be lost when the cluster is terminated.

You can also access cluster management options by right clicking on a cluster name, and selecting an option from the context menu (shown in Figure 4.3).

Figure 4.3 - Right click on a cluster name to access management options.

The panels located at the bottom of the Clusters tab provide easy access to useful statistical usage and activity information about the currently selected cluster.

Four navigation bars control the display; click a panel name on the navigation bar to access one of the following panels:

Select the Details bar to view information about the state of the selected cluster.

Select the Parameters bar to modify configuration parameters for the selected cluster.

Select the Monitoring bar to view usage statistics for the selected cluster.

Select the Events bar to review event logs describing activities on the selected cluster.

Page 25: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

25

4.2.1 The Details panel

Click the Details navigation bar to open the Details panel (shown in Figure 4.4).

Figure 4.4 - The Details panel on the Clusters tab.

The left pane of the Details panel displays information about the currently selected cluster, and provides controls that allow you to specify auto-scaling thresholds for storage and connection resources.

The right pane of the Details panel contains a status overview and connection information for the selected cluster. If you have created replicas, the secondary server

nodes are listed below the primary node in the tree control; expand the tree control to view the status of the replication nodes.

Page 26: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

26

4.2.2 The Parameters Panel

Use the Parameters panel (shown in Figure 4.5 ) to define and manage parameter groups, which can then be applied to your cluster to alter the server configuration.

Figure 4.5 - The Parameters panel.

A parameter group is a named set of parameters that you can use when creating clusters; when applied, a parameter group will override the default parameters specified in the

postgresql.conf file.

Adding or Deleting a Custom Parameter Group

Click the Add Group button to use the dialog shown in Figure 4.6 to create a new parameter group.

Figure 4.6 - The Add Parameter Group dialog.

When the Add Parameter Group dialog opens, enter the name of the parameter group,

and click OK. A popup will confirm that the parameter group has been successfully created.

Page 27: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

27

To delete a parameter group, select the name of the parameter group from the drop-down

listbox in the upper left corner of the tab, and click the Delete Parameter Group

button. When the Delete Selected ParamGroup popup (shown in Figure 4.7 ) opens,

click OK to confirm that you wish to delete the parameter group.

Figure 4.7 - The Delete Selected ParamGroup popup.

Editing Parameter Values within a Custom Parameter Group

After creating a custom parameter group, you can use the Configuration setting

dialog to modify the parameters within that group. To open the Configuration

setting dialog (shown in Figure 4.8), right-click on the name of the parameter you wish to modify, and select Edit from the context menu.

Figure 4.8 - The Configuration setting dialog.

Use the dialog to specify a new value for the parameter, and to mark the modification for deployment:

Use the Parameter Value field to specify a new value for the parameter.

Check the Enabled box to mark the parameter modification for application to your cluster.

Page 28: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

28

Select OK to exit the dialog and preserve changes to the parameter group, or Cancel to exit without making any changes. Parameters marked for deployment will display a checkmark next to the parameter name; the new parameter value will be displayed in the

MASTERVALUE column.

Deploying Parameter Modifications

To open the Apply settings dialog (shown in Figure 4.9) and deploy the parameter changes in your cluster, click the Apply button.

Figure 4.9 - The Apply settings dialog.

Check the box next to the configuration file that you wish to deploy, and click the OK button to apply any changes; click Cancel to exit without applying the modifications.

4.2.3 The Monitoring Panel

The Monitoring panel displays graphs that allow you to review statistical usage

information about the amount of storage and the CPU load for the selected cluster (see Figure 4.10 ).

Figure 4.10 - The Monitoring panel displays usage information.

Page 29: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

29

Use the Time Range drop-down listbox to specify the time period that the charted information should span.

The Data Space chart displays the amount of allocated data space used by the selected cluster. The red line denotes the threshold specified by the auto-scaling slider on the

Details panel (the threshold at which the cluster will be scaled-up). The blue line indicates the amount of the data space that is currently in use.

The Connections chart displays a graph of the number of connections to the cluster during the selected time range.

The CPU Load chart displays the processing load placed on the CPU by connecting

clients. The red line denotes the threshold specified for the CPU Load by the auto-scaling slider on the Details panel. The blue line charts the CPU usage for the cluster.

4.2.4 The Events Panel

The Events panel (shown in Figure 4.11 ) displays an event log that contains a history of selected events within the cluster.

Figure 4.11 - The Events panel displays server activity.

Click a column heading to sort the logged activity by the selected column; click again to reverse the sort order.

Page 30: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

30

4.3 The Backups Tab

Use the Backups tab (shown in Figure 4.12) to manage cluster backups; the tab displays a list of the available backups.

Figure 4.12 - The Backups tab of the Cloud Database console.

A backup captures and stores the status and condition of a cluster at a specific point-in-

time. Use the icons on the left side of the Backups tab to restore or delete backups.

Highlight a backup in the list, and click the Recover Backup icon to open a

dialog that allows you to restore a cluster from the selected backup. Specify a

name for the cluster, and click the Recover button to continue. A popup confirms that the cluster is being restored; close the popup and navigate to the

Clusters tab to monitor the restoration process.

Highlight a backup in the list and click the Delete Backup icon to delete

the selected backup. A popup will ask you to confirm that you wish to delete the backup before the backup is actually deleted.

Page 31: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

31

4.4 The User Tab

Select the User tab to view information about the current user (as shown in Figure 4.13).

Figure 4.13 - The User tab of the Cloud Database console.

Use the Download ssh key button to download the private key file for the current user.

Click the Change Password button to open a dialog that allows you to change the user password for the current user.

Use the Apply button to make any changes to the user information persistant; click the

Discard changes button to abandon any changes, and display the previous information.

Page 32: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

32

5 Creating a New Server Cluster

Before you can connect to Postgres from a client application, you must create a server

cluster. Use the Launch DB Instance button (located in the upper left panel of the

Dashboard Tab) or click the Add Server button on the Clusters tab to open the Create a New Server Cluster dialog, shown in Figure 5.1.

Figure 5.1 - Specify information about the new cluster on the Step 1 tab.

Use fields on the Create a New Server Cluster dialog to specify information about the new cluster:

Specify a name for the primary node of the new server clus ter in the Cluster Name field.

Use the drop-down listbox in the Engine Version field to select the version of the Postgres engine that you wish to use.

Use the drop-down listbox in the Server Class field to specify the size of each cluster node.

Use the drop-down listbox in the Number of nodes field to specify the number

of server nodes that you wish to create. The name specified in the Cluster

Name field will apply to the primary node; each additional node will act as a replication server for the primary node.

Use the Storage GB field to specify the initial size of the data space (in Gigabytes).

Page 33: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

33

Enter the name of the cluster owner in the Master User field.

Enter the password associated with the name in the Master Password field.

Click the Next button to continue to the Step 2 tab (shown in Figure 5.2).

Figure 5.2 - Specify backup information on the Step 2 tab.

Use the fields on the Step 2 tab to specify additional database information:

Use the # of Backups to retain field to specify the number of server backups stored. When the specified number of server backups is reached, Cloud Database will delete the oldest backup to make room for a new backup.

Use the Backup Window field to specify a time that it is convenient to backup the server (you may wish to schedule backups to occur when the CPU load is the lightest).

Use the Previous button or select a specific tab to return to a completed tab to review or

update information; when you have completed the Create a New Server dialog, click Launch to create the database cluster.

Page 34: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

34

Figure 5.3 - A popup confirms that the new cluster is being created.

A popup dialog confirms that Cloud Database is creating a new cluster (see Figure 5.3); click the X in the upper-right corner of the popup to close the popup.

Navigate to the Clusters tab of the Cloud Database console to monitor the creation of the cluster.

By default, a database cluster is configured with the default parameters displayed in the

Parameters panel of the Clusters tab. You can use Cloud Database to create one or more parameter groups that contain customized parameter configurations that, when

applied to a cluster will override the default parameters specified in the postgresql.conf and pg_hba.conf file.

Selecting a Server Class for your Public Cloud Cluster

When creating a new cluster, you must specify a server class. The server class determines the size and type (compute power and RAM) of each node within the cluster. Cloud Database's flexibility and scalability allow you to save money by adjusting the

amount of storage used by the cluster, or number of replicas in the cluster as your resource demands change.

You can start with a t1.micro instance to reduce development costs, and easily upgrade to a more capable instance as your performance requirements dictate.

If you find that your application is CPU bound, you may want to move to a high-CPU instance such as an m1.large instance or a m1.xlarge instance.

Page 35: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

35

High-memory instances such as m2.xlarge, m2.2xlarge and m2.4xlarge are well suited for databases accessed by high throughput applications that require a high I/O rate.

A c1.xlarge instance offers more CPU performance, and is well suited for applications that require a high CPU rate.

Page 36: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

36

6 Connecting an Application

Connecting to a Postgres instance that resides in the cloud is no different than connecting

to an instance that resides on traditional hardware. When you initially connect to the Postgres database, you must authenticate yourself with the server, using the role defined when the server cluster was created.

Use the authentication information (Master User and Master Password) provided on

the Create a New Server Cluster dialog to establish the initial connection as the database superuser, using a client application (such as EDB-PSQL or Postgres Enterprise Manager). Please note that connecting with this identity grants you superuser privileges on the server; you should not share this connection information with un-trusted users.

After connecting as the database superuser, you should create lesser-privileged user roles

with which non-administrative users (and end-user applications) will connect. All client applications should connect using the address and port information provided on the Details panel (shown in Figure 6.1) of the Clusters tab.

Figure 6.1 - The Details panel on the Clusters tab.

If you have defined a replicated server, client applications should connect to the primary server. Replica server nodes are listed below the primary node in the tree view.

The DNSNAME column displays the address of the node; a connecting client should use this address when connecting to a specific server.

The LBPORT column displays the port number to which a client application should connect to utilize load balancing.

Page 37: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

37

Since only the primary node of a multi-server cluster operates in read/write mode, all write queries will be directed to the primary node, while any read-only queries may be directed to a replica node.

The DBPORT column displays the port number on which the primary server node

listens. In most circumstances, a client application should connect to the LBPORT instead of the DBPORT to take advantage of load balancing.

6.1 Using SSH to Access a Server

Cloud Database creates an RSA private key when you register your user information.

Before connecting to a Postgres instance that resides on the cloud via an SSH encrypted

connection, you must download the RSA private key, and adjust the privileges on the key

file. To download your private key, navigate to the User tab, and click the Download ssh key button.

After downloading the key, assume superuser privileges, and adjust the key permissions with the command:

$ chmod 0600 key_file_name.pem

After setting the permissions for the key file, you can use SSH to connect to the running instance. When invoking SSH, include the complete path to the key file, the user name

on the server, and the DNS address as shown on the Details panel of the Clusters tab.

ssh -i/path/key_file_name.pem user_@dns_address.amazonaws.com

Where:

path specifies the location of the key file on the system from which you are connecting.

key_file_name specifies the name of the downloaded key file.

user specifies the name of a user on the server

dns_address specifies the IP address shown for the primary node of the server

on the Details panel of the Clusters tab.

For example:

ssh -i /Users/username/Desktop/[email protected] root@ec2-

50-19-196-220.compute-1.amazonaws.com

Page 38: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

38

7 Managing Backups and Recovery

When you take a backup, Cloud Database makes a copy of the contents of the

PostgreSQL PGDATA directory. The PGDATA directory contains the data and the meta-data required to construct an exact copy of the Postgres data cluster (the data and the

database objects that reside within that Postgres instance). You can use the backup to restore a server, or to create a developer sandbox that contains a copy of system data.

To capture a backup of a cluster, navigate to the Server tab, highlight a cluster

name in the cluster list, and click the Backup icon. Cloud Database asks you to confirm that you wish to backup the selected cluster (see Figure 7.1).

Figure 7.1 - The Backups tab of the Cloud Database console.

Click the Backup button to instruct Cloud Database to capture a backup of the selected

cluster. While Cloud Database performs a backup, the PENDING column of the Clusters tab will display the message, Backup in progress.

Navigate to the Backups tab (shown in Figure 7.2) to review a list of stored cluster backups.

Page 39: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

39

Figure 7.2 - The Backups tab of the Cloud Database console.

A backup captures and stores the status and condition of a cluster at a specific point-in-time.

The ID column contains a unique backup identifier.

The CAPACITY column contains the storage capacity of the cluster.

The ENGINEVERSION column contains a description of the Postgres version that the cluster is using.

The CLUSTER column identifies the name of the cluster preserved in the backup.

The STARTED column displays the date and time that the backup was initiated.

Use the icons on the left side of the Backups tab to restore or delete the selected backup.

Highlight a backup in the list, and click the Recover Backup icon to open a

dialog that allows you to restore a cluster from the selected backup. Specify a

name for the cluster, and click the Recover button to continue. A popup confirms that the cluster is being restored; close the popup and navigate to the Clusters tab to monitor the restoration process.

Please Note: when you restore a backup, the server configuration will match the original configuration, but the server addresses will change.

Highlight a backup in the list and click the Delete Backup icon to delete

the selected backup. A popup will ask you to confirm that you wish to delete the specified backup before it is actually deleted.

Page 40: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

40

Creating a Developer Sandbox

To use a backup to create a developer sandbox, highlight a snapshot ID in the list, and

click the Recover Backup button. When the Recover Database from a Backup dialog opens (shown in Figure 7.3), specify a new name for the recovered database

cluster, select a Server Class, and click the Recover button.

Figure 7.3 - Recovering a database from backup.

A popup will confirm that the recovery is in progress, as shown in Figure 7.4. Navigate

to the Clusters tab to monitor the progress as Cloud Database initializes the new cluster.

Figure 7.3 - The recovery in progress.

Page 41: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

41

8 Automatic Failover

The Cloud Database cluster manager constantly monitors the state of each cluster. Each

cluster is composed of a single master node that operates in read-write mode (performing all writes to the database) and one or more replica nodes. Replica nodes are read-only, and automatically duplicate all data found on the master node, and all changes made to that data.

In the event of the failure of the master node, a replica node is automatically promoted, assuming the role of the master node without interrupting server resources. When a

replica is promoted to the role of master node, it becomes a read-write node; any changes made to the new master are then replicated to the remaining replica nodes.

Figure 10.2 - Cloud Database provides automatic failover and load balancing .

When failover occurs, and a replica cluster is promoted to the role of the master node, the

server load is automatically re-balanced among the remaining servers. In addition, a new replica is added to the cluster, restoring the cluster to its original size and load handling capability. This self-healing property is at the heart of providing high availability to cluster users.

Page 42: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

42

9 Adding Replica Nodes

Adding additional replicas to your database cluster increases the CPU power available to

handle additional client requests or applications, increasing the number of client connections that can be serviced. Each additional replica automatically assumes a share of the read-only workload from incoming queries.

When adding a replica to a current cluster, Cloud Database:

1. Creates a new virtual machine of the same size and type as the other virtual machines in the cluster.

2. Copies the data from the master node to the new replica.

3. Updates the cluster manager and load balancer to recognize and use the new replica.

4. Starts the server instance that resides on the new replica.

The new replica then begins sharing the processing load for the cluster, allowing the cluster to handle more user and client connections.

The Cloud Database Scale Up dialog (located on the Clusters tab) serves two functions; the dialog can be used to:

Add additional storage space to each node on the cluster.

and/or

Add additional replica nodes to a cluster.

If you specify that Cloud Database should add both storage and replicas, Cloud Database

will process the request for additional storage before adding replicas to the cluster. All of the nodes on the cluster will be of the newly specified node size.

Adding a Replica

To add a replica to a cluster, navigate to the Clusters tab, and highlight the server that

you wish to scale up. Click the Scale Up icon on the Clusters tab to open the Scale Up dialog (shown in Figure 9.1).

Page 43: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

43

Figure 9.1 - The Scale Up dialog.

Use the drop-down listboxes on the Step 1 tab to specify:

The number of replicas to add to the cluster.

The amount of memory (in Gigabytes) that will be added to each server in the cluster.

When you've completed the dialog, click Next to continue to the Step 2 tab (shown in Figure 9.2).

Figure 9.2 - The Scale Up dialog.

Use the Scale Up button on the Step 2 tab to confirm that you wish to add the specified number of replication servers, or the specified amount of memory to the cluster.

Page 44: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

44

Click the Previous button to return to the Step 1 tab to adjust the specified amounts,

or click the X in the upper corner of the dialog to exit without saving modifications to the server.

Page 45: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

45

10 Manual/Automatic Scaling

When auto-scaling in enabled, Cloud Database monitors the server resources in use, and

automatically adds additional resources when usage exceeds a user specified percent (by

default, 90%). Controls on the Details panel of the Clusters tab makes it easy to adjust the threshold at which Cloud Database automatically scales up resources.

When the Data Space Threshold is reached, Cloud Database adds additional storage space.

When the Connection Threshold is reached, Cloud Database adds replica nodes.

Adding additional replicas to your database cluster increases the number of client connections and queries that each cluster can handle, while maintaining a high-level of

overall performance. Each additional replica automatically assumes a share of the read -only workload from incoming queries.

10.1 Adjusting the Automatic Scaling Thresholds

Use the Auto-Scaling controls on the Details panel to adjust the threshold at which

Cloud Database automatically scales up cluster resources. To access the Details panel,

navigate to the Clusters tab, and highlight the name of a listed cluster. Click the

Details navigation bar on the Clusters tab to open the Details panel (shown in Figure 10.1).

Figure 10.1 - The Details panel on the Clusters tab.

Auto-scaling is not enabled by default; to enable auto-scaling, check the Auto-Scaling checkbox. When auto-scaling is enabled, Cloud Database will automatically increase

Page 46: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

46

your data space by 50% when the disk usage exceeds the value specified by the Data Space Threshold slider.

10.2 Manually Scaling Up - Adding Memory and Replicas to a Cluster

Cloud Database's Scale Up dialog makes it simple to manually add additional replicas to

a cluster if you find that server resources are strained. The Scale Up dialog also allows you to increase the amount of storage available to a cluster with three simple clicks.

To add a replica or memory to a cluster, navigate to the Clusters tab, and select the

cluster that you wish to scale up. Click the Scale Up icon on the left side of the Clusters tab to open the Scale Up dialog (shown in Figure 10.2).

Figure 10.2 - The Scale Up dialog.

Use the drop-down listboxes on the Step 1 tab to specify:

The number of replicas that you wish to add to the selected cluster.

The amount of memory (in Gigabytes) that you wish to add to the selected cluster.

Adding memory to the selected cluster will add the same amount of memory to each replica in the cluster as well.

When you've completed the dialog, click Next to continue to the Step 2 tab (shown in Figure 10.3).

Page 47: Postgres Plus Cloud Database Getting Started Guideget.enterprisedb.com/docs/Postgres_Plus_Cloud...Dec 15, 2011  · PostgreSQL database. Cloud Database provides enterprise-class database

Postgres Plus Cloud Database Getting Started Guide

Copy right © 2011 EnterpriseDB Corporation. All rights reserv ed.

47

Figure 10.3 - The Scale Up dialog.

Use the Scale Up button on the Step 2 tab to confirm that you wish to add the specified number of replicas, or the specified amount of memory to the cluster.

Click the Previous button to return to the Step 1 tab to adjust the specified amounts,

or click the X in the upper corner of the dialog to exit without saving modifications to the cluster.

Please Note: If you specify that Cloud Database should add both storage and replicas in the same step, Cloud Database will process the request for additional storage before adding replicas to the cluster.