AI SaaS platform: multi-tenancy, billing, MLOps

The platform is growing, and the shared environment starts to slow things down: customers need data isolation, while billing relies on manual calculations. We design and deliver a turnkey AI SaaS platform with multi-tenancy and transparent usage accounting. Onboarding a new customer becomes several times faster, and infrastructure costs stop growing with every new connection.

AI Development Areas

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1344
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1310
  • B2B Advance company logo design
    B2B Advance company logo design
    754
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1050
  • AIDER company logo development
    AIDER company logo development
    994
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1100

Why an AI SaaS Platform Hits a Ceiling as It Grows

While there are only a few tenants, the platform survives on one shared environment: one queue for model requests, one pool of compute workers, and a common database with client settings.

Fault tolerance and warm-up are shared by everyone at once, and one client's heavy request goes into the same queue as everyone else's light ones.

Support notices this first: 95th percentile response time grows faster than the number of clients, because adding a tenant does not add isolation—it only lengthens the shared queue.

A single client with a load spike drags everyone else into degradation—a classic noisy neighbor, only without the ability to limit anyone.

The second layer is model update releases. A new version is run across all clients at once because there is no versioning and gradual rollout mechanism: an engineer manually rebuilds the artifact, puts it in shared storage, and restarts the service.

The rollout window and rollback window coincide, quality cannot be checked on one segment, and any error in the weights is immediately visible across the entire client base. Plus cold starts: until the model is warmed up, the first requests from each tenant time out.

The third and most costly is the maintenance bottleneck. Limits, pricing tiers, and tenant configuration live in scripts and are edited manually in the database; metrics are collected in a shared stream without per-client breakdown.

An incident for one tenant cascadingly takes down the others, and investigation takes hours because there is no way to separate other tenants' data and load. We explain how this is resolved—environment isolation, model versioning, and automated release updates.

Multitenancy and Data Isolation: Measurable Effect

While clients live in a shared database with an owner flag in tables, any schema change becomes a shared risk: a migration for one customer is run across everyone, and a neighbor with peak load brings down response time for the rest.

The cost of such a scheme is long release approvals and incidents that are extinguished across the entire environment at once.

We separate clients into namespaces and dedicated storages: their own encrypted volumes, their own keys, and request routing by client identifier. Only service layers remain shared—gateway, task queue, metrics collection.

Data does not overlap in memory, on disk, or in backups, so one customer physically cannot affect another.

The effect is measurable in three metrics. Release time for changes is reduced severalfold: an update is run on a separate canary client and rolled out independently, without a shared approval freeze.

The share of failures affecting several customers at once drops to zero—a failure is localized within one environment, and the rest continue to operate.

A unified operations environment is preserved: shared access policies, common backup and recovery rules, and end-to-end tracing across all clients.

A Kubernetes cluster with namespace separation gives everyone the same toolset, and maintenance becomes predictable: an engineer sees whose response time is degrading and fixes it selectively without taking down the others.

Billing and Usage Metering: Pricing Scheme Options

A pricing model is not a price list but a contract between usage metering and billing. It defines exactly what goes into the event log: session duration, number of processed requests, input and output data volume, and consumed compute resources.

A mistake at this level is the most costly: if the billing unit is chosen incorrectly, limit counting, charging, and client reporting will all have to be redone.

Most often, the extremes do not work in pure form. A subscription with quotas gives both sides predictability, but if the quota is chosen blindly, the client either overpays for idle capacity or hits the limit during peak load.

Pay-as-you-go is fair but hard to forecast in a budget and requires mature metering. A hybrid billing scheme resolves this contradiction through a base tier and a separate overage rate.

Option When it fits Limitations
Subscription with quotas Stable load, budget fixed for the period Overage is cut off by the limit or requires manual approval
Usage-based billing Pilots, uneven or seasonal demand Invoice spikes, harder forecasting for the client
Hybrid billing scheme Core product with baseline and peak load Requires thresholds, coefficients, and a clear overage scale
Prepaid unit packages Clients with a slow approval cycle Remaining balances require tracking, refunds, and expiration terms
Per-seat billing Collaboration for a small team Does not reflect actual infrastructure load

