A well-built Firebase and React platform can serve a multi-district study of 5,000 to 50,000 students without re-architecting, because Firestore’s documented limits sit far above that. Data design breaks first: unbounded reads, hot documents and listener churn. A 20-teacher pilot of about 600 students typically costs under $50 a month in Firebase usage.
How many teachers and students can a Firebase or React research platform handle before it needs re-architecting?
Where the real limits are
React runs in each student’s browser, so it puts no ceiling on how many users you can have. It limits what one device can do: a heavy bundle on a five-year-old Chromebook, audio tied to component state, a page that re-renders on every incoming event. Those problems show up with one class as easily as with fifty.
Firestore is built to scale far past any education study. Google’s published Firestore quotas allow up to a million concurrent connections per database. The limits a research platform actually runs into are smaller and more specific:
- One document, about one write per second sustained. A class-level document that every student updates (a counter, a shared
progressmap) becomes a bottleneck at the start of a lesson. - Sequential indexed fields. Writing many documents with a timestamp-ordered index field creates a hotspot at roughly 500 writes per second, according to Google’s Firestore best-practices guide.
- The 500/50/5 ramp. Google advises starting a new collection at no more than 500 operations per second and raising it by 50% every five minutes. A Phase II launch day that skips the ramp sees slow writes.
- 1 MiB per document. Putting a student’s whole session log in one document works in testing and fails partway through the term.
Rough load and cost by study size
These are rough ranges, assuming students log an event about every 10 seconds, sessions run 40 minutes, three times a week, and reads are disciplined. Prices use Firestore’s US multi-region list price of about $0.06 per 100,000 reads and $0.18 per 100,000 writes. Check current pricing before you budget.
| Study shape | Students | Peak concurrent | Firebase usage per month | What it needs |
|---|---|---|---|---|
| 20-teacher pilot | ~600 | ~150 | Free tier to $50 | Sound data model, security rules tests |
| Multi-school Phase II | 2,000–5,000 | 500–1,500 | $50–$500 | Aggregated dashboards, analytics export, ramped launch |
| Multi-district or efficacy study | 10,000–50,000 | 2,000–10,000 | $500–$3,000 | All of the above, plus distributed counters and a separate analytics store |
Writes stay cheap. At 5,000 students the logging above comes to about 15.6 million writes a month, or roughly $28. Reads are what turn a $50 bill into a $1,000 bill, and almost always because of one pattern.
The Firestore read pitfalls that cost real money
Worked example: the unbounded teacher dashboard
A teacher dashboard queries every event for the class with no limit. With 30 students each logging 240 events a session, one load reads 7,200 documents. Reload it 20 times a lesson and that is 144,000 reads per class session.
With 200 teachers running 15 sessions a week, that comes to about 1.9 billion reads a month, or roughly $1,100, just for the dashboard. Fix it with a per-student summary document, updated by a Cloud Function or batched client write, and the same dashboard reads 30 documents per load and then gets one read per change. The bill drops to a few dollars.
Other patterns to check in a prototype
- Listeners attached inside components that remount, so each navigation re-reads the whole query.
- Listeners that reconnect after more than 30 minutes offline, which Firestore bills as a full re-read. School networks drop often.
- Reading every document to compute one count or average, instead of keeping an aggregate or using a count query.
- Research analysis run straight against production Firestore from a notebook, which reads the full dataset every time someone runs it.
- Security rules that call
get()on other documents, which adds a billed read to every request.
Signs you actually need to re-architect
In practice, re-architecting a Firebase research platform usually means adding a few pieces, not rewriting it. It is time to add them when:
- The efficacy analysis needs joins across students, classes, conditions and time. Export to BigQuery and analyze there, not in Firestore.
- Cost per student-month is rising while usage stays flat. That is a read pattern, and it gets worse as you scale.
- Write errors or contention warnings appear at the start of class. Shard the hot document or move the counter into a function.
- A district or your IRB requires exports, retention rules or deletion on request that are hard to do across nested collections. Restructure the data model before the next cohort, not during it.
We stabilized an NSF-funded React and Firebase platform used across several universities. Audio lag came from state changes, saving and loading student work was unreliable, and each research group deployed its own way. After the fixes, save and load were 100% reliable and the distributed groups shared one deployment pipeline. None of it required leaving Firebase.
A load test plan: pilot versus Phase II
| Step | 20-teacher pilot | Multi-district Phase II |
|---|---|---|
| Rules and data tests | Firebase Emulator suite for every role: student, teacher, researcher | Same, plus a test for every data-deletion and export path |
| Simulated load | 3 classes of 30 clients logging in during the same minute | 1,000–2,000 scripted clients, ramped by the 500/50/5 rule |
| Real devices | One school Chromebook on a filtered district network | Device mix from each district, including the oldest model in use |
| Network faults | Drop wifi mid-session and confirm no work is lost | Same, at scale, and count the re-read cost after reconnect |
| Measure | Save success rate, dashboard load time | p95 write latency, reads per session, cost per student-month |
| Engineering time | 2–3 days | 1–2 weeks |
Run the pilot test at least two weeks before teachers get accounts, so there is time to fix what it finds. Run the Phase II test before each new cohort starts, because each cohort changes peak concurrency.
Why the program officer cares
If saves fail, sessions go missing. If events are logged twice or out of order, the dataset no longer measures what the study claims. Reliability is research validity, and a Phase II reviewer reads a scaling plan with numbers as evidence of a team that can run the study. Your institution’s compliance office and the district’s data agreement still decide how student data may be stored and exported; the architecture has to make their answer easy to carry out.
Frequently asked questions
Is Firebase good enough for a multi-district research study?
Usually, yes. Firestore’s documented limits are far above the scale of most education studies. What matters is whether the data model avoids hot documents and unbounded reads. A prototype built without those in mind often needs a few weeks of rework, not a rewrite.
How much does Firebase cost for a classroom pilot?
For about 600 students logging an event every 10 seconds, three sessions a week, usage usually stays between the free tier and $50 a month. Reads drive the cost far more than writes. One badly designed dashboard can multiply the bill by 20 or more.
What breaks first when a research prototype goes into real schools?
Usually work that doesn’t save on unstable school wifi, a teacher dashboard that reads the whole class’s history on every load, and slow performance on older Chromebooks. All three show up with one class, so test on a real school device and network before launch.
Should our analysis run directly on Firestore?
No. Export the event data to BigQuery or another analytics store and run the efficacy analysis there. Running notebooks against production Firestore re-reads the full dataset on every run, which costs money and puts load on the live pilot.
How long does load testing take before a Phase II rollout?
Plan on one to two weeks of engineering for a multi-district study. That covers emulator rules tests, scripted load of 1,000 to 2,000 clients, testing on real district devices, and cost measurement. A 20-teacher pilot needs two to three days.
Related answers
Scaling a pilot into a Phase II study?
We offer a free 30-minute review of your pilot plan or the technical section of your proposal. Bring the prototype’s repository or a demo, the pilot timeline and enrollment numbers, and your funder’s requirements. Start a conversation.