22 days ago
We currently have a web service and a prometheus/grafana set linked to it. If we were to use the "replica" feature on railway, how could we monitor it ?
For instance if I were to do the same with k8s, I would be able to recognize each pod, so I can easily monitor my pods globally. Is there an equivalent (id, something) or a recommended way to monitor railway horizontally scaled services ?
Same question on "high availability postgres" (aka read replicas)
1 Replies
22 days ago
Each replica is deployed with a RAILWAY_REPLICA_ID environment variable (and RAILWAY_REPLICA_REGION for multi-region setups) that you can use as a label in your Prometheus metrics to distinguish individual instances, similar to a Kubernetes pod name. The built-in Metrics tab also supports a per-replica view alongside the default summed view. For HA Postgres, each node in the cluster (primary, replicas, etcd, HAProxy) is a separate service with its own metrics, and there are ready-made templates for a PostgreSQL Exporter, Prometheus, and Grafana to wire up monitoring.
Status changed to Awaiting User Response Railway • 22 days ago
Status changed to Solved ivan-robert • 22 days ago