TrueProfit · infrastructure cost plan

Save $4.9–7.6K a month in two phases

The short-term plan needs only DevOps time and does not slow releases. The long-term plan needs code work and runs after the guardrails are in place.

Baseline: September 2026, ~$18.2K/month · AWS Cost Explorer + vault cost report · prepared 2026-10-23 · confidence MEDIUM

Today$18.2K /mo

AWS prod $11.0K · MongoDB ~$6.1K · lab $0.4K · small lines ~$0.7K

Short-term · Nov–Dec−$1.8–2.7K

10–15% · ~4–7 DevOps days · no product code

Long-term · 2027 H1−$3.2–4.9K

17–27% · MongoDB downsize + code work (21–38 eng-days)

Both phases−$4.9–7.6K

27–42% · $59–91K a year · top of range needs every estimate to land high

Fig. 1Savings per month against the September baseline. Allocated FireGroup lines and Proveny (~$2K) are outside the base.
short-termlong-term $16K$12K$8K OctNovDecJan ’27FebMarAprMayJunJul no action $18.2K $16.6KS1–S4 $16.0K+ S5, S6 $13.5K+ MongoDB $12.0K+ code
Fig. 2Projected monthly cost using the middle of each estimate (−$6.2K, about 34%, by June 2027). The October run-rate is ~$1K higher than this baseline because of the sales-engine rollout; part of that ends with the backfill.

Where the money goes

MongoDB is a third of the bill; the rest is spread over many AWS lines

Line$/month (Sep)Note
MongoDB Atlas (M50 NVMe, billed via FireGroup account)~6,100May bill; Sep/Oct bill not seen. Primary CPU avg 12%, p95 18%.
NAT gateway data (15.3 TB/mo through one NAT)8421,014 Lambdas send traffic through it
EBS storage (StarRocks cache disks 5.6 TB of 11.1 TB)769
S3 write requests (133M PUT/mo, mostly StarRocks)665compaction churn
AWS Backup of the StarRocks bucket647Oct run-rate 1,185
SQS requests (standard + FIFO)1,107224 queues, 294M empty receives
EventBridge events (447M/mo)447364M of them from one backup rule
Lambda compute + requests7681.78B invocations/mo
CloudWatch Lambda logs (623 GB)402top 10 functions ≈ 450 GB

Short-term · Nov–Dec

Six DevOps-only changes save $1.75–2.7K a month

#ChangeSaves /moEffortRiskWhenConfidence
S1StarRocks backup: keep 2-day point-in-time, cut daily snapshots 30 → 7 days, turn off the S3 → EventBridge notification if unusedOnly after the restore drill passes. See next section.$1.0–1.4K0.5–1 dayshorter historyNovMEDIUM
S2Top up the Compute Savings Plan ($900/mo still on-demand)Decision for the payer account, 1-year commitment.$0.13–0.25K0 daysnoneNovMEDIUM
S3Delete leftovers: stopped migration-data, vuhv-test, an unattached volume, Dagster queues and ruleSnapshot first.$0.03–0.06K0.5 daynoneNovHIGH
S4Lower log level on the 10 noisiest Lambdas (env var)$0.15–0.22K1 dayless debug infobefore 23 NovMEDIUM
S5Scale msk-sync back down from m5.large$0.25–0.3K0.5 daywait for backfillafter backfillMEDIUM
S6VPC endpoints (DynamoDB gateway free; SQS, SNS, EventBridge, Logs, STS, ECR)Run NAT flow logs for half a day first.$0.2–0.45K1–2 daysnetwork changeDec, after BFCMLOW–MEDIUM
Short-term total$1.75–2.7K4–7 days10–15% of $18.2K · $21–32K a year · no product engineer time

Freeze 23 Nov – 2 Dec (Black Friday): no changes to network, databases or backfill settings. S1–S4 land before it; S5 and S6 after.

S1 · StarRocks

Keep the 2-day restore window and cut the 30-day history

Today

2-day point-in-time + 30 daily snapshots

~0.5 TB of data held as ~10.8 TB-months of backups. Compaction rewrites files, so each daily snapshot keeps a day of churn for 30 days.

Problem

Rewinding the bucket undoes too much, too slowly

