India’s Leading Domain & Web Hosting Provider

  • Chat
    Live Chat 24 X 7 online support
  • Contact NTSPL Hosting support
    Call Now +91 - 8260003333
Google CloudAnalytics agency (marketing analytics and attribution for consumer brands)Retail, E-commerce & Consumer

Marketing analytics agency caps runaway BigQuery scans across 70 client projects

Mumbai agency with 70 client projects and 110 analysts on Google Cloud · Google Cloud Mumbai (asia-south1) · 7 weeks

Amazon Web Services
01

As-is situation

Each client had its own Google Cloud project, billed back at cost plus a margin. Analysts ran ad hoc queries on BigQuery on-demand pricing, and data engineers ran Dataflow pipelines per client. In one month, a junior analyst's scheduled query joined two unpartitioned clickstream tables every 15 minutes, scanning 1.1 PB, and a streaming Dataflow job left running after a campaign ended. Together they added ₹19 lakh to a normal ₹28 lakh bill. The agency discovered it from the invoice and could not bill the client for its own mistake.

  • One account-level budget for 70 projects, alerting a finance mailbox at 100% of actuals.
  • No limits on bytes scanned per analyst or per project.
  • Abandoned streaming jobs ran until someone noticed, with no usage alarms.
02

Approach, tools and architecture

NTSPL set budgets per client project from contracted monthly allowances, with forecast alerts at 80% and 100% published to Pub/Sub. A Cloud Run function enriched each alert with the top jobs and users from the billing export and INFORMATION_SCHEMA, then posted it to the client team's Slack channel. BigQuery custom quotas limited query bytes per user per day and per project per day. Cloud Monitoring alarms flagged Dataflow jobs with no input for six hours. A BigQuery ML ARIMA_PLUS model ran daily anomaly detection on each project's cost.

Per-project budgets → Pub/Sub → Cloud Run function enrichment → Slack client channel; BigQuery custom quotas + Dataflow idle alarms; billing export → BigQuery ML anomaly model
Cloud Billing budgetsPub/SubCloud Run functionsBigQuery custom quotasBigQuery MLCloud Monitoring
03

Implementation approach

Weeks 1-2 · Budgets70 project budgets set from client contracts with forecast alerts to Pub/Sub.
Weeks 2-4 · LimitsCustom quotas on query bytes per user and per project, tuned with team leads.
Weeks 4-6 · Alarms and modelDataflow idle alarms and a daily BigQuery ML anomaly model on per-project cost.
Weeks 6-7 · RunbooksRunbooks for runaway queries, idle pipelines and unexpected storage growth published to team leads.
04

Measured results

Unbillable overrun in following six months
₹19 lakh in one month→₹1.4 lakh total
Median time to detect a runaway query
Invoice (about 30 days)→Same day (quota hit)
Projects with budgets
0 of 70→70 of 70
Idle streaming jobs older than one day
Frequent→0

Operational improvements

  • Client teams see their project's spend against allowance mid-month and can warn clients before overage.
  • Quota hits now prompt analysts to partition tables, improving query habits across the agency.
05

Cost considerations

The enrichment function, alarms and daily model cost under ₹8,000 a month. Custom quotas occasionally blocked legitimate large backfills, handled by a temporary quota increase request approved by a team lead within an hour. No third-party tool was needed.

06

Return on investment

ROI indicator

Avoiding a single repeat of the ₹19 lakh incident repays the setup many times. Mid-month visibility also let account managers raise contracted allowances for four clients, adding recurring revenue the agency had previously absorbed as overrun.

Illustrative scenario: a composite based on typical NTSPL engagement patterns for this industry and service. It does not describe a named customer. The figures are indicative, and actual results depend on the workload, its scale and the commercial terms.