tagbase / tagbase-server

tagbase-server is a data management web service for working with eTUFF and nc-eTAG files.
https://oiip.jpl.nasa.gov/doc/OIIP_Deliverable7.4_TagbasePostgreSQLeTUFF_UserGuide.pdf
Apache License 2.0
7 stars 2 forks source link

ISSUE-106 Utilize pgbouncer to pool connections into PostGIS #196

Open lewismc opened 1 year ago

lewismc commented 1 year ago

Addresses #106 @renato2099 a couple of issues here

  1. You will see the following message upon pgbouncer container initialization
    tagbase-server-pgbouncer-1       | pgbouncer 05:23:09.34 WARN  ==> You set the environment variable PGBOUNCER_AUTH_TYPE=trust. For safety reasons, do not use this flag in a production environment.

    We need to change the auth_type via the PGBOUNCER_AUTH_TYPE environment variable.

  2. You need to augment .env and add the following build arg
    docker-compose build ... --build-arg PGBOUNCER_PORT="6432"

    This means that the new complete build command looks like

    docker-compose build --build-arg NGINX_PASS="tagbase" --build-arg NGINX_USER="tagbase" --build-arg PGBOUNCER_PORT="6432"  --build-arg POSTGRES_PASSWORD="tagbase" --build-arg POSTGRES_PORT="5432"

    I need to augment the installation documentation to account for this. I will do that once we merge this PR into main.

I would like to load test this implementation with Locust. Have you used that framework before? The load testing could also be part of this PR... let me know what you think. Thanks

lewismc commented 1 year ago

According to the Locust docs, we could also take a look at https://github.com/psycopg/psycogreen/.

lewismc commented 1 year ago

@renato2099 I am going to leave off on merging this until we have reviewed more thoroughly and we especially understand the security implications. Additionally, this all needs to be documented. Until we have that it would be unwise to merge.

lewismc commented 1 year ago

We agreed to hold off on further development until the end of May.