The brief
ONE MACHINE tracks machines in industrial plants (pharma first) and manages their health: live status, alarms, work orders, calibration and predictive maintenance. The design below is for Google Cloud in India only.
- React UI, with Python and Node.js backends: 13 services (an api-gateway and 12 domain services) on a private GKE cluster.
- Self-hosted MongoDB, TimescaleDB and RabbitMQ on GKE, Cloud SQL for MySQL, Memorystore for Redis, and Pub/Sub. Every database has a private address only.
- Fault tolerant across three zones in Mumbai, with disaster recovery in Delhi.
- AI where it pays for itself, FinOps and GreenOps designed in.
- Self-hosted GitLab and Jenkins, Grafana, Cloud Logging and Sentry.
Open the full interactive page (best on a laptop).
Animated architecture
Pick a flow and watch one request or message move through the system: machine telemetry, operator dashboard, alarm to work order, predictive maintenance, AI copilot, audit and e-signature, deploy, observe and secure, and region failover. The red packet is the hop playing now; the numbered list under the picture explains each step.
Regions and disaster recovery
| Failure | What happens | Recovery |
|---|---|---|
| One pod or node | Kubernetes reschedules; pod disruption budgets keep a quorum | Seconds |
| One zone in Mumbai | MongoDB, RabbitMQ and TimescaleDB members run in three zones; Cloud SQL HA fails over | Automatic, about a minute |
| All of Mumbai | Delhi warm standby is promoted: Cloud SQL DR replica, MongoDB priority-0 members, Redis cross-region secondary, standby GKE scaled up | About 30 minutes (RTO) |
| Network cut at a plant | The edge gateway buffers 72 hours of readings and replays them | No readings lost |
Data lost in a regional failure is at most about a minute (RPO); for telemetry it is zero because of the edge buffer. Cloud Storage uses an India dual-region, and Pub/Sub is restricted to India by its message storage policy.
Private by design
- Shared VPC, private GKE nodes, no public IPs, and no service account keys, all enforced by organisation policy. Resource locations are limited to Mumbai and Delhi.
- Only the api-gateway sits behind the load balancer (Cloud Armor in front); the other 12 services are reachable only through it.
- Google APIs are reached through Private Service Connect inside a VPC Service Controls perimeter, so data cannot leave it.
- Binary Authorization admits only signed images; secrets live in Secret Manager; keys are customer managed (CMEK).
- Plants connect outbound only over HA VPN. Nothing in the cloud can open a connection into a plant, and the platform is read-only toward PLCs.
AI, cheapest tier first
- At the edge: simple rules and deadband filtering on the plant gateway.
- In the cluster: predictive models as CPU inference pods.
- Training: Vertex AI, weekly, on Spot capacity.
- Language tasks only: Gemini Flash in Mumbai for the copilot and alarm summaries, with a semantic cache, routing between model sizes and a token budget per site.
AI suggests; people decide and sign. Nothing the model produces changes a machine or a record without a person.
FinOps and GreenOps
- Labels on every resource and one unit metric: cost per monitored machine per month, reviewed monthly.
- Committed use discounts for the steady baseline only; Spot for batch and training; rightsizing from VPA recommendations; log and metric trimming; storage tiering.
- Batch work (training, exports, reports) runs in Delhi, where Google lists about 29% carbon-free energy against about 9% in Mumbai. Scale-to-zero for non-production, and the Carbon Footprint export reviewed next to cost.
Cost flow (list price and after FinOps)
Money flows left to right: from where it is spent (Mumbai app cluster, Mumbai data tier, plant connectivity, Delhi standby, AI, tools and platform), to what it buys (compute, databases, network, storage, observability, AI, platform), to the monthly total. Use the buttons to switch between list price (about $10.1k a month) and after the recommended options (about $7.7k a month) and watch the ribbons shrink. Ribbon width is proportional to dollars; hover a ribbon for its amount.
Cost and cost optimization options
The sizing assumes 25 plants, 1,500 machines, 12,000 telemetry points a second, 400 users and 5,000 copilot questions a day. At list prices that is about $10.1k a month. The page has a separate step with 15 options in seven groups (commitments, connectivity, compute, data, observability, DR and databases, AI) that you can tick to see the monthly bill change. The recommended set brings it to about $7.7k a month, roughly ₹480 per machine per month at ₹93.5 to the dollar.
Cloud VPN is the largest single line (about $2.7k a month for 75 tunnels). Sending data from plants over certificate-secured internet instead would save about $2.2k, but each client’s plant security team has to accept it, so it is not in the recommended set.
Some regional prices come from third-party price trackers. Confirm the figures in the Google Cloud Pricing Calculator before budgeting.
GxP and audit
For regulated plants the design keeps an insert-only, hash-chained audit trail, e-signatures that re-authenticate the signer and store the meaning of the signature, locked-retention buckets, and Terraform with reviewed merge requests as the change record. This supports 21 CFR Part 11 and EU Annex 11 work; it does not replace the client’s own validation.