You’re an agency or a SaaS operator hosting 40 customer workloads on a managed PaaS. Every six months somebody asks the same question: should each customer get their own environment, or should we run one shared environment with 40 namespaces inside it? The first option is “more isolated, easier to reason about, more expensive at the floor.” The second is “denser, cheaper per tenant, more interesting failure modes.” Both choices are defensible. The wrong one will quietly bleed your operations budget for two years before anyone names what’s happening.
What’s happening
A PaaS like Jelastic gives you two natural tenancy boundaries. An environment is a top-level container with its own topology, its own public endpoint, its own SSL termination, its own resource quota, its own access control. A namespace (or “node group inside a shared environment”) shares the same compute, the same load balancer, the same SSL endpoint, the same outbound IP, and the same set of nodes — isolation is by container, vhost, database name, or schema.
The tradeoffs aren’t symmetric. Per-tenant environments give you:
- Crisp blast radius — a runaway customer can’t starve another customer’s PHP-FPM pool because they aren’t in the same pool.
- Per-tenant resource billing that maps 1:1 to a PaaS bill line, which simplifies chargeback.
- Per-tenant upgrade cadence — you can roll PHP 8.3 to one customer Monday and another Thursday.
- Higher floor cost per tenant — every environment carries the minimum cloudlet floor of a load balancer plus app server plus database, even if the customer has 50 visitors a day.
Shared environments give you:
- Lower floor cost per tenant — 40 PHP-FPM virtual hosts on a single LiteSpeed container is cheap.
- One TLS endpoint to operate, one outbound IP for mail reputation, one set of firewall rules.
- One upgrade event for 40 tenants — efficient when it works, catastrophic when one tenant’s plugin breaks on PHP 8.3.
- Noisy-neighbor reality — one customer’s slow query, one customer’s 50 MB file upload bug, one customer’s cron job at 03:00 affects everyone on that node.
- Per-tenant cost attribution that requires you to build it yourself (tag-based metering, request-level accounting, see per-tenant cost attribution).
Two heuristics from running this in production:
- If any customer in your portfolio is more than 30% of total compute, give that customer their own environment. Their failures will define everyone else’s experience.
- If your customers’ upgrade windows differ (regulated industry vs SaaS startup), per-tenant environments are not optional. You cannot run a “we patch on the third Wednesday” agency-style cadence on a regulated customer who needs change approval.
How to verify
Inventory current density on the shared environment:
# List environments visible to your account
~/jelastic/environment/control/getallenvs --session $SESSION
# For a shared environment, list nodes + resource usage
~/jelastic/environment/control/getenvinfo \
--session $SESSION \
--envName shared-prod
# Per-tenant request volume from the LB access log
awk '{print $1}' /var/log/nginx/access.log \
| sort | uniq -c | sort -rn | head -20
If one vhost is producing more than 30% of requests on a shared environment, that tenant is your noisy neighbor — measured, not theoretical.
For each candidate split, compute the floor cost. On Jelastic the floor is roughly: 1 cloudlet on the load balancer + minimum cloudlets on the app node + minimum on the DB node, multiplied by uptime. Compare that to what the tenant currently consumes inside the shared environment — if floor is higher than actual usage and the tenant is low-risk, keep them in the shared pool.
The fix
Decide the policy by tenant tier, not by tenant identity. A typical agency policy:
| Tenant profile | Topology |
|---|---|
| Marketing site, <5K visits/mo, no PCI/PII | Shared environment + namespace |
| Production SaaS app, paying customer revenue runs through it | Per-tenant environment |
| WordPress with WooCommerce or membership plugin | Per-tenant environment |
| Internal staging / dev environments | Shared environment + namespace |
| Customer in regulated industry (healthcare, finance, gov) | Per-tenant environment, dedicated public IP |
Provisioning a new per-tenant environment from the Jelastic CLI, idempotent enough to run from CI:
#!/usr/bin/env bash
set -euo pipefail
TENANT_SLUG="${1:?usage: $0 <tenant-slug>}"
ENV_NAME="${TENANT_SLUG}-prod"
REGION="default"
JEM_USER="${JEM_USER:?set Jelastic API user}"
JEM_PASS="${JEM_PASS:?set Jelastic API password}"
JEM_API="${JEM_API:-https://app.your-paas.example.com}"
# Authenticate, capture session
SESSION=$(curl -fsS -X POST \
"${JEM_API}/1.0/users/authentication/rest/signin" \
-d "login=${JEM_USER}&password=${JEM_PASS}" \
| jq -r .session)
# Create environment from a manifest (LiteSpeed + PHP 8.3 + Postgres 16)
curl -fsS -X POST \
"${JEM_API}/1.0/environment/control/rest/createenvironment" \
-d "session=${SESSION}" \
-d "env={\"envName\":\"${ENV_NAME}\",\"region\":\"${REGION}\",\"displayName\":\"${TENANT_SLUG}\"}" \
--data-urlencode "nodes=[
{\"nodeType\":\"litespeedphp\",\"fixedCloudlets\":2,\"flexibleCloudlets\":16,\"count\":1},
{\"nodeType\":\"postgres16\",\"fixedCloudlets\":2,\"flexibleCloudlets\":8,\"count\":1}
]"
echo "Created ${ENV_NAME}"
Same job with the Terraform Jelastic provider, for environments that should live in version control:
terraform {
required_providers {
jelastic = {
source = "jelastic-jps/jelastic"
version = "~> 1.7"
}
}
}
variable "tenant_slug" {}
variable "tenant_tier" { default = "standard" }
resource "jelastic_environment" "tenant" {
env_name = "${var.tenant_slug}-prod"
display_name = var.tenant_slug
region = "default"
node {
node_type = "litespeedphp"
fixed_cloudlets = 2
flexible_cloudlets = var.tenant_tier == "premium" ? 32 : 16
count = 1
}
node {
node_type = "postgres16"
fixed_cloudlets = 2
flexible_cloudlets = 8
count = 1
}
tags = {
tenant = var.tenant_slug
tier = var.tenant_tier
}
}
Once the boundary is right, the rest gets easier: TLS automation, cost attribution, credential isolation all become single-tenant problems. The hard part is the policy.
Stack Harbor designs the tenant topology for agencies hosting customer environments on managed PaaS, and operates the upgrade cadence and capacity for both shared and per-tenant patterns under environment management. If you’re an agency rebuilding tenancy from the ground up, our agency partner program handles the heavy lift — book a tenancy review.