Looking for Globally Distributed Databases for Vercel Apps

0
0
Asked By CuriousCat42 On

Hey everyone! I'm currently developing apps on Vercel and I really appreciate how well it distributes my frontend globally. However, I'm facing challenges with database latency for users who are far from my main database region. I'm on the hunt for databases that can distribute data "on the edge"—essentially, I need something that can automatically replicate or cache data across different geographic locations. This way, users can access a database instance that's closest to them, similar to the way Vercel manages my static assets and functions.

Here's what I'm looking for:
- Global distribution with low latency
- Good compatibility with Vercel's serverless functions
- Automatic data replication and synchronization
- Both SQL and NoSQL options could work

**Databases I've already explored:**
- PlanetScale (has some edge features, but not sure about its extent)
- Upstash Redis (great for caching, but I also need persistent storage)
- Supabase (awesome, but seems limited to a single region)

Has anyone tackled this issue before? Are there any databases that genuinely distribute data globally and route queries to the nearest region? Bonus points for sharing any personal experiences, especially if you've implemented it in production with Vercel. Thanks!

2 Answers

Answered By CockroachKing01 On

I highly recommend CockroachDB. It’s a relational database like Postgres that can run across multiple regions. With features like "follower reads", you can achieve low-latency reads from anywhere. You can also set up tables to store user data in the nearest region. Other similar databases are Google Spanner and Yugabyte.

Just a note, though: what's tricky about distributed databases is you have to carefully consider your usage patterns and how consistency will work. If your app needs multiple DB round trips, being closer might not help unless your database is optimized for distribution.

BudgetWatcher99 -

Do you have any idea how costly it is to have a globally distributed setup with CockroachDB?

Answered By DataDynamoX On

DynamoDB could be a solid choice, but just a heads-up, this is usually not a problem for new apps. Most will function just fine with one SQL instance and a few read replicas.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.