How We Reduced Firestore Reads by 80%: CareerVivid's Database Architecture Deep Dive

#firestore#firebase#database-architecture#performance#cloud-sql

How We Reduced Firestore Reads by 80%: CareerVivid's Database Architecture Deep Dive Published: March 2026 · Engineering · Database Architecture · Performance -


How We Reduced Firestore Reads by 80%: CareerVivid's Database Architecture Deep Dive Published: March 2026 · Engineering · Database Architecture · Performance --- At CareerVivid, we run a hybrid database architecture that blends Cloud Firestore for real-time user data with Firebase Data Connect (Cloud SQL / PostgreSQL) for relational social graph data. This worked beautifully — until our Firestore usage dashboard showed 29,000 reads in a single day with only a handful of active users. This post breaks down our full database architecture, how we diagnosed the read spike, and the three targeted fixes that brought costs back under control. --- Our Dual-Database Architecture CareerVivid uses two complementary persistence layers. Each was chosen deliberately to solve a different class of problem. Layer 1 — Cloud Firestore (Primary Operational Store) Firestore is our workhorse. It handles all user-owned, permission-gated, mutable data. Every document in Firestore reflects one user's real-time state, or a community artifact that can be updated by its owner. Key collections: | Collection | Purpose | Access Pattern | |---|---|---| | users/{uid} | Auth profile, roles, settings | Owner-read/write, public-read | | users/{uid}/resumes/{id} | Resume documents with share configs | Owner or shareConfig.enabled | | users/{uid}/portfolios/{id} | Portfolio builder data | Owner-scoped | | users/{uid}/whiteboards/{id} | Excalidraw canvas state | Owner-scoped | | communityposts/{id} | Community feed posts (Markdown) | Public-read, owner-write | | communitypostlikes/{id} | Post engagement metrics | Public-read, authenticated-create | | communitypostcomments/{id} | Comments on community posts | Public-read, authenticated-create | | blogposts/{id} | Platform blog articles | Public-read, admin-write | | jobPostings/{id} | B2B job listings | Published = public, owner + admin | | jobApplications/{id} | Candidate applications | Applicant + owning HR partner | | companyProfiles/{id} | B2B comp