Storing Application data in Kong API gateway

Hi,

In the context of Kong, PostgreSQL may be used as a backend database to store configuration data, user information, and other relevant details for the Kong API gateway. This could include information about APIs, routes, consumers, plugins, and other configuration settings. It doesn’t store the actual data being processed by the APIs. The actual data being handled by APIs may reside in other databases or external systems, depending on the architecture and requirements of the specific application.

  1. Can i use the same PostgreSQL DB to store actual data being processed by the APIs?
  2. Any specific use case or reason to use other databases or external systems?
  3. Any architecture diagram to refer to understand Kong API Gateway in more depth?

Please guide me. Thanks in advance

Best Regards,

Kaushal

Hi Kaushal,

Technically, yes, you can add new tables to the kong postgres db, but that may not be an architecturally robust idea.

Ideally your business logic should be kept separate from the data (tables) needed for Kong itself - Kong is not an Application Server, it is a API Gateway that sits in front of your “application server” (like a Java, Python, nodejs etc microservice), so we should aim for “Separation of Concern”.

If you are unable to provision another new pgsql server for your business data, you should consider creating a new database in the same pgsql server (PostgreSQL: Documentation: 16: CREATE DATABASE). This will keep your business data and kong data separate.

-FY