Files live in S3 but table metadata lives in the FE nodes, so the two can end up out of step. A rewind also throws away every correct write since that moment, and it takes hours. The Dec 2025 restore took 7 jobs, 2 failed.

Fast undo instead

Undo per table or per shop

  • Dropped table: recycle bin, RECOVER TABLE; keep 3–7 days.
  • Bad migration/backfill: automatic table snapshot before the change, keep 7 days.
  • Wrong shop numbers: re-run backfill from the source.
  • Prevent: no DROP/TRUNCATE for app and AI users; prod DDL only via reviewed migration.
Fig. 3Point-in-time restore stays for disasters. The smaller layers undo day-to-day mistakes in minutes and cost almost nothing.

Long-term · 2027 H1

MongoDB is the biggest saving, and code work comes last

#ChangeSaves /moEffortDepends onWhenConfidence
L1Finish ADR-023: retire the legacy reportfns → MongoDB read path, stop running two enginesAlready on the roadmap, so no extra roadmap cost.enables L23 steps / 3 call sites30 clean days of reconciliationQ1HIGH (plan)
L2Downsize MongoDB Atlas one tier (CPU avg 12%, p95 18%)$2–3K2–3 days + full syncL1 · working-set check · Atlas billQ1LOW until bill seen
L3Move ad-insights from MongoDB to a StarRocks primary-key tableFixes duplicate docs by design (TPCS-5375). Saves money only if it lets L2 drop a tier; adds StarRocks compaction churn.$0 alone · part of L2code + dual writemeasure its share of MongoDB firstQ1–Q2MEDIUM
L4Merge the pixel StarRocks cluster into the main one (6 on-demand nodes, disks, MSK, Redis)$0.5–0.7K10–15 daysalerts + tests on pixel ingestQ2LOW
L5Tune StarRocks load batching and compaction (S3 requests)$0.3–0.5K3–8 daysfreshness checkQ2LOW
L6SQS: batch send/receive, FIFO → standard where order does not matter$0.25–0.45K5–10 daystests per queueQ2LOW
L7Cache the two busiest sync Lambdas (shops-prod-details, flags-prod-canUser)$0.1–0.25K3–5 daysstale-data rulesQ2LOW
Long-term total$3.15–4.9K21–38 eng-days + L117–27% of $18.2K · $38–59K a year

L4–L7 cost product engineer time and slow releases. Schedule each one for when the team is already working on that service.

Guardrails

Each cut waits for a check that can catch and undo its mistakes

Before S1

Restore drill

Restore point-in-time to a test bucket, start a dev StarRocks on it, count rows. If it fails, fix backup before cutting it.

Before L2

Reconciliation and alerts

30 clean days after the legacy path is gone, and alerts on billing, sync and onboarding flows.

Before L4–L7

Tests that bite

Regression tests that fail when a fix is reverted, in a blocking CI job. Today no pipeline runs tests.

Context

How big the saving is

Both phases together equal about 2–4% of net revenue (~$200K/mo). That is worth doing where it is cheap, and too small to justify slowing releases.

Open checks

Seven facts to confirm before the numbers firm up

  1. MongoDB Atlas invoice for Sep/Oct: the biggest line, still estimated from May.
  2. ad-insights share of MongoDB storage and working set (decides whether L3 saves money).
  3. Split the AWS Backup cost between the point-in-time rule and the daily snapshots.
  4. StarRocks mode, version, BACKUP/RESTORE support, catalog_trash_expire_second, FE metadata backup.
  5. Did the Dec 2025 restore into starrock-data-v2 actually run StarRocks?
  6. Is Atlas continuous backup on? MongoDB is the source of truth.
  7. Cloudflare, GCP and SaaS bills, and how allocated FireGroup lines are split.

Sources

AWS Cost Explorer prod and lab, Jun–Oct 2026 · AWS Backup plan and recovery points, read 2026-10-23 · vault product-knowledge/04-operations/cost/trueprofit-infra-cost-2026.md, product-knowledge/03-engineering/decisions/2026-10-21-sales-engine-default-read-path.md, product-knowledge/03-engineering/investigations/2026-10-23-technical-research-starrocks-fast-undo-backup.md · Atlas cluster config. Ranges are estimates; mid values used in Fig. 2.