# Kong and AWS RDS/Aurora PostGres?

**URL:** <https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263>\
**Category:** Questions\
**Created:** [December 19, 2017, 8:41pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263 "2017-12-19T20:41:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![emckean](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/emckean/32/63_2.png) [@emckean](https://discuss.konghq.com/u/emckean)\
**Post date:** [December 19, 2017, 8:41pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/1 "2017-12-19T20:41:17Z")

</div>

Anyone using this as their setup and have tips to share?

---

<div class="post-metadata">

**Author:** ![vvondra](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/vvondra/32/85_2.png) [@vvondra](https://discuss.konghq.com/u/vvondra)\
**Post date:** [December 20, 2017, 7:06pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/2 "2017-12-20T19:06:44Z")

</div>

nothing special for us about it to normal Postgres, works very well.

Kong caches everything to memory so during load it doesn’t hit DB during normal operations. We run about 8kRPM on a t2.medium at 20% load. Most of the APIs use the ACL and JWT plugin.

The only trouble we’ve run into so far isn’t related to RDS itself. When you scale more kong web server instances, it probably needs to fetch a lot of data live from db and acquires many connections to the database. If multiple web instances do that at once, we used to hit max\_connections on the db if we weren’t careful.

---

<div class="post-metadata">

**Author:** ![emckean](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/emckean/32/63_2.png) [@emckean](https://discuss.konghq.com/u/emckean)\
**Post date:** [December 20, 2017, 7:52pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/3 "2017-12-20T19:52:09Z")

</div>

Awesome, thank you – very helpful!

---

<div class="post-metadata">

**Author:** ![ruwen](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@ruwen](https://discuss.konghq.com/u/ruwen)\
**Post date:** [December 21, 2017, 12:18am UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/4 "2017-12-21T00:18:13Z")

</div>

Hi! We are not using Postgres RDS for Kong, but for other things. Every now and then Amazon schedules maintenance. This can lead to a short downtime. Make sure you adjust the maintenance window to your needs. Since we can not tolerate outages, we actually don’t run Kong on Postgres.

---

<div class="post-metadata">

**Author:** ![emckean](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/emckean/32/63_2.png) [@emckean](https://discuss.konghq.com/u/emckean)\
**Post date:** [December 21, 2017, 4:47pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/5 "2017-12-21T16:47:46Z")

</div>

Good to know! Do you run on Cassandra instead?

---

<div class="post-metadata">

**Author:** ![ruwen](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@ruwen](https://discuss.konghq.com/u/ruwen)\
**Post date:** [December 21, 2017, 10:50pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/6 "2017-12-21T22:50:47Z")

</div>

Yes. This works so far quite well.

---

<div class="post-metadata">

**Author:** ![kaoruu\_tosho](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/kaoruu_tosho/32/148_2.png) [@kaoruu\_tosho](https://discuss.konghq.com/u/kaoruu_tosho)\
**Post date:** [January 19, 2018, 4:28am UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/7 "2018-01-19T04:28:36Z")

</div>

Regarding the setup of Kong with Aurora Postgres, there are two endpoints provided by AWS when you deploy a cluster. There is a reader endpoint and the cluster endpoint. If you decided to add read replica, you can use the reader endpoint. Based on my discussion with the AWS, the cluster endpoint is used for read/write only on the writer/primary instance, traffic will not go to the read replica unless you use the reader endpoint.

In our case in kong, we only have 1 configuration for the host which most likely we will only use the cluster endpoint for this. Does anyone or provide details on how they use postgres aurora in aws?

---

<div class="post-metadata">

**Author:** ![narsipra](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/narsipra/32/1219_2.png) [@narsipra](https://discuss.konghq.com/u/narsipra)\
**Post date:** [July 2, 2019, 11:03am UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/8 "2019-07-02T11:03:39Z")

</div>

Hi @kaoruu_tosho,

We are also trying to implement Postgres as RDS. We are in the kubernetes environment in the following regions(i.e. Dublin, Oregon, Singapore, china, etc). If you have any best practices for implementing the same. Please suggest us.

Regards,  
narsipra

---

<div class="post-metadata">

**Author:** ![hutchic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hutchic/32/122_2.png) [@hutchic](https://discuss.konghq.com/u/hutchic)\
**Post date:** [September 1, 2020, 6:23pm UTC](https://discuss.konghq.com/t/kong-and-aws-rds-aurora-postgres/263/9 "2020-09-01T18:23:06Z")

</div>

Kong w\ RDS Postgres should have always been fine but thought I’d jump in to mention we now support read only replicas as of 2.1.0

Noted in the CHANGELOG [here](https://github.com/Kong/kong/blob/master/CHANGELOG.md#core-4) which landed in [this PR](https://github.com/Kong/kong/commit/d5596f777c7c7bd91b4b9a70d79dd6604bccf0e0). Documentation is available [here](https://docs.konghq.com/2.1.x/configuration/#datastore-section)