Whichever model is chosen, the invariants are the same: usage events are written to an immutable log with an idempotency key, aggregates are calculated over closed periods, and late events are accepted within a grace window and included in the next cycle's reconciliation.

This keeps billing consistent with actual usage, and switching to another scheme comes down to reconfiguring rules rather than rewriting the metering.

Implementation Stages: From Environment Audit to Handover

We work sequentially: each next stage relies on the artifacts of the previous one, not on verbal agreements. This makes it possible to stop at any step and get a working environment rather than half a system.

  1. Architecture audit. We review the current code, infrastructure, and data flows: where models live, how training artifacts are stored, and which dependencies will have to be replaced. The output is a map of bottlenecks and a work sequence.
  2. Multitenancy scheme. We choose an isolation model: a shared database with row-level separation by tenant identifier or a separate schema per client. For heavy queries and analytics, we lock the solution at the PostgreSQL level—row access policies remove the risk of leakage between accounts.
  3. Billing and limits. We tie pricing to measurable events: model calls, token volume, inference time. Metering is idempotent—repeated payment provider webhooks do not double charges or block the account.
  4. Environment setup. Three environments—development, pre-production, production—with the same deployment method and different quotas. Configurations are versioned, and secrets do not get into images.
  5. MLOps pipeline. We automate model training and deployment, add canary rollout to part of the traffic, and quality metrics. If degradation appears, rollback to the previous version takes minutes.
  6. Load testing. We run scenarios with a real request profile and several tenants at once: we see where the queue bottlenecks, how latency grows, and how limits behave during a spike.
  7. Handover. We hand over repositories, schemas, policies, and operating instructions, and conduct team training.

After handover, the environment remains manageable without our involvement.

Deliverables: Configurations, Schemas, and Policies

The deliverables are a working part of the platform, not an appendix to project handover.

Using them, the client's engineers release updates, onboard new tenants, and handle incidents without us, so each artifact answers the question "how to reproduce and change" rather than "what was done."

  • Environment configuration — infrastructure templates for development, pre-production, and production: variables, limits, external connections; access keys are moved to a separate vault and are not stored in the repository.
  • Data and role schema — tenant isolation model, permissions matrix, and reversible migrations: a new tenant is spun up from a template in one operation, without manual edits in the database.
  • Release policy — build and mandatory check procedures, release first to a subset of tenants, rollback criteria and procedure.
  • Billing — pricing rules, usage metering by tenant, charge reconciliation, and discrepancy handling procedure.
  • Observability and model quality — dashboards for latency and errors, degradation thresholds, retraining procedure without service downtime.
  • Access control and audit — roles for operations and support, action log, key rotation, and access revocation.
  • Documentation and handover — service map, decisions with rationale, incident postmortems, team training on real tasks.

Handover is considered complete when the client releases an update and onboards a new tenant on their own. After that, we stay in touch for complex changes, but the platform lives without us.

Case Study: From a Single Shared Environment to Per-Client Isolation

Baseline

A multitenant platform kept all clients in one Kubernetes environment: shared task queues, one database, one build pipeline.

The proximity produced a noisy-neighbor effect—a load spike for one customer stretched API responses for the rest, and the log collected all tenants' events into one stream.

Releases went out in batches every two weeks and always for everyone at once, so a minor fix for one client waited for checks of the others.

What Changed and What We Achieved

Tenants were separated into individual namespaces with their own resource limits, queues, and data schemas, and build and release were split into independent channels with tenant control at the edge: requests, billing, and logs are routed by it.

Parameter Shared environment Per-client isolation
Release cadence every two weeks, in batches two to three days, per client
Failures due to neighbor impact about 40% of incidents isolated cases
Recovery after failure 3-4 hours, manual 20-30 minutes, from a template
New client onboarding about two weeks one to two days

The share of failures caused by clients affecting each other fell to isolated cases: now in most incidents the cause is local and visible within one tenant's boundaries.

