Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pgbouncer in between gtfs-db and gtfs-api/geoserver #28

Merged
merged 11 commits into from
Nov 14, 2023
Merged

Conversation

derhuerst
Copy link
Member

@derhuerst derhuerst commented Oct 8, 2023

This PR changes all services accessing some (or multiple) PostgreSQL databases – geoserver, dagster-pipeline, dagster-daemon, dagster-dagit, gtfs-api – to connect via a new pgbouncer service.

  • Programmatically re-configuring the GTFS database (see also decide how the GTFS import should work #8) used by geoserver & gifs-api still requires a complex process, but it is located in one service only and therefore much less brittle.
  • Putting pgbouncer between dragster-* & dagster-postgresql will likely speed up Dagster runs, because we assume that currently, dagster-pipeline excessively establishing new connections to the DB causes significant load.

Note: The PR currently uses a bespoke & temporary Docker image derhuerst/pgbouncer:1-pgbouncer-dsn-i-file. If bitnami/containers#51830 gets merged, we can use the upstream bitnami/pgbouncer:1 image again. If it doesn't get merged, we can still revert to letting a script generate a pgbouncer.ini from a template. It got merged, we're using bitnami/pgbouncer:1 again.

This CI directly uses .env.local.example as .env.local, so it fails with an empty value.
Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hbruch hbruch merged commit ba3e065 into main Nov 14, 2023
2 checks passed
@derhuerst derhuerst deleted the gtfs-pgbouncer branch November 20, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants