Home / Companies / Kestra / Blog / Post Details
Content Deep Dive

Building A Multi-Tenant SaaS

Blog post from Kestra

Post Details
Company
Date Published
Author
Loïc Mathieu
Word Count
1,420
Language
English
Hacker News Points
-
Summary

The blog post discusses the implementation of multi-tenancy in Kestra, a SaaS orchestration platform, highlighting the challenges and solutions involved in adapting its architecture to support multiple tenants. Multi-tenancy, a software architecture model enabling a single software instance to serve multiple clients while maximizing resource efficiency and ensuring data isolation, is explored through various models such as dedicated instances, dedicated databases, shared databases with dedicated schemas, and shared tables with tenant IDs. Kestra opted for the tenantId model, which aligns with its distributed architecture and provides the flexibility needed for granular data control. The undertaking required extensive modifications to the system, including integrating a tenantId across all components and addressing the complexities of context passage, which led to some bugs and oversights. The transition for legacy users was managed by introducing a default tenant strategy, although it posed additional challenges. The post concludes that multi-tenancy is crucial for SaaS development but emphasizes the importance of careful planning, a long testing period, and early implementation in the codebase to mitigate risks and ensure successful deployment.