Home: Cloudfic

Consulting client, B2B SaaS

Moving a multi-tenant SaaS to another cloud

We migrated all three environments of a schema-per-tenant B2B SaaS off hand-built VMs without interrupting active tenants, with an estimated payback under two months.

Migration order: legacy VMs to staging, development and production; in the second phase, files and database move to object storage and a managed database.Legacy VMshand-builtStagingfirstDevelopmentProductionstatic IP, SSLObject storagefilesManaged DBMySQL
Migration order: legacy VMs to staging, development and production; in the second phase, files and database move to object storage and a managed database.

Context

The client runs a multi-tenant B2B SaaS (one schema per tenant plus a central control schema) with development, staging and production on VMs provisioned by hand over several years. It asked us to move all three environments to another cloud provider with a repeatable process, without interrupting active tenants.

Problem

  • Drift between environments: different runtime versions and environment variables.
  • Manual provisioning, with no script or runbook.
  • The newer MySQL default authentication plugin was incompatible with the legacy PDO driver, and the connection failed in every freshly built environment.
  • Misconfigured queue and cache processes left integrations stuck with no alert.

What we did

  • Audited all three environments (resources, services, databases, variables) and compared them with the target design, including database and runtime tuning.
  • Traced the root cause to the authentication plugin; recreating the user with the legacy plugin became a mandatory runbook step.
  • Migrated staging, then development, then production, validating each stage. Static IP, security groups and SSL through a reverse proxy in every environment.
  • Second phase: files and database moved off the application instances into object storage and a managed database, with smaller instances.

Result

Three environments migrated with no tenant data loss and a documented, repeatable runbook. The second phase lowered the monthly cost, with an estimated payback under two months.

Facing a similar problem? Email us