You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add news post to announce RDS read replicas
* update RDS service docs to include new replica plans
* update more documentation about replicas
* finish documentation on how to connect to a read replica database
* update cost estimator to include replica plans
* update cost estimator
* Update content/news/articles/2025-07-01-rds-read-replicas-available.md
Co-authored-by: James Hochadel <jameshochadel@users.noreply.github.com>
Signed-off-by: Mark Boyd <markdavidboyd@gmail.com>
* Update content/news/articles/2025-07-01-rds-read-replicas-available.md
Co-authored-by: James Hochadel <jameshochadel@users.noreply.github.com>
Signed-off-by: Mark Boyd <markdavidboyd@gmail.com>
* Update content/news/articles/2025-07-01-rds-read-replicas-available.md
Co-authored-by: James Hochadel <jameshochadel@users.noreply.github.com>
Signed-off-by: Mark Boyd <markdavidboyd@gmail.com>
* apply feedback
* Update content/news/articles/2025-07-01-rds-read-replicas-available.md
Co-authored-by: James Hochadel <jameshochadel@users.noreply.github.com>
Signed-off-by: Mark Boyd <markdavidboyd@gmail.com>
* refactor documentation on updating services and read replicas
* rename file
* refactor information on binding database services for read replicas
---------
Signed-off-by: Mark Boyd <markdavidboyd@gmail.com>
Co-authored-by: James Hochadel <jameshochadel@users.noreply.github.com>
_\*Note: The actual database engine version used is the latest minor/patch version offered by AWS RDS for this major version_
@@ -77,6 +88,8 @@ Once you have chosen a plan size, you should consider whether you need to run yo
77
88
78
89
For databases used for development or staging environments, redundancy may not be as critical. **But for databases used in production applications, you should always use a `*-redundant` database plan.**
79
90
91
+
If you need or want [a read replica for your database](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html), use one of the `*-replica` database plans. The `*-replica` database plans also include redundancy of your database in multiple availability zones.
92
+
80
93
## Create an instance
81
94
82
95
To create a service instance run the following command:
@@ -227,7 +240,11 @@ There are a couple of caveats regarding this command with the `-p` flag:
227
240
- You can only update using plans with the same database engine as your existing service instance. This means that if your original service instance was using a PostgreSQL plan (e.g., `micro-psql`), you can only update to one of the other `psql`-based plans.
228
241
- You can **only** switch service plans with this command; you cannot do things like upgrade your database version.
229
242
230
-
You can update to larger or smaller plans depending on your specific needs, and you can switch between redundant and non-redundant plans.
243
+
By specifying the `-p` flag to `cf update-service`, you can:
244
+
245
+
- update to larger or smaller plans depending on your specific needs
246
+
- switch between redundant and non-redundant plans
247
+
- switch from a plan without a read replica to one with a read replica
231
248
232
249
**NOTE: All updates are applied immediately. Performing an update in place like this will result in a brief period of downtime (seconds to minutes) while the service instance restarts as a part of the update.**
233
250
@@ -334,15 +351,20 @@ Lastly, you need to restage your application so that it uses the updated credent
334
351
cf restage <application-name> --strategy rolling
335
352
```
336
353
337
-
###Bind to an application
354
+
## Bind to an application
338
355
339
356
To use the service instance from your application, bind the service instance to the application. For an overview of this process and how to retrieve the credentials for the service instance from environment variables, see [Bind a Service Instance](https://docs.cloudfoundry.org/devguide/services/managing-services.html#bind) and the linked details at [Delivering Service Credentials to an Application](https://docs.cloudfoundry.org/devguide/services/application-binding.html).
340
357
341
358
In short, `cf bind-service` will provide a `DATABASE_URL` environment variable for your app, which is then picked up by the `restage`.
342
359
343
-
The contents of the `DATABASE_URL` environment variable contain the credentials to access your database. Treat the contents of this and all other environment variables as sensitive.
360
+
The contents of the `DATABASE_URL` environment variable contain the credentials to access your database. Treat the contents of `DATABASE_URL` and all other environment variables as sensitive.
361
+
362
+
If you are using a service plan that includes a read replica, then the bound credentials for the database with a read replica will include:
363
+
364
+
-`replica_uri`: a full URI for connecting to your read replica database.
365
+
-`replica_host`: the host for connecting to your read replica database. The `replica_host` can be used in combination with the other properties (`username`, `password`, `db_name`, `port`) to connect to the read replica database.
344
366
345
-
Please note: If you are binding a service instance to a new space, please review and adjust your space egress setting. By default, all newly made spaces have their space egress set to closed which meansany requests to the open internet or our brokered services will be blocked. For an overview of space egress settings, see [Space Egress](https://cloud.gov/docs/management/space-egress/).
367
+
**Please note:** If you are binding a service instance to a new space, please review and adjust your space egress setting. **By default, all newly made spaces have their space egress set to closed which means*any requests to the open internet or our brokered services will be blocked**. For an overview of space egress settings, see [Space Egress](https://cloud.gov/docs/management/space-egress/).
title: Read replicas now available for RDS databases
5
+
date: 2025-07-03
6
+
excerpt: "Add a read replica for your RDS databases to handle read-only workloads"
7
+
---
8
+
9
+
The Cloud.gov team is excited to announce support for adding read replicas to your databases.
10
+
11
+
A read replica is a [read-only copy of your database which automatically replicates the data in your primary database](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html). You can offload read-heavy tasks to a read replica while your primary database handles writes. Isolating read operations to the replica reduces the load and lock contention on your primary database.
12
+
13
+
Use cases for a read replica include:
14
+
15
+
- Generating reports from your data
16
+
- Serving data for API requests
17
+
- Performing analytics queries
18
+
19
+
## How to create a read replica service
20
+
21
+
To create a new database service with a read replica:
See the [database service documentation]({{ site.baseurl }}/docs/services/relational-database) for more information on how to create or update database services.
34
+
35
+
Read replicas are supported for all `aws-rds` plans. To add a read replica to an existing instance, use the replica plan corresponding to its current plan. For example, an instance using the `medium-gp-psql` plan should update to `medium-gp-psql-replica`.
36
+
37
+
To see the list available of replica plans (which all end in `-replica`):
38
+
39
+
```shell
40
+
cf marketplace -e aws-rds
41
+
```
42
+
43
+
While your database service is being created or updated to add a read replica, running `cf service <your-service-name>` should report on the status of the create or update operation:
44
+
45
+
```shell
46
+
...
47
+
Showing status of last operation:
48
+
status: create in progress
49
+
message: Waiting fordatabase to be available. Current status:in progress (attempt 6 of 60)
50
+
started: 2025-07-01T18:28:22Z
51
+
updated: 2025-07-01T18:28:22Z
52
+
```
53
+
54
+
## Using your read replica
55
+
56
+
Once you have created or updated a service with a read replica, you need to bind that service to an application to get the credentials to access it.
57
+
58
+
[See the database service documentation for general guidance on how to bind database services to an application]({{ site.baseurl }}/docs/services/relational-database#bind-to-an-application).
59
+
60
+
In particular, note the extra `replica_uri` and `replica_host` values that are available for any database service with a read replica.
61
+
62
+
If you updated an existing database service from a non-replica plan to a replica plan, then you will need to un-bind and re-bind that service to include the credentials for accessing the read replica. As always, when binding or re-binding a service to an application, you should then restage the application.
63
+
64
+
Using these credentials in your application code or other tools, you should be able to connect to your read replica database and use it. **Remember that read replica databases are read-only, so you cannot write to them**.
Copy file name to clipboardExpand all lines: content/pricing/index.liquid
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ redirect_from:
153
153
<ahref="https://airtable.com/appbHJFEYs3H7fmA8/shrNrGC5KQnLgJqWc">Contact us</a> to learn more about available discounted enterprise pricing as well as pricing for brokered services.
154
154
</p>
155
155
<p>You can use our <a
156
-
href="/assets/documents/cloud-gov-cost-estimator.xlsx">Cloud.gov Cost Estimator.xlsx</a> (v1.5 published July 2, 2025) spreadsheet to estimate your system costs.
156
+
href="/assets/documents/cloud-gov-cost-estimator.xlsx">Cloud.gov Cost Estimator.xlsx</a> (v1.6 published July 3, 2025) spreadsheet to estimate your system costs.
0 commit comments