# Building a Regional Bike-Sharing Network That Survives Rush Hour

## System Shape

A regional bike-sharing network is less a collection of docks than a distributed transportation system with uneven demand, unreliable connectivity, and strict operational windows. In our deployment model, each station publishes dock availability, battery levels for e-bikes, and local health checks to a central event bus every 30 seconds, while kiosks retain enough local state to keep rentals moving during short network outages.

## Data Flow

The core API separates customer-facing reads from operational writes. Mobile apps query a read-optimized station index backed by cached geospatial tiles, while dock controllers send signed telemetry events into a write path that validates firmware version, station identity, and timestamp skew before accepting updates.

```yaml
station:
  heartbeat_interval_seconds: 30
  offline_grace_minutes: 8
  min_available_bikes_alert: 3
  telemetry_topic: regional-bike.telemetry.v1
```

## Rebalancing

Rebalancing is where the network becomes regional rather than local. Demand forecasting combines historical trip starts, weather, train arrival schedules, and live station pressure to produce van routes every 15 minutes, but dispatchers can override recommendations when events, construction, or broken docks change street-level reality faster than the model can learn.

## Resilience

The most important reliability decision was making stations tolerant of partial failure. A dock should still unlock a bike if the kiosk is degraded, a kiosk should still sell a pass if the central API is briefly unavailable, and the mobile app should clearly distinguish “unknown availability” from “no bikes available” so riders are not misled by stale data.

## Operating Metrics

The network is measured by rider-visible outcomes: successful unlock rate, median station freshness, percentage of full or empty stations during peak periods, and mean time to repair failed docks. These metrics expose whether the technical architecture is helping the transportation service do its job, which is moving people across the region predictably.