# Streaming Pub/Sub JSON to Cloud SQL PostgreSQL on GCP

DevFeed: [Streaming Pub/Sub JSON to Cloud SQL PostgreSQL on GCP](<https://devfeed.tech/articles/streaming-pub-sub-json-to-cloud-sql-postgresql-on-gcp-80413.md>)

Original publisher: [Read original article](<https://dlthub.com/blog/streaming-pub-sub-json-to-cloud-sql-postgresql-on-gcp>)

Author: William Laroche

Published: 2024-01-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [DLT Hub](<https://devfeed.tech/sources/dlt-hub.md>)

Topics: [cloud pub/sub](<https://devfeed.tech/topics/cloud-pub-sub.md>), [cloud-sql](<https://devfeed.tech/topics/cloud-sql.md>), [Google Cloud Platform (GCP)](<https://devfeed.tech/topics/google-cloud.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [Azure SQL](<https://devfeed.tech/topics/azure-sql.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [cloud-sql](<https://devfeed.tech/tags/cloud-sql.md>), [community](<https://devfeed.tech/tags/community.md>), [gcp](<https://devfeed.tech/tags/gcp.md>), [json](<https://devfeed.tech/tags/json.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

## AI overview

The article describes an autoscaling worker setup on Google Cloud that pulls Pub/Sub messages, batches JSON events, and loads them into Cloud SQL for PostgreSQL. It compares synchronous inserts, push subscriptions, Dataflow, and a pull-worker approach, then reports throughput, backlog processing, and costs from the deployment.

## Source excerpt

**TL;DR:**William, a GCP data consultant, shares an article about the work he did with dlt and GCP to create a secure, scalable, lightweight, and powerful high-volume event ingestion engine. He explores several alternatives before offering a solution, and he benchmarks the solution after a few weeks of running. Read the original post here: dataroc.ca blog. Or find/hire William on Linkedin.