Multi-tenant SaaS 2026
BoxesVDR
Multi-tenant SaaS infrastructure on Huawei Cloud.
- My role
- Senior Software Engineer — backend architecture owner
- Duration
- Feb 2026 — present
- Team
- With the frontend and UX/UI teams
- Status
- In production
A full production domain migration (withaqvdr.com → boxesvdr.com) across 3 live servers, with a zero-downtime nginx and DNS cutover.
Background & context
BoxesVDR is a multi-tenant virtual data room built for Boxes Intelligent Communications. Each client organisation needs its own isolated space, reached at its own subdomain, with documents that must never leak across tenant boundaries.
I own the backend architecture end to end: tenant routing, access control, TLS, and the environment strategy across development, staging and production.
Challenges
Isolating tenants at the edge
Checking tenancy inside the application means an unauthorised request still reaches PHP, boots the framework, and touches the database before being refused. At scale that is wasted work on requests that should never have been served.
Migrating a live domain
The platform had to move from withaqvdr.com to boxesvdr.com across three live servers, without dropping a session or serving a certificate error during the cutover.
Cloud spend with no owner
Infrastructure costs on Huawei Cloud had grown without anyone tracking which resources justified their price.
Solution & implementation
Tenant routing is resolved by subdomain and enforced at the nginx layer using an auth_request gate, so an unauthorised request is refused before PHP is ever invoked.
location / {
auth_request /_tenant_gate;
proxy_pass http://app;
}
TLS is handled with Cloudflare Origin Certificates, which removes per-subdomain certificate renewal as a class of failure.
The domain migration was rehearsed on staging first, then executed as an nginx and DNS cutover with both hostnames served in parallel until propagation completed — so no request was ever answered by a server that did not yet know the new name.
Deployments run through GitHub Actions pipelines that are identical across all three AlmaLinux/nginx environments, which is what makes a rehearsal on staging meaningful.
Results & impact
- A full production domain migration across 3 live servers with zero downtime.
- Tenant isolation enforced at the edge, so refused requests cost no application time.
- A cloud cost audit across Huawei Cloud (ME-Riyadh) identified ~$324–345/month in spend, cut by converting dev and staging EIPs from fixed to pay-per-traffic billing.
- Repeatable deployments across all three environments.
Lessons learned
Pushing authorisation to the edge changed the cost profile of the whole system: the cheapest request to serve is the one the application never sees.
The migration went quietly because it was rehearsed on an environment that genuinely matched production. Environment parity is not tidiness — it is what makes a rehearsal predictive.
Built with
- Laravel
- Nginx
- Huawei Cloud
- Cloudflare
- AlmaLinux
- GitHub Actions