July 05, 2024

How Solin Uses Prisma Accelerate to Serve 2.5M Database Queries per Day

Solin, a leading fitness marketplace for creators, has improved its platform by integrating Prisma Accelerate. This story highlights how Prisma Accelerate has contributed to Solin's success by enhancing performance and reliability with its scalable connection pool and global database cache.

Solin brings the digital revolution to the fitness industry

In the rapidly evolving fitness industry, staying ahead of the curve requires not just innovative ideas but also reliable and scalable technology solutions. Solin, a leading fitness marketplace for creators to sell programs, challenges, memberships, and cookbooks, has improved its platform by integrating Prisma Accelerate.

This story highlights how Prisma Accelerate has contributed to Solin's platform, enhancing performance and reliability, and why other businesses might benefit from this tool.

Solin connects fitness creators with consumers, offering a marketplace where creators can sell various fitness-related products and services, such as workout programs, challenges, and cookbooks. Consumers gain access to these offerings along with community features and transformation tracking, fostering a more interactive and hands-on digital fitness experience.

The stack: Fullstack Remix + Prisma ORM

Solin uses Remix as a fullstack framework for their application. They initially started out with a traditional Node.js API that was hosted on Heroku, but after a while, they decided to go all-in with Remix and switched to Vercel as their new hosting provider.

They leverage Remix’ server-side capabilities and implement the entire API layer using serverless functions, which use Prisma ORM to query the database and are deployed via Vercel.

Their PostgreSQL database is hosted on Heroku.

Serving 2.5M database queries per day with Accelerate’s connection pool

When accessing a database from serverless functions, it’s easy to exhaust the database connection limit and run out of connections during traffic spikes. This leads to failed requests and frustrated users.

For these situations, it’s crucial to add an external connection pool that can keep connections open and ensure their reuse. That’s why Solin decided to integrate Prisma Accelerate into their application stack! With its scalable connection pool and seamless integration with Prisma ORM, Prisma Accelerate is the perfect companion for building data-driven applications in a serverless environment.

For Solin, this means they can easily keep up with the rapidly growing demand for their fitness platform, scaling it to thousands of users and serving more 2.5M database queries per day.

Learn more about dealing with sudden traffic spikes in our recent post, Saving Black Friday With Connection Pooling.

Blazing fast response times thanks to database caching

Prisma Accelerate not only offers a connection pool, but also comes with a global cache that can be enabled on a per-query level. Because caching works especially well with content that rarely changes, Solin powers all of their landing pages with Prisma Accelerate. Thanks to the cache, Solin’s users get blazing fast response times when accessing their site.

"Accelerate is a perfect fit for landing pages. We are able to take advantage of caching to speed up queries and reduce latency, making them lightning fast. This obviously means we have a faster landing page, leading to better conversion." – Blake Carroll, CTO @ Solin

Solin uses a combination of swr (Stale-While-Revalidate) and ttl (Time-To-Live) options in their Prisma Client queries to control the caching behaviour on a query-level.

Here is an example for how these options can be used:

Fast responses are not the only benefit of integrating a database cache! It also notably reduces load on the database server, freeing up resources for more complex queries. The reduced load on the database server also shrinks the monetary cost for running it.

Learn more about the benefits of caching in our recent article: Speed and Savings: Caching Database Queries with Prisma Accelerate.

At a glance: Solin’s benefits of using Prisma Accelerate

To summarize, Solin benefits from using Prisma Accelerate in the following ways:

  • Speed and efficiency: Prisma Accelerate offers fast query performance, both for cached and non-cached queries. Quick data access and minimal latency are crucial for Solin.
  • Reliability: Since switching to Prisma Accelerate, Solin has not encountered connection issues, improving uptime, especially during peak usage times.
  • Seamless integration and great DX: The integration process with Prisma Accelerate was straightforward, allowing Solin to set it up and configure caching strategies with minimal effort.

Try out Accelerate and speed up your database queries

Convince yourself of the speed gains you can get with Prisma Accelerate by running the Accelerate Speed Test or watch this 5min explainer video demoing how Accelerate improves query performance and application uptime:

Don’t miss the next post!

Sign up for the Prisma Newsletter