NEXT Engineering
Published in

NEXT Engineering

Serverless architecture for multi-tenant SaaS

How to break the tradeoff between strong data separation and low cost per tenant

  • Provide separation between tenants. This includes strong data separation as well as flexibility for tenant-specific configuration like SSO, tenant-specific password policies, and the likes.

Pre-serverless architecture

We had the following architecture in place when the need for freemium came up:

  • Business functionality was provided by a fleet of microservices hosted on a Kubernetes cluster
  • Various AWS services provided adjacent functionality, e.g. files were stored S3 and emails sent via SES

Serverless to the rescue

Sooner or later we had to face the facts: Keeping the shared Kubernetes/Kafka clusters would make it increasingly hard to serve enterprise customers. Running separate Kubernetes/Kafka clusters would immediately kill our freemium plans.

  • We store data in DynamoDB instead of Kafka.

Enable freemium with partitions

Moving each tenant into a separate AWS account solved the first part of the puzzle: We can offer strong tenant separation. Yet, the cost per tenant is still way above $0, making it unsuitable for a freemium model.

Results

The change of architecture achieved our two main goals: We can offer much stronger separation to enterprise customers and the marginal cost for freemium tenant is very close to $0.

  • Our system uptime improved because most operational work is now “outsourced” to AWS.

--

--

NEXT is collaborative product discovery platform. Product teams at hundreds of organizations including Deloitte, Canon, Bosch, CGI, and BASF use NEXT to engage with their customers and gather evidence of their unmet needs and aspirations to inform their product decisions.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ronny Roeller

CTO at nextapp.co # Product discovery platform for high performing teams that bring their customers into every decision