Aurora Configuration Example
pgpool-II 3.7.1 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 7. Configuration Examples | Next |
Amazon Aurora for PostgreSQL Compatibility (Aurora) is a managed service for PostgreSQL . From user's point of view, Aurora can be regarded as a streaming replication cluster with some exceptions. First, fail over and online recovery are managed by Aurora . So you don't need to set failover_command , follow_master_command , and recovery related parameters. In this section we explain how to set up Pgpool-II for Aurora.
7.5.1. Setting pgpool.conf for Aurora
-
Create pgpool.conf from pgpool.conf.sample-stream .
-
Set sr_check_period to 0 to disable streaming replication delay checking. This is because Aurora does not provide neccessary functions to check the replication delay.
-
Enable enable_pool_hba to on so that md5 authentication is enabled ( Aurora always use md5 authentication).
-
Create pool_password . See Section 6.2.2 for more details.
-
Set backend_hostname 0 for the Aurora writer node. Set other backend_hostname for the Aurora reader node. Set appropreate backend_weight as usual. You don't need to set backend_data_directory
-
Set ALWAYS_MASTER flag to the backend_flag for backend_hostname 0.
-
Enable health checking. Set health_check_period to 5. Set health_check_user , health_check_password , health_check_user and health_check_database to appropriate values. Enable health check retry. Aurora shutdowns all DB nodes while switching over or failover. If the retry is not performed, Pgpool-II thinks that all DB nodes are in down status so that it is required to restart Pgpool-II . Set health_check_max_retries to 20. Set health_check_retry_delay to 1 to avoid the problem.
-
Disable fail_over_on_backend_error to avoid failover when connecting to the backend or detecting errors on backend side while executing queries for the same reasons above.