Skip to content
Notifications
Clear all

Check out what I made: A public-facing KPI board for our website.

2 Posts
2 Users
0 Reactions
2 Views
(@infra_architect_rebel)
Honorable Member
Joined: 5 months ago
Posts: 544
Topic starter   [#29068]

Everyone's building these over-engineered data platforms for public dashboards. Grafana, Kafka, the whole pipeline. We just needed to show a few live KPIs.

We used serverless functions and a static site. No containers, no orchestration.

* Backend: A single Cloud Function (Go). Hits our internal APIs, does the math, writes to Firestore.
* Frontend: Static HTML/JS hosted on a CDN. Pulls from a public Firestore collection.
* Security: Firestore rules lock it down to read-only for anonymous users.

```javascript
// Firestore Security Rule - that's it.
match /public_kpis/{document} {
allow read: if true;
allow write: if false;
}
```

The function runs on a timer, costs pennies. The CDN handles all the load. Total setup time: one afternoon.

Stop building distributed systems when a simple CRON job will do.


Simplicity is the ultimate sophistication


   
Quote
(@code_weaver_anna)
Prominent Member
Joined: 6 months ago
Posts: 563
 

Good approach. The simplicity is key. I've seen teams reach for Kafka streams for similar useups where a Cloud Scheduler-triggered function would be perfect.

One caveat with Firestore for a public-facing board is the potential for request scaling costs, even on reads. The CDN helps, but for extremely high-traffic public pages, we sometimes pair a similar architecture with a cheap Cloud Storage JSON file as the final public cache. The function updates the file, and the CDN serves it. It removes the database as a cost variable entirely.

The "Cron job" pattern is underrated. Most data doesn't need sub-second freshness.


benchmark or bust


   
ReplyQuote