From 67e4fa2ea5e481a69e367f4a83d8a00cc9f2e852 Mon Sep 17 00:00:00 2001 From: Oscar Perez Date: Wed, 18 Nov 2026 17:15:16 +0100 Subject: [PATCH 1/2] chore(railway): run mcp-server in EU West, two replicas in production The Zernio API runs in Europe, so the MCP server moves from us-west2 to europe-west4 (Amsterdam): two replicas in production, one elsewhere. The server is stateless, so random routing across replicas needs no sticky sessions. Railway merges region maps and rejects 0 replicas, so us-west2 is set to null under deploy.multiRegionConfig; the replicas shorthand cannot do that. dev now records its zernio-python source and ZERNIO_MCP_APPS, which were set in Railway but missing here (an apply would have dropped both). Co-Authored-By: Claude Opus 5.5 --- .railway/railway.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.railway/railway.ts b/.railway/railway.ts index 1eec44ba..ef79dd6c 100644 --- a/.railway/railway.ts +++ b/.railway/railway.ts @@ -5,9 +5,12 @@ import { defineRailway, github, preserve, project, service } from "railway/iac"; // GitHub source per environment, as connected today. Omitting it disconnects -// the repo, and pushes stop deploying. dev has no repo connected. +// the repo, and pushes stop deploying. dev tracks whichever branch is under test. const SOURCES: Record> = { production: github("zernio-dev/zernio-python", { branch: "develop" }), + dev: github("zernio-dev/zernio-python", { + branch: "chore/railway-eu-replicas", + }), "zernio-mcp-dev": github("zernio-dev/zernio-mcp", { checkSuites: true }), }; @@ -25,7 +28,7 @@ const VARIABLES: Record = { "ZERNIO_MCP_APPS", ], "zernio-mcp-dev": ["MCP_PUBLIC_URL", "PORT", "SENTRY_DSN"], - dev: ["MCP_PUBLIC_URL", "PORT"], + dev: ["MCP_PUBLIC_URL", "PORT", "ZERNIO_MCP_APPS"], }; export default defineRailway((ctx) => { @@ -50,8 +53,15 @@ export default defineRailway((ctx) => { // setting it here shows as a change on every plan). deploy: { restartPolicyMaxRetries: 3, + // EU West (Amsterdam), next to the Zernio API. Streamable HTTP runs + // stateless, so replicas need no sticky sessions. Railway merges region + // maps, so a region we leave must be set to null (0 is rejected); the + // `replicas` shorthand cannot express that. + multiRegionConfig: { + "europe-west4": { numReplicas: environment === "production" ? 2 : 1 }, + "us-west2": null, + }, }, - replicas: { "us-west2": 1 }, domains: environment === "production" ? [{ domain: "mcp.zernio.com", port: 8080 }] From 2c2c90023a47d7e17df3a81ed14aa0f18dfec652 Mon Sep 17 00:00:00 2001 From: Oscar Perez Date: Wed, 18 Nov 2026 17:25:33 +0100 Subject: [PATCH 2/2] chore(railway): point dev back at develop dev tracked this branch only while the EU region move was tested there. Co-Authored-By: Claude Opus 5.5 --- .railway/railway.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.railway/railway.ts b/.railway/railway.ts index ef79dd6c..3eb7454c 100644 --- a/.railway/railway.ts +++ b/.railway/railway.ts @@ -5,12 +5,11 @@ import { defineRailway, github, preserve, project, service } from "railway/iac"; // GitHub source per environment, as connected today. Omitting it disconnects -// the repo, and pushes stop deploying. dev tracks whichever branch is under test. +// the repo, and pushes stop deploying. dev deploys develop unless a branch is +// under test. const SOURCES: Record> = { production: github("zernio-dev/zernio-python", { branch: "develop" }), - dev: github("zernio-dev/zernio-python", { - branch: "chore/railway-eu-replicas", - }), + dev: github("zernio-dev/zernio-python", { branch: "develop" }), "zernio-mcp-dev": github("zernio-dev/zernio-mcp", { checkSuites: true }), };