Version rollback became a client-level operation rather than a platform-wide one, so changes ship many times more often and with less risk.

How Does Multitenancy Differ from a Dedicated Environment?

Multitenancy and a dedicated environment are two ends of the same fork, not "cheaper and more expensive." In a shared environment, services and the database are shared, and isolation is achieved logically: per-tenant schemas or row-level access policies, dedicated encryption keys, compute quotas.

In the dedicated option, a client gets its own set of services, its own storage, and its own update cadence—isolation becomes physical.

A shared environment wins where a unified release and predictable maintenance matter: one build goes to all clients, telemetry and model training are collected in a shared queue, and a new version rolls out at once rather than across dozens of sites.

The tradeoff is a shared failure domain: a failure or resource-intensive training for one client affects neighbors. Therefore isolation must be verifiable, not declared: row-level policies, limits on concurrent jobs, separate storage accounts.

A dedicated environment per client solves other tasks—strict data residency requirements, custom integrations, a nonstandard peak profile, the need for a fixed version. The cost is the number of entities that must be independently updated, tested, and restored.

Without deployment automation and repeatable templates, after several clients support hits manual operations, and rollout takes hours instead of minutes.

A hybrid hosting scheme removes the extremes: the shared control layer—access, billing, analytics, training orchestration—remains unified, while data and compute resources live in the client's environment.

Control services are updated in a single rollout, and sensitive data and heavy training do not leave the isolated site.

The choice boundary comes down to three questions: what requires isolation—data, load, or the version itself; what peak and model-training profile is expected; how many clients there are and how often they change.

While requirements are standard, a shared environment with proper isolation is cheaper to maintain. As soon as "data only on our premises" appears, we move to a hybrid, and leave a fully dedicated environment for isolated cases with special conditions.

Technical Concerns About the Platform Before Work Starts

Before work starts, a contractor usually hears the same three questions: how to migrate an already running platform without stopping the service, how to physically separate different clients' data, and what will happen to models when their quality begins to decline. We answer directly—without generic promises.

How do you migrate an existing platform without downtime?

We stand up the target environment alongside the current one, enable dual writes, and migrate data in batches, verifying checksums by table. Traffic switching is done via a configuration flag, so reverting to the previous environment takes minutes, not hours.

How is client data protected at the platform level?

Isolation is built on two levels: a separate storage schema and a mandatory tenant identifier in every data request, enforced by the access layer, not by screen code. Encryption keys are issued per tenant, so access can be revoked selectively without stopping other tenants.

Who supports the models after launch?

After handover, quality monitoring on a holdout sample and a model version registry are in place: accuracy drops are visible before complaints arrive. Retraining runs on a schedule and on a data drift signal, and reverting to the previous version is a single operation. Knowledge transfer to the client's team goes together with documentation and incident postmortems.

Let's Discuss the Task and Come Back with an Estimate and Plan

The first architecture review is not an introduction but a working meeting with the engineers who will lead the project. We review the current state and constraints so that we come back with an estimate and work plan, not generic talk about timelines.

What we clarify to make the estimate realistic:

  • Multitenancy boundaries: a shared database with per-tenant schemas, separate databases, or separate environments—and exactly where the boundary of platform client data lies.
  • Pricing model: what we take as the unit—request, volume of processed data, or active user; how we count limits and what happens when they are exceeded.
  • Model lifecycle: where training artifacts and data are stored, how we roll out a new version and roll back to the previous one without downtime.
  • What already exists in the infrastructure: cloud or own servers, task queue, storage, monitoring, and alerts.
  • Data and access: personal data, logging, retention periods, who inside the platform can see tenant data.
  • Load profile: how many tenants and requests are expected, what response time we consider acceptable, and what we do at peak.

This is a substantive conversation: to discuss the task concretely, it is enough to describe the product, tenants, and what is already in place.

As a result, you get a phased work plan with responsibility boundaries and a documentation handover procedure—schemas, configurations, operating instructions—so that the platform remains manageable without us.