2024-04-10-saas-anywhere/cover.webp
2024-04-10
3 min read
gwenshap profile pic
Gwen Shapira

Introducing: SaaS Anywhere on Postgres - for Speed and Compliance

From the very early days of Nile, when we were still drawing ideas on a whiteboard and talking to SaaS companies to understand their journey, we knew that geographical distribution was an important requirement for SaaS businesses at almost every stage and that managing data across geographies is a recurring pain point. So we weren't surprised when one of the top requests from our customers was to make Nile available in additional regions.

Which is why we are excited to announce that today we are making Nile available in additional regions. We started with us-west-2 (Oregon) and you now have the option to also provision a database in eu-central-1 (Frankfurt). We are planning to add new regions in Singapore, Sydney and US East Coast in short order. Need Nile anywhere else? Let us know. We've built an easy-to-expand control plane architecture, so we can spin up a new region in minutes. Just say the word.

Nile in new regions

There are a few reasons SaaS companies need their databases in different regions, long before they reach global scale:

Latency

This is probably a bit too obvious, but if your SaaS is serving mostly customers in the EU, they will experience much better performance if your application and your database is in the EU as well. For SaaS businesses that start out as regional, this is a “no brainer”. While the idea that bringing the data close to customers reduces latency is obvious, developers often underestimate the impact of 100ms latency in each roundtrip on their application. Often applications make multiple database calls while loading a single page, and these add up.

Developer productivity

Even if your customers happen to be near Oregon, your developers may be in Europe, or all over the world. Customers aren't the only people who enjoy faster performance with a near-by database, so do developers. And developer happiness is important to the success of your SaaS business. With Serverless Postgres, you only pay for used capacity, so there is no reason why you shouldn't have a near by database for every developer on your team.

Compliance

There are many regions with strict data residency regulations: EU, UK, parts of Canada, Japan, Australia... and many more. These regulations make it difficult to store data about citizens of a region outside of that region. There are specific rules about where the data can be stored, how it can be accessed, and how users can consent to exceptions. To make things more complicated, these regulations keep changing and evolving.

These data residency requirements often catch SaaS startups by surprise. With self-serve signup, anyone can sign up to any SaaS product, which means that you don't always know in advance when these laws start applying to your business. Having databases in the relevant regions make this a lot simpler and safer.

Using the new regions

Creating a database in a new region is as simple as selecting it in the dropdown when creating the database.

The database connection string in the existing "settings" page will have everything you need to connect to the new region.

Nile DB connection

When using Nile SDK in your application, you'll want to use the latest SDK version - 2.4.0 or later. We have significantly simplified the configuration you need to use to connect to Nile. In fact, all you need is your database credentials, and the SDK will automatically find your database - anywhere in the world.

Define your environment variables:

# get these values from console.thenile.dev credentials
NILEDB_USER=
NILEDB_PASSWORD=

And Nile will automatically configure itself to connect to the right database and API in the right region:

const nile = await Nile();

You can find additional explanations and examples in our documentation, or you can watch our video tutorial on how to use Nile SDK with any region:

What's next?

Sign up for our waitlist today to start using Nile - anywhere in the world. And let us know, where you need Nile next.