# Moving away from Segment to a cost-effective do-it-yourself event streaming pipeline with Cloud Pub/Sub and dlt.

DevFeed: [Moving away from Segment to a cost-effective do-it-yourself event streaming pipeline with Cloud Pub/Sub and dlt.](<https://devfeed.tech/articles/moving-away-from-segment-to-a-cost-effective-do-it-yourself-event-streaming-pipeline-with-cloud-pub-sub-and-dlt-80302.md>)

Original publisher: [Read original article](<https://dlthub.com/blog/dlt-segment-migration>)

Author: Zaeem Athar

Published: 2024-03-11T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [DLT](<https://devfeed.tech/topics/data-load-tool.md>), [Event-Streaming](<https://devfeed.tech/topics/event-streaming.md>), [cloud pub/sub](<https://devfeed.tech/topics/cloud-pub-sub.md>), [cloud cost management](<https://devfeed.tech/topics/cloud-cost-management.md>), [hosting](<https://devfeed.tech/topics/hosting.md>)

Tags: [analytics](<https://devfeed.tech/tags/analytics.md>), [cost](<https://devfeed.tech/tags/cost.md>), [event-streaming](<https://devfeed.tech/tags/event-streaming.md>), [moving](<https://devfeed.tech/tags/moving.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

## AI overview

This tutorial demonstrates replacing Segment with an event ingestion pipeline built using dlt, Google Cloud Pub/Sub, Cloud Storage, Cloud Functions, and BigQuery. It walks through provisioning resources with Terraform, publishing telemetry events, and estimating costs, reporting potential savings of up to 18x under the described event-to-user ratios.

## Source excerpt

**TL;DR:**This blog post introduces a cost-effective solution for event streaming that results in up to 18x savings. The solution leverages Cloud Pub/Sub and dlt to build an efficient event streaming pipeline. ## The Segment Problem Event tracking is a complicated problem for which many solutions exist. One such solution is Segment, which offers ample startup credits to organizations looking to set up event ingestion pipelines. Segment is used for a variety of purposes, including web analytics.