June 2025 Summaries
8 posts from Clerk
Filter
Month:
Year:
Post Summaries
Back to Blog
Building a B2B SaaS application involves critical architectural choices, primarily between multi-tenant and single-tenant models, each affecting cost, scalability, security, and customization. Multi-tenancy allows multiple customers to share a single application instance and database, promoting cost efficiency and scalability while requiring robust tenant isolation measures to ensure data security. Conversely, single-tenancy provides each customer with their own dedicated resources, offering enhanced security and customization at the expense of higher infrastructure costs and maintenance complexity. The decision hinges on factors such as the target market, compliance requirements, and operational capacity. Although many startups favor multi-tenancy for its scalability and cost benefits, hybrid approaches can provide tenant-specific isolation within a shared environment. Modern tools like Clerk, Supabase, Prisma, and Neon help streamline tenant management and isolation, enabling businesses to focus on core functionalities while maintaining security and efficiency. Ultimately, the choice should align with the company’s goals and customer needs, leveraging the appropriate tools to balance performance, security, and cost-effectiveness.
Jun 27, 2025
4,184 words in the original blog post.
Building a multi-tenant SaaS product with Clerk involves integrating multi-tenancy from the outset to ensure effective scaling and security. Clerk simplifies the process by providing built-in support for tenant isolation within a single codebase, allowing developers to use drop-in UI components instead of custom logic, thus maintaining flexibility as the product grows. The guide details the use of Clerk to integrate a complete multi-tenant experience into an app, specifically a task manager named Kozi, by enabling users to create and join organizations, invite members, and enforce role-based access control (RBAC). It also covers the configuration of custom domains with Clerk’s Verified Domains to streamline user onboarding. The implementation ensures that users with different roles, such as Admin, Member, and Reader, have appropriate permissions to access and manage tasks within their organizations. Clerk's role-based permissions and organization switcher are crucial in managing access and personalizing user experiences across multiple organizations, enhancing both usability and security in multi-tenant applications.
Jun 27, 2025
6,412 words in the original blog post.
On June 26, 2025, Clerk experienced a service outage from 6:16 UTC to 7:01 UTC due to a failure in Google's Cloud Run infrastructure, affecting all its customers. The issue was identified as a regional failure impacting the "us-central1" region, which led to a continuous restart loop of their Google Cloud Run containers. Despite identifying the problem, Clerk's team could not resolve it independently and filed a priority incident with Google. The root cause, later confirmed by Google, was linked to a design flaw in Cloud Run's zonal redundancy, which failed to redirect traffic to another capacity pool. In response, Clerk plans to implement regional failover, explore multi-cloud redundancy, and enhance service isolation to prevent future incidents. Clerk is committed to improving its infrastructure's resilience to ensure reliable service for its customers and apologizes for the disruption caused by the outage.
Jun 26, 2025
1,222 words in the original blog post.
Multi-tenancy involves supporting multiple customers within a single application, requiring careful architectural decisions regarding authentication, authorization, data storage, and performance to ensure isolation and control. Core principles include strict data isolation, often enforced by mechanisms like Postgres's Row-Level Security (RLS), and role-based access control to manage user permissions across tenants. Various database models, such as shared databases with isolated schemas or fully isolated databases per tenant, offer different levels of data separation and scalability, with hybrid models providing flexibility based on customer needs. Authentication strategies ensure tenant-specific access controls, while tools like Clerk provide comprehensive user management solutions, integrating seamlessly with multi-tenant apps to support roles, permissions, and advanced authentication flows. Database providers like Supabase and Neon offer options for implementing tenant isolation at the data layer, while cloud services like AWS and GCP enable automated per-tenant infrastructure provisioning, enhancing scalability and compliance. The design of a multi-tenant architecture is crucial for maintaining trust, flexibility, and scalability as a SaaS product grows, with the right strategies and tools helping to manage these complexities effectively.
Jun 18, 2025
2,385 words in the original blog post.
Multi-tenancy is an architectural design pattern crucial for building scalable and cost-effective B2B SaaS products, allowing a single application instance to serve multiple organizations while keeping their data and workflows isolated. This approach is exemplified by platforms like Slack and Shopify, which offer isolated experiences for each tenant without maintaining separate applications for each customer. Multi-tenancy enables faster feature rollouts, cost efficiency, true scalability, and the ability to accommodate diverse and complex business requirements. Failure to implement multi-tenancy from the outset can lead to significant challenges, including complex database migrations, monitoring difficulties, resource scaling issues, and intricate disaster recovery processes. Examples of multi-tenancy in action include collaborative workspaces, robust organizational dashboards, customizable roles and permissions, and org-specific authentication flows, all of which are essential for serving B2B customers with diverse needs efficiently from a shared infrastructure.
Jun 17, 2025
1,488 words in the original blog post.
The text discusses the importance and implementation of multi-tenancy in B2B SaaS products, using a hypothetical product called "HubGit" as an example. Multi-tenancy allows a single application instance to serve multiple customers or "tenants" while keeping their data and workflows isolated. This architecture is crucial for scalability, cost efficiency, and faster feature rollouts, enabling companies like Slack and Shopify to serve numerous clients with diverse needs. The text emphasizes that multi-tenancy is essential for B2B SaaS products aiming to grow and cater to complex organizational structures, offering benefits like shared infrastructure improvements and reduced technical debt. It warns against starting with a B2C architecture and transitioning later, highlighting challenges such as database migrations, debugging complexity, and resource scaling. Practical examples include collaborative workspaces, admin dashboards, and custom roles, showcasing how multi-tenancy supports dynamic customer needs while maintaining data isolation. The text concludes by indicating that the next discussion will focus on designing scalable multi-tenant SaaS architectures.
Jun 17, 2025
1,488 words in the original blog post.
OAuth, a complex but essential protocol for secure authorization, allows third-party applications to access user data without sharing passwords. This guide emphasizes practical understanding, focusing on the OAuth "Authorization Code Flow," which enables scoped access for apps like the fictional "Content Planner" to post on social media platforms on behalf of users without accessing their login credentials. Key security measures, such as PKCE and state parameters, are discussed to prevent unauthorized access and ensure secure token exchanges. The guide also addresses common OAuth questions, such as token expiration and refresh, opaque versus JWT tokens, and the potential risks and benefits of dynamic client registration. Additionally, it touches on OpenID Connect (OIDC), which enhances OAuth by providing user identity information. For developers using Clerk, the platform offers built-in support for OAuth implementations, including dynamic client registration and robust security features.
Jun 13, 2025
5,989 words in the original blog post.
Web applications often require access to user data, and Clerk provides multiple methods to achieve this, each with its own benefits and tradeoffs. Using Clerk's Backend API, developers can securely access real-time user data updates, ensuring their applications always have the latest information. However, this method is subject to rate limits, making caching a beneficial strategy to prevent overuse. Alternatively, user data can be proactively synced to a Supabase database through Clerk Webhooks and Supabase Functions, which allows local access to user information for analytics and reporting, albeit with a potential delay due to asynchronous syncing. This approach also requires additional infrastructure management. A practical implementation of these strategies is demonstrated using Quillmate, an open-source writing platform built with Next.js and Supabase, showcasing how to integrate Clerk's webhooks with Supabase's Edge Functions for efficient user data synchronization.
Jun 06, 2025
2,062 words in the original blog post.