Kong and AWS RDS/Aurora PostGres?

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

1 Like

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.

3 Likes

Awesome, thank you – very helpful!

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.

1 Like

Good to know! Do you run on Cassandra instead?

Yes. This works so far quite well.

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?

1 Like

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

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 which landed in this PR. Documentation is